From 5048748e0a510cb29e1a7a46a009b359528a8309 Mon Sep 17 00:00:00 2001 From: Davide Guerri Date: Mon, 20 Apr 2015 15:04:45 +0100 Subject: Add missing region_name in keystone auth --- neutron_network | 10 ++++++---- 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 -- cgit v1.2.1