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 <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2016-11-21 10:53:48 -06:00
parent a78ade78a8
commit 81e5aa6fac
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F

View File

@ -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: