From dd6b15370055c43c08062ac5cfcb7e400ae2566a Mon Sep 17 00:00:00 2001 From: David Shrewsbury Date: Thu, 30 Apr 2015 09:52:41 -0400 Subject: [PATCH] Update os_server for shade flavor API changes Latest shade fixes the flavor API so that raw objects are not returned. --- lib/ansible/modules/cloud/openstack/os_server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/cloud/openstack/os_server.py b/lib/ansible/modules/cloud/openstack/os_server.py index bfd9bba16e7..8d42471a891 100644 --- a/lib/ansible/modules/cloud/openstack/os_server.py +++ b/lib/ansible/modules/cloud/openstack/os_server.py @@ -279,16 +279,16 @@ def _create_server(module, cloud): module.params['image'], module.params['image_exclude']) if flavor: - flavor_id = cloud.get_flavor(flavor) + flavor_dict = cloud.get_flavor(flavor) else: - flavor_id = cloud.get_flavor_by_ram(flavor_ram, flavor_include) + flavor_dict = cloud.get_flavor_by_ram(flavor_ram, flavor_include) nics = _network_args(module, cloud) bootkwargs = dict( name=module.params['name'], image=image_id, - flavor=flavor_id, + flavor=flavor_dict['id'], nics=nics, meta=module.params['meta'], security_groups=module.params['security_groups'].split(','),