Commit 3f974be4 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

cyclades: Always add attachments to server info

Update /servers API, to include attachments to /servers responses,
even if the server has no NICs.
parent 980be591
......@@ -143,8 +143,7 @@ def vm_to_dict(vm, detail=False):
vm_nics = vm.nics.filter(state="ACTIVE").order_by("index")
attachments = map(nic_to_dict, vm_nics)
if attachments:
d['attachments'] = {'values': attachments}
d['attachments'] = {'values': attachments}
# include the latest vm diagnostic, if set
diagnostic = vm.get_last_diagnostic()
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