Update os_server for shade flavor API changes

Latest shade fixes the flavor API so that raw objects are not
returned.
This commit is contained in:
David Shrewsbury 2015-04-30 09:52:41 -04:00 committed by Matt Clay
parent cec3c8c209
commit dd6b153700

View file

@ -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(','),