Update os_server for shade flavor API changes

Latest shade fixes the flavor API so that raw objects are not
returned.
pull/18777/head
David Shrewsbury 10 years ago committed by Matt Clay
parent cec3c8c209
commit dd6b153700

@ -279,16 +279,16 @@ def _create_server(module, cloud):
module.params['image'], module.params['image_exclude']) module.params['image'], module.params['image_exclude'])
if flavor: if flavor:
flavor_id = cloud.get_flavor(flavor) flavor_dict = cloud.get_flavor(flavor)
else: 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) nics = _network_args(module, cloud)
bootkwargs = dict( bootkwargs = dict(
name=module.params['name'], name=module.params['name'],
image=image_id, image=image_id,
flavor=flavor_id, flavor=flavor_dict['id'],
nics=nics, nics=nics,
meta=module.params['meta'], meta=module.params['meta'],
security_groups=module.params['security_groups'].split(','), security_groups=module.params['security_groups'].split(','),

Loading…
Cancel
Save