summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhe Rivero <ghe.rivero@hp.com>2015-06-04 10:24:58 +0200
committerGhe Rivero <ghe.rivero@hp.com>2015-06-04 10:24:58 +0200
commitacc2cbdc98a80c71be4e1f55580914b9fdf8d4ab (patch)
tree1e8ef834385b9093c723f30a86f8c1eaabb688a5
parent038ddd38185ace24e96017b3d638952a397e61c6 (diff)
downloados-client-config-acc2cbdc98a80c71be4e1f55580914b9fdf8d4ab.tar.gz
Raise a warning when using 'cloud' in config
The former use of 'cloud' in the config file, was changed in favor of 'profile' to avoid confusions. Change-Id: Iba08746a06ebb397ee1d0f59d5cda41db2b86053
-rw-r--r--os_client_config/config.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py
index b323e70..fa18433 100644
--- a/os_client_config/config.py
+++ b/os_client_config/config.py
@@ -14,6 +14,7 @@
import os
+import warnings
import appdirs
import yaml
@@ -217,6 +218,11 @@ class OpenStackConfig(object):
# for this.
profile_name = our_cloud.get('profile', our_cloud.get('cloud', None))
if profile_name:
+ if 'cloud' in our_cloud:
+ warnings.warn(
+ "clouds.yaml use the keyword 'cloud' to reference a known "
+ "vendor profile. This has been deprecated in favor of the "
+ "'profile' keyword.")
vendor_filename, vendor_file = self._load_vendor_file()
if vendor_file and profile_name in vendor_file['public-clouds']:
_auth_update(cloud, vendor_file['public-clouds'][profile_name])