diff options
author | Lénaïc Huard <lhuard@amadeus.com> | 2016-09-29 10:30:23 +0200 |
---|---|---|
committer | Lénaïc Huard <lhuard@amadeus.com> | 2016-09-29 10:30:23 +0200 |
commit | 4d90cd08d850b5916c93adecbea5b4dcbb22c140 (patch) | |
tree | 5f532e018b38b6dbc6473aae38eaea8e48fcbce8 /bin | |
parent | 7f1a3f99fc39265e39054e5de1a8d6e29f0d63b8 (diff) | |
download | openshift-4d90cd08d850b5916c93adecbea5b4dcbb22c140.tar.gz openshift-4d90cd08d850b5916c93adecbea5b4dcbb22c140.tar.bz2 openshift-4d90cd08d850b5916c93adecbea5b4dcbb22c140.tar.xz openshift-4d90cd08d850b5916c93adecbea5b4dcbb22c140.zip |
Set the DomainName or DomainID in the OpenStack cloud provider
Whereas with the OpenStack keystone v2 authentication API, the username and
the password are enough, the keystone v3 API requires an additional domain
parameter.
Fixes #2515
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/cluster | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/bin/cluster b/bin/cluster index 92174954f..68d2a7cd4 100755 --- a/bin/cluster +++ b/bin/cluster @@ -73,9 +73,16 @@ class Cluster(object): cluster['openshift_cloudprovider_openstack_auth_url'] = os.getenv('OS_AUTH_URL') cluster['openshift_cloudprovider_openstack_username'] = os.getenv('OS_USERNAME') cluster['openshift_cloudprovider_openstack_password'] = os.getenv('OS_PASSWORD') - cluster['openshift_cloudprovider_openstack_tenant_id'] = os.getenv('OS_PROJECT_ID',os.getenv('OS_TENANT_ID')) - cluster['openshift_cloudprovider_openstack_tenant_name'] = os.getenv('OS_PROJECT_NAME',os.getenv('OS_TENANT_NAME')) - cluster['openshift_cloudprovider_openstack_region'] = os.getenv('OS_REGION_NAME') + if 'OS_USER_DOMAIN_ID' in os.environ: + cluster['openshift_cloudprovider_openstack_domain_id'] = os.getenv('OS_USER_DOMAIN_ID') + if 'OS_USER_DOMAIN_NAME' in os.environ: + cluster['openshift_cloudprovider_openstack_domain_name'] = os.getenv('OS_USER_DOMAIN_NAME') + if 'OS_PROJECT_ID' in os.environ or 'OS_TENANT_ID' in os.environ: + cluster['openshift_cloudprovider_openstack_tenant_id'] = os.getenv('OS_PROJECT_ID',os.getenv('OS_TENANT_ID')) + if 'OS_PROJECT_NAME' is os.environ or 'OS_TENANT_NAME' in os.environ: + cluster['openshift_cloudprovider_openstack_tenant_name'] = os.getenv('OS_PROJECT_NAME',os.getenv('OS_TENANT_NAME')) + if 'OS_REGION_NAME' in os.environ: + cluster['openshift_cloudprovider_openstack_region'] = os.getenv('OS_REGION_NAME') self.action(args, inventory, cluster, playbook) |