Go ahead and handle YAML list in region_name

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
This commit is contained in:
Monty Taylor 2016-08-29 17:49:46 -05:00
parent 2b52bcf694
commit 42885dc941
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 4 additions and 1 deletions

View File

@ -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."