diff --git a/rally/plugins/openstack/scenarios/neutron/utils.py b/rally/plugins/openstack/scenarios/neutron/utils.py index fab4def8e2..a320031162 100755 --- a/rally/plugins/openstack/scenarios/neutron/utils.py +++ b/rally/plugins/openstack/scenarios/neutron/utils.py @@ -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) diff --git a/tests/unit/plugins/openstack/scenarios/neutron/test_utils.py b/tests/unit/plugins/openstack/scenarios/neutron/test_utils.py index d41db8ec1d..1b54e8aae9 100755 --- a/tests/unit/plugins/openstack/scenarios/neutron/test_utils.py +++ b/tests/unit/plugins/openstack/scenarios/neutron/test_utils.py @@ -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,