diff options
author | Monty Taylor <mordred@inaugust.com> | 2016-08-29 17:49:46 -0500 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2016-08-29 17:49:46 -0500 |
commit | 42885dc94176eecca1619d7e9c33b5ab3d9a2c0a (patch) | |
tree | b13ee04abd0ea18a1d7dbe65126740c0d99071c5 | |
parent | 2b52bcf6943369fe96db3aefe2ee7473dd51b934 (diff) | |
download | os-client-config-42885dc94176eecca1619d7e9c33b5ab3d9a2c0a.tar.gz |
Go ahead and handle YAML list in region_name1.21.1
The right thing is to use "regions" as a yaml list. However, it's even
more right to be friendly to people - we emit a warning about
region_name as a list anyway.
Change-Id: Ia0b27ef8d1d52c655c2736a97bd5e59a4a2fe9d8
-rw-r--r-- | os_client_config/config.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/os_client_config/config.py b/os_client_config/config.py index 54048aa..6eed0f0 100644 --- a/os_client_config/config.py +++ b/os_client_config/config.py @@ -388,7 +388,10 @@ class OpenStackConfig(object): if 'regions' in config: return self._expand_regions(config['regions']) elif 'region_name' in config: - regions = config['region_name'].split(',') + if isinstance(config['region_name'], list): + regions = config['region_name'] + else: + regions = config['region_name'].split(',') if len(regions) > 1: warnings.warn( "Comma separated lists in region_name are deprecated." |