14
14
15
15
import contextlib
16
16
17
- from neutron_lib .api .definitions import portbindings
18
- from neutron_lib .callbacks import exceptions as n_exc
19
17
from neutron_lib import constants as n_consts
20
18
from neutron_lib .objects import registry as obj_reg
21
19
from neutron_lib .plugins import utils
22
20
from neutron_lib .services .trunk import constants as trunk_consts
23
21
from oslo_utils import uuidutils
24
22
25
23
from neutron .common .ovn import constants as ovn_const
26
- from neutron .objects import ports as port_obj
27
24
from neutron .services .trunk import plugin as trunk_plugin
28
25
from neutron .tests .functional import base
29
26
@@ -108,25 +105,6 @@ def test_trunk_create_with_subports(self):
108
105
with self .trunk ([subport ]) as trunk :
109
106
self ._verify_trunk_info (trunk , has_items = True )
110
107
111
- def test_trunk_create_parent_port_bound (self ):
112
- with self .network () as network :
113
- with self .subnet (network = network ) as subnet :
114
- with self .port (subnet = subnet ) as parent_port :
115
- pb = port_obj .PortBinding .get_objects (
116
- self .context , port_id = parent_port ['port' ]['id' ])
117
- port_obj .PortBinding .update_object (
118
- self .context , {'vif_type' : portbindings .VIF_TYPE_OVS },
119
- port_id = pb [0 ].port_id , host = pb [0 ].host )
120
- tenant_id = uuidutils .generate_uuid ()
121
- trunk = {'trunk' : {
122
- 'port_id' : parent_port ['port' ]['id' ],
123
- 'tenant_id' : tenant_id , 'project_id' : tenant_id ,
124
- 'admin_state_up' : True ,
125
- 'name' : 'trunk' , 'sub_ports' : []}}
126
- self .assertRaises (n_exc .CallbackFailure ,
127
- self .trunk_plugin .create_trunk ,
128
- self .context , trunk )
129
-
130
108
def test_subport_add (self ):
131
109
with self .subport () as subport :
132
110
with self .trunk () as trunk :
@@ -149,14 +127,3 @@ def test_trunk_delete(self):
149
127
with self .trunk () as trunk :
150
128
self .trunk_plugin .delete_trunk (self .context , trunk ['id' ])
151
129
self ._verify_trunk_info ({}, has_items = False )
152
-
153
- def test_trunk_delete_parent_port_bound (self ):
154
- with self .trunk () as trunk :
155
- bp = port_obj .PortBinding .get_objects (
156
- self .context , port_id = trunk ['port_id' ])
157
- port_obj .PortBinding .update_object (
158
- self .context , {'vif_type' : portbindings .VIF_TYPE_OVS },
159
- port_id = bp [0 ].port_id , host = bp [0 ].host )
160
- self .assertRaises (n_exc .CallbackFailure ,
161
- self .trunk_plugin .delete_trunk ,
162
- self .context , trunk ['id' ])
0 commit comments