Fix router GW creation

Routers created without setting GW properly.

Closes-bug: #1405559
Change-Id: I99da8572f1ec82e8e820168d20577239f6d7b6fb
This commit is contained in:
Yair Fried 2014-12-24 18:28:05 +02:00
parent 6e561c054b
commit a6a08118bd
2 changed files with 4 additions and 4 deletions
rally/benchmark/wrappers
tests/unit/benchmark/wrappers

@ -141,7 +141,7 @@ class NeutronWrapper(NetworkWrapper):
"name": utils.generate_random_name("rally_ctx_router_")}}
for net in self.list_networks():
if net.get("router:external"):
router_args["external_gateway_info"] = {
router_args["router"]["external_gateway_info"] = {
"network_id": net["id"],
"enable_snat": True}
break

@ -205,9 +205,9 @@ class NeutronWrapperTestCase(test.TestCase):
"router_id": "foo_router",
"subnets": []})
service.client.create_router.assert_called_once_with(
{"router": {"tenant_id": "foo_tenant", "name": "foo_name"},
"external_gateway_info": {"network_id": "bar_id",
"enable_snat": True}})
{"router": {"tenant_id": "foo_tenant", "name": "foo_name",
"external_gateway_info": {"network_id": "bar_id",
"enable_snat": True}}})
@mock.patch("rally.utils.generate_random_name")
def test_create_network_with_router_and_subnets(self, mock_name):