Merge "Revert "Fix scenario test fails when port_vnic_type is set""
This commit is contained in:
commit
c09fd74805
@ -1080,11 +1080,6 @@ class NetworkScenarioTest(ScenarioTest):
|
||||
port = self._create_port(network_id=net_id,
|
||||
client=net_client,
|
||||
**create_port_body)
|
||||
# if port_vnic_type is set, ports in the passing
|
||||
# create_kwargs will be override, which cause the
|
||||
# inconsistence. Set the port_id according to network id
|
||||
if net_id == self.network['id']:
|
||||
self.port_id = port.id
|
||||
ports.append({'port': port.id})
|
||||
if ports:
|
||||
create_kwargs['networks'] = ports
|
||||
|
@ -101,7 +101,6 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
|
||||
self.servers = []
|
||||
|
||||
def _setup_network_and_servers(self, **kwargs):
|
||||
vnic_type = CONF.network.port_vnic_type
|
||||
boot_with_port = kwargs.pop('boot_with_port', False)
|
||||
self.security_group = \
|
||||
self._create_security_group(tenant_id=self.tenant_id)
|
||||
@ -109,9 +108,7 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
|
||||
self.check_networks()
|
||||
|
||||
self.port_id = None
|
||||
# when vnic_type is set, ports will be created in create_server.
|
||||
# So no need to create a port here in this case.
|
||||
if boot_with_port and not vnic_type:
|
||||
if boot_with_port:
|
||||
# create a port on the network and boot with that
|
||||
self.port_id = self._create_port(self.network['id']).id
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user