summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--os_client_config/config.py1
-rw-r--r--os_client_config/tests/test_config.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py
index 37a31f8..7fa670f 100644
--- a/os_client_config/config.py
+++ b/os_client_config/config.py
@@ -562,6 +562,7 @@ class OpenStackConfig(object):
for key in possible_values:
if target_key in cloud['auth'] and key not in cloud['auth']:
cloud['auth'][key] = cloud['auth'][target_key]
+ cloud.pop(target_key, None)
cloud['auth'].pop(target_key, None)
return cloud
diff --git a/os_client_config/tests/test_config.py b/os_client_config/tests/test_config.py
index 5008878..baa35cd 100644
--- a/os_client_config/tests/test_config.py
+++ b/os_client_config/tests/test_config.py
@@ -102,6 +102,7 @@ class TestConfig(base.TestCase):
self.assertEqual('123456789', cc.auth['project_domain_id'])
self.assertNotIn('domain_id', cc.auth)
self.assertNotIn('domain-id', cc.auth)
+ self.assertNotIn('domain_id', cc)
def test_get_one_cloud_domain_scoped(self):
c = config.OpenStackConfig(config_files=[self.cloud_yaml],
@@ -118,6 +119,7 @@ class TestConfig(base.TestCase):
self.assertEqual('awesome-domain', cc.auth['user_domain_id'])
self.assertEqual('awesome-domain', cc.auth['project_domain_id'])
self.assertNotIn('domain_id', cc.auth)
+ self.assertNotIn('domain_id', cc)
def test_get_one_cloud_with_hyphenated_project_id(self):
c = config.OpenStackConfig(config_files=[self.cloud_yaml],