From 81e5aa6fac01f3018d1e17ab09f20fe5d53aea20 Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Mon, 21 Nov 2016 10:53:48 -0600 Subject: [PATCH] Add region awareness to the neutron ha tool This change adds region awareness to the neutron l3ha tool which allows for l3 failover in the event the l3ha is not enaabled. Change-Id: I00e4884f8810fad31f40f82e6489e4dc775fdcac Signed-off-by: Kevin Carter --- templates/neutron-ha-tool.py.j2 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/neutron-ha-tool.py.j2 b/templates/neutron-ha-tool.py.j2 index eed9a0c1..806ae82d 100644 --- a/templates/neutron-ha-tool.py.j2 +++ b/templates/neutron-ha-tool.py.j2 @@ -153,6 +153,9 @@ def run(args): kclient_kwargs['insecure'] = args.insecure kclient_kwargs['ca_cert'] = ca kclient_kwargs['auth_url'] = os.environ['OS_AUTH_URL'] + # Set the region if one is defined + if 'OS_REGION_NAME' in os.environ: + kclient_kwargs['region_name'] = os.environ['OS_REGION_NAME'] tenant_name = os.getenv('OS_TENANT_NAME') if tenant_name and auth_version != 3: