Merge "Use _create_network in _create_network_structure"
This commit is contained in:
commit
d85b6d6851
@ -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…
Reference in New Issue
Block a user