Revision 2005b18e kamaki/clients/cyclades.py
b/kamaki/clients/cyclades.py | ||
---|---|---|
225 | 225 |
|
226 | 226 |
:param nic_id: (str) |
227 | 227 |
""" |
228 |
server_nets = self.list_server_nics(server_id)
|
|
228 |
vm_nets = self.list_server_nics(server_id)
|
|
229 | 229 |
num_of_disconnections = 0 |
230 | 230 |
for (nic_id, network_id) in [( |
231 |
net['id'], |
|
232 |
net['network_id']) for net in server_nets if nic_id == net['id']]:
|
|
231 |
net['id'],
|
|
232 |
net['network_id']) for net in vm_nets if nic_id == net['id']]:
|
|
233 | 233 |
req = {'remove': {'attachment': unicode(nic_id)}} |
234 | 234 |
r = self.networks_post(network_id, 'action', json_data=req) |
235 | 235 |
r.release() |
Also available in: Unified diff