From 42885dc94176eecca1619d7e9c33b5ab3d9a2c0a Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 29 Aug 2016 17:49:46 -0500 Subject: [PATCH] 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 --- os_client_config/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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."