Merge "Rename create_networks to correct name as per its functionality"

This commit is contained in:
Zuul 2021-03-26 12:49:48 +00:00 committed by Gerrit Code Review
commit 405066cd4a
5 changed files with 10 additions and 8 deletions

View File

@ -1493,7 +1493,8 @@ class NetworkScenarioTest(ScenarioTest):
raise Exception("Neither of 'public_router_id' or " raise Exception("Neither of 'public_router_id' or "
"'public_network_id' has been defined.") "'public_network_id' has been defined.")
def create_networks(self, networks_client=None, def setup_network_subnet_with_router(
self, networks_client=None,
routers_client=None, subnets_client=None, routers_client=None, subnets_client=None,
project_id=None, dns_nameservers=None, project_id=None, dns_nameservers=None,
port_security_enabled=True, **net_dict): port_security_enabled=True, **net_dict):

View File

@ -128,7 +128,7 @@ class MinBwAllocationPlacementTest(manager.NetworkScenarioTest):
base_segm = \ base_segm = \
CONF.network_feature_enabled.provider_net_base_segmentation_id CONF.network_feature_enabled.provider_net_base_segmentation_id
self.prov_network, _, _ = self.create_networks( self.prov_network, _, _ = self.setup_network_subnet_with_router(
networks_client=self.networks_client, networks_client=self.networks_client,
routers_client=self.routers_client, routers_client=self.routers_client,
subnets_client=self.subnets_client, subnets_client=self.subnets_client,

View File

@ -62,7 +62,7 @@ class TestNetworkAdvancedServerOps(manager.NetworkScenarioTest):
if utils.is_extension_enabled('security-group', 'network'): if utils.is_extension_enabled('security-group', 'network'):
security_group = self.create_security_group() security_group = self.create_security_group()
security_groups = [{'name': security_group['name']}] security_groups = [{'name': security_group['name']}]
network, _, _ = self.create_networks() network, _, _ = self.setup_network_subnet_with_router()
server = self.create_server( server = self.create_server(
networks=[{'uuid': network['id']}], networks=[{'uuid': network['id']}],
key_name=keypair['name'], key_name=keypair['name'],

View File

@ -106,7 +106,8 @@ class TestNetworkBasicOps(manager.NetworkScenarioTest):
def _setup_network_and_servers(self, **kwargs): def _setup_network_and_servers(self, **kwargs):
boot_with_port = kwargs.pop('boot_with_port', False) boot_with_port = kwargs.pop('boot_with_port', False)
self.network, self.subnet, self.router = self.create_networks(**kwargs) self.network, self.subnet, self.router = (
self.setup_network_subnet_with_router(**kwargs))
self.check_networks() self.check_networks()
self.ports = [] self.ports = []

View File

@ -326,7 +326,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
self.floating_ips.setdefault(server['id'], floating_ip) self.floating_ips.setdefault(server['id'], floating_ip)
def _create_tenant_network(self, tenant, port_security_enabled=True): def _create_tenant_network(self, tenant, port_security_enabled=True):
network, subnet, router = self.create_networks( network, subnet, router = self.setup_network_subnet_with_router(
networks_client=tenant.manager.networks_client, networks_client=tenant.manager.networks_client,
routers_client=tenant.manager.routers_client, routers_client=tenant.manager.routers_client,
subnets_client=tenant.manager.subnets_client, subnets_client=tenant.manager.subnets_client,