Revision cd2b0bf5 snf-cyclades-app/synnefo/api/networks.py
b/snf-cyclades-app/synnefo/api/networks.py | ||
---|---|---|
96 | 96 |
d['public'] = network.public |
97 | 97 |
|
98 | 98 |
attachments = [util.construct_nic_id(nic) |
99 |
for nic in network.nics.filter(machine__userid=user_id)] |
|
99 |
for nic in network.nics.filter(machine__userid=user_id)\ |
|
100 |
.order_by('machine')] |
|
100 | 101 |
d['attachments'] = {'values': attachments} |
101 | 102 |
return d |
102 | 103 |
|
... | ... | |
131 | 132 |
user_networks = user_networks.filter(deleted=False) |
132 | 133 |
|
133 | 134 |
networks = [network_to_dict(network, request.user_uniq, detail) |
134 |
for network in user_networks] |
|
135 |
for network in user_networks.order_by('id')]
|
|
135 | 136 |
|
136 | 137 |
if request.serialization == 'xml': |
137 | 138 |
data = render_to_string('list_networks.xml', { |
Also available in: Unified diff