Skip to content
Permalink
Browse files

use floatingip for ping

netcreate_nova_boot_fip_ping was never using floatingip to
ping as we always call boot_server_with_fip(use_floating_ip=None)

Neutron policy doenst allow users to create router with
external_gateway_info. So we use admin client but still
create router using user tenant id.

Change-Id: I03895c835f5e05daed95bc15f1d6e05acd1c0110
  • Loading branch information...
venkataanil committed Sep 18, 2019
1 parent 460f8a1 commit f752b4d463764d23d68aaa192df1019ac7c5c19e
Showing with 8 additions and 3 deletions.
  1. +8 −3 rally/rally-plugins/netcreate-boot/netcreate_nova_boot_fip_ping.py
@@ -31,7 +31,12 @@ class CreateNetworkNovaBootPing(vm_utils.VMScenario,

def run(self, image, flavor, ext_net_id, router_create_args=None,
network_create_args=None, subnet_create_args=None, **kwargs):
ext_net_name = None
if ext_net_id:
ext_net_name = self.clients("neutron").show_network(
ext_net_id)["network"]["name"]
router_create_args["name"] = self.generate_random_name()
router_create_args["tenant_id"] = self.context["tenant"]["id"]
router_create_args.setdefault("external_gateway_info",
{"network_id": ext_net_id, "enable_snat": True})
router = self._create_router(router_create_args)
@@ -40,8 +45,8 @@ def run(self, image, flavor, ext_net_id, router_create_args=None,
subnet = self._create_subnet(network, subnet_create_args or {})
self._add_interface_router(subnet['subnet'], router['router'])
kwargs["nics"] = [{'net-id': network['network']['id']}]
guest = self._boot_server_with_fip(image, flavor, True, None, **kwargs)

guest = self._boot_server_with_fip(image, flavor, True,
ext_net_name, **kwargs)
self._wait_for_ping(guest[1]['ip'])

@atomic.action_timer("neutron.create_router")
@@ -51,4 +56,4 @@ def _create_router(self, router_create_args):
:param router_create_args: POST /v2.0/routers request options
:returns: neutron router dict
"""
return self.clients("neutron").create_router({"router": router_create_args})
return self.admin_clients("neutron").create_router({"router": router_create_args})

0 comments on commit f752b4d

Please sign in to comment.
You can’t perform that action at this time.