Fix bug around usage of --region flag

We didn't properly setup the openstack connection with region
informaiton.

Change-Id: I6daf47f404ef5c8f651168832a61db5196767075
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
Paul Belanger 2019-03-04 12:59:02 -05:00
parent 0bf2d68fa6
commit f69b6d922d
1 changed files with 2 additions and 2 deletions

View File

@ -221,10 +221,10 @@ def main():
openstack.enable_logging(debug=options.verbose)
cloud_kwargs = None
cloud_kwargs = {}
if options.region:
cloud_kwargs['region_name'] = options.region
cloud = openstack.connect(cloud=options.cloud)
cloud = openstack.connect(cloud=options.cloud, **cloud_kwargs)
flavor = cloud.get_flavor(options.flavor)
if flavor: