Commit 2547b28a authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Use vm.flavor_id instead of vm.flavor.id

Get the ID of the flavor of the VM without getting the flavor object
from DB.
parent 7332ebb7
......@@ -33,6 +33,7 @@ Cyclades
* Fix a few occurrences of HTTP 500 errors being triggered due to insufficient
validation of incoming requests in the Network API
* Speed up some API calls by fixing the relevant DB queries
.. _Changelog-0.15rc4:
......
......@@ -178,8 +178,8 @@ def vm_to_dict(vm, detail=False):
d['hostId'] = vm.hostid
d['updated'] = utils.isoformat(vm.updated)
d['created'] = utils.isoformat(vm.created)
d['flavor'] = {"id": vm.flavor.id,
"links": util.flavor_to_links(vm.flavor.id)}
d['flavor'] = {"id": vm.flavor_id,
"links": util.flavor_to_links(vm.flavor_id)}
d['image'] = {"id": vm.imageid,
"links": util.image_to_links(vm.imageid)}
d['suspended'] = vm.suspended
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment