diff options
-rw-r--r-- | neutron_network | 10 | ||||
-rw-r--r-- | neutron_subnet | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/neutron_network b/neutron_network index 0f492be..9c8dc1c 100644 --- a/neutron_network +++ b/neutron_network @@ -121,10 +121,12 @@ _os_tenant_id = None def _get_ksclient(module, kwargs): try: - kclient = ksclient.Client(username=kwargs.get('login_username'), - password=kwargs.get('login_password'), - tenant_name=kwargs.get('login_tenant_name'), - auth_url=kwargs.get('auth_url')) + kclient = ksclient.Client( + username=module.params.get('login_username'), + password=module.params.get('login_password'), + tenant_name=module.params.get('login_tenant_name'), + auth_url=module.params.get('auth_url'), + region_name=module.params.get('region_name')) except Exception as e: module.fail_json(msg = "Error authenticating to the keystone: %s" %e.message) global _os_keystone diff --git a/neutron_subnet b/neutron_subnet index f666ef6..02e3da6 100644 --- a/neutron_subnet +++ b/neutron_subnet @@ -131,10 +131,12 @@ _os_network_id = None def _get_ksclient(module, kwargs): try: - kclient = ksclient.Client(username=kwargs.get('login_username'), - password=kwargs.get('login_password'), - tenant_name=kwargs.get('login_tenant_name'), - auth_url=kwargs.get('auth_url')) + kclient = ksclient.Client( + username=module.params.get('login_username'), + password=module.params.get('login_password'), + tenant_name=module.params.get('login_tenant_name'), + auth_url=module.params.get('auth_url'), + region_name=module.params.get('region_name')) except Exception as e: module.fail_json(msg = "Error authenticating to the keystone: %s" %e.message) global _os_keystone |