Use _create_network in _create_network_structure
Similar to the change in I254dbd166a79ca07e18a61da92bc536b035452e1, we should be creating individual networks for each call to this method rather than cramming a bunch of subnets into a single network. This function is called by the router scenarios, which should be using their own individual networks to match real deployment topologies. Change-Id: I032ddc818abe2ac156169b2ed82fc0049319fb9a
This commit is contained in:
parent
cd16f8b85c
commit
b77b977201
@ -348,7 +348,7 @@ class NeutronScenario(scenario.OpenStackScenario):
|
||||
:param router_create_args: dict, POST /v2.0/routers request options
|
||||
:returns: tuple of (network, subnets, routers)
|
||||
"""
|
||||
network = self._get_or_create_network(network_create_args)
|
||||
network = self._create_network(network_create_args or {})
|
||||
subnets = self._create_subnets(network, subnet_create_args,
|
||||
subnet_cidr_start,
|
||||
subnets_per_network)
|
||||
|
@ -533,7 +533,7 @@ class NeutronScenarioTestCase(test.ScenarioTestCase):
|
||||
routers.append(mock.MagicMock())
|
||||
router_create_calls.append(mock.call(router_create_args))
|
||||
|
||||
self.scenario._get_or_create_network = mock.Mock(return_value=network)
|
||||
self.scenario._create_network = mock.Mock(return_value=network)
|
||||
self.scenario._create_subnets = mock.Mock(return_value=subnets)
|
||||
self.scenario._create_router = mock.Mock(side_effect=routers)
|
||||
self.scenario._add_interface_router = mock.Mock()
|
||||
@ -544,8 +544,8 @@ class NeutronScenarioTestCase(test.ScenarioTestCase):
|
||||
subnets_per_network,
|
||||
router_create_args)
|
||||
self.assertEqual(actual, (network, subnets, routers))
|
||||
self.scenario._get_or_create_network.assert_called_once_with(
|
||||
network_create_args)
|
||||
self.scenario._create_network.assert_called_once_with(
|
||||
network_create_args or {})
|
||||
self.scenario._create_subnets.assert_called_once_with(
|
||||
network,
|
||||
subnet_create_args,
|
||||
|
Loading…
x
Reference in New Issue
Block a user