diff options
author | Ghe Rivero <ghe.rivero@hp.com> | 2015-06-04 11:21:38 +0200 |
---|---|---|
committer | Ghe Rivero <ghe.rivero@hp.com> | 2015-06-05 16:19:12 +0200 |
commit | b1e562c3e59f64118d184e8655c7bfe343a09cdc (patch) | |
tree | 8aa00d6bc3deea1babf43c7ba713ffe26b616e00 | |
parent | acc2cbdc98a80c71be4e1f55580914b9fdf8d4ab (diff) | |
download | os-client-config-b1e562c3e59f64118d184e8655c7bfe343a09cdc.tar.gz |
Change references of "clouds.yaml" for real file
The config file clouds.yaml can be located in several places, and
even the file extension can be .yml. Replace all user visible
messages making reference for that file to show the full path
of the config file used.
Change-Id: I489d87368b72dfe69b7d4e3c07ba5d5249c45667
-rw-r--r-- | os_client_config/config.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py index fa18433..dd80e2a 100644 --- a/os_client_config/config.py +++ b/os_client_config/config.py @@ -120,10 +120,11 @@ class OpenStackConfig(object): self.envvar_key = os.environ.pop('OS_CLOUD_NAME', 'envvars') if self.envvar_key in self.cloud_config['clouds']: raise exceptions.OpenStackConfigException( - 'clouds.yaml defines a cloud named "{0}", but' - ' OS_CLOUD_NAME is also set to "{0}". Please rename' + '"{0}" defines a cloud named "{1}", but' + ' OS_CLOUD_NAME is also set to "{1}". Please rename' ' either your environment based cloud, or one of your' - ' file-based clouds.'.format(self.envvar_key)) + ' file-based clouds.'.format(self.config_filename, + self.envvar_key)) envvars = _get_os_environ() if envvars: @@ -220,9 +221,9 @@ class OpenStackConfig(object): if profile_name: if 'cloud' in our_cloud: warnings.warn( - "clouds.yaml use the keyword 'cloud' to reference a known " + "{0} use the keyword 'cloud' to reference a known " "vendor profile. This has been deprecated in favor of the " - "'profile' keyword.") + "'profile' keyword.".format(self.config_filename)) 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]) |