Revert "Fix scenario test fails when port_vnic_type is set"
This reverts commit 0a03b7a37a20c206932206eea8602d9f4b009ae9.
It looks we broke a working CI which tests SRIOV. Revert this and then
figure what happened. Note: in the future it would be great to have
these external CI publish their results.
Change-Id: I52f7ae49ccd08ce6badb45f201d83c6af172bafe
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index fefd9c5..03e572f 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -1077,11 +1077,6 @@
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
diff --git a/tempest/scenario/test_network_basic_ops.py b/tempest/scenario/test_network_basic_ops.py
index d643485..ff58eea 100644
--- a/tempest/scenario/test_network_basic_ops.py
+++ b/tempest/scenario/test_network_basic_ops.py
@@ -101,7 +101,6 @@
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 @@
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