Revision cd2b0bf5 snf-cyclades-app/synnefo/api/servers.py

b/snf-cyclades-app/synnefo/api/servers.py
137 137
        if metadata:
138 138
            d['metadata'] = {'values': metadata}
139 139

  
140
        attachments = [nic_to_dict(nic) for nic in vm.nics.all()]
140
        attachments = [nic_to_dict(nic) for nic in vm.nics.order_by('index')]
141 141
        if attachments:
142 142
            d['attachments'] = {'values': attachments}
143 143

  
......
226 226
    else:
227 227
        user_vms = user_vms.filter(deleted=False)
228 228

  
229
    servers = [vm_to_dict(server, detail) for server in user_vms]
229
    servers = [vm_to_dict(server, detail)\
230
               for server in user_vms.order_by('id')]
230 231

  
231 232
    if request.serialization == 'xml':
232 233
        data = render_to_string('list_servers.xml', {

Also available in: Unified diff