Adapt bgpvpn scenario tests for tempest's scenario manager
Related-Issue: PRODX-35662
Change-Id: If7b60352299807f76bde1d39443a23c587d123d6
(cherry picked from commit c127602a68b2f0a6eb893a560ab06c981e1e1c46)
diff --git a/neutron_tempest_plugin/bgpvpn/scenario/manager.py b/neutron_tempest_plugin/bgpvpn/scenario/manager.py
index 297d6b6..f5e9bf2 100644
--- a/neutron_tempest_plugin/bgpvpn/scenario/manager.py
+++ b/neutron_tempest_plugin/bgpvpn/scenario/manager.py
@@ -223,9 +223,9 @@
if not subnet_cidrs:
subnet_cidrs = [[NET_A_S1], [NET_B_S1], [NET_C_S1]]
for (name, subnet_cidrs) in zip(names, subnet_cidrs):
- network = super(manager.NetworkScenarioTest,
- self).create_network(namestart=name,
- port_security_enabled=port_security)
+ network = super(NetworkScenarioTest, self).create_network(
+ namestart=name,
+ port_security_enabled=port_security)
self.networks[name] = network
self.subnets[name] = []
for (j, cidr) in enumerate(subnet_cidrs):
@@ -293,10 +293,10 @@
'namestart': 'port-smoke',
'security_groups': security_groups}
- port = super(manager.NetworkScenarioTest,
- self).create_port(network_id=network['id'],
- client=clients.ports_client,
- **create_port_body)
+ port = super(NetworkScenarioTest, self).create_port(
+ network_id=network['id'],
+ client=clients.ports_client,
+ **create_port_body)
create_server_kwargs = {
'key_name': keypair['name'],
@@ -508,8 +508,6 @@
kwargs = dict()
block_migration = getattr(self, 'block_migration', None)
if self.block_migration is None:
- if self.is_requested_microversion_compatible('2.24'):
- kwargs['disk_over_commit'] = False
block_migration = (CONF.compute_feature_enabled.
block_migration_for_live_migration and
not volume_backed)
diff --git a/neutron_tempest_plugin/bgpvpn/scenario/test_bgpvpn_advanced.py b/neutron_tempest_plugin/bgpvpn/scenario/test_bgpvpn_advanced.py
index c7b2f8f..d73ba36 100644
--- a/neutron_tempest_plugin/bgpvpn/scenario/test_bgpvpn_advanced.py
+++ b/neutron_tempest_plugin/bgpvpn/scenario/test_bgpvpn_advanced.py
@@ -33,9 +33,7 @@
class TestBGPVPNAdvanced(base.BaseBgpvpnTest, manager.NetworkScenarioTest):
def setUp(self):
super(TestBGPVPNAdvanced, self).setUp()
- self.security_group = self._create_security_group(
- tenant_id=self.bgpvpn_client.tenant_id
- )
+ self._create_security_group_for_test()
@decorators.idempotent_id("734213fb-8213-487d-9fe3-c8ff31758e18")
@utils.services("compute", "network")
@@ -98,7 +96,7 @@
def _create_networks_and_subnets(
self, name="bgp", subnet_cidr=None, port_security=True
):
- self.network = self._create_network(
+ self.network = super(manager.NetworkScenarioTest, self).create_network(
namestart=name, port_security_enabled=port_security
)
self.subnet = self._create_subnet_with_cidr(
@@ -160,7 +158,7 @@
"fixed_ips": [{"ip_address": ip_address}],
"namestart": "port-endpoint",
}
- self._create_port(
+ super(manager.NetworkScenarioTest, self).create_port(
network_id=self.network["id"],
client=clients.ports_client,
**create_port_kwargs