mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Adding openstack multiregion support
This commit is contained in:
parent
4699e5b905
commit
9f30125876
1 changed files with 3 additions and 2 deletions
|
@ -96,7 +96,8 @@ def _get_ksclient(module, kwargs):
|
||||||
kclient = ksclient.Client(username=kwargs.get('login_username'),
|
kclient = ksclient.Client(username=kwargs.get('login_username'),
|
||||||
password=kwargs.get('login_password'),
|
password=kwargs.get('login_password'),
|
||||||
tenant_name=kwargs.get('login_tenant_name'),
|
tenant_name=kwargs.get('login_tenant_name'),
|
||||||
auth_url=kwargs.get('auth_url'))
|
auth_url=kwargs.get('auth_url'),
|
||||||
|
region_name=kwargs.get('region_name'))
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
module.fail_json(msg = "Error authenticating to the keystone: %s " % e.message)
|
module.fail_json(msg = "Error authenticating to the keystone: %s " % e.message)
|
||||||
global _os_keystone
|
global _os_keystone
|
||||||
|
@ -231,7 +232,7 @@ def main():
|
||||||
|
|
||||||
try:
|
try:
|
||||||
nova = nova_client.Client(module.params['login_username'], module.params['login_password'],
|
nova = nova_client.Client(module.params['login_username'], module.params['login_password'],
|
||||||
module.params['login_tenant_name'], module.params['auth_url'], service_type='compute')
|
module.params['login_tenant_name'], module.params['auth_url'], region_name=module.params['region_name'], service_type='compute')
|
||||||
neutron = _get_neutron_client(module, module.params)
|
neutron = _get_neutron_client(module, module.params)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
module.fail_json(msg="Error in authenticating to nova: %s" % e.message)
|
module.fail_json(msg="Error in authenticating to nova: %s" % e.message)
|
||||||
|
|
Loading…
Reference in a new issue