Revision 9b47150e kamaki/clients/cyclades/__init__.py
b/kamaki/clients/cyclades/__init__.py | ||
---|---|---|
377 | 377 |
r = self.floating_ips_delete(fip_id) |
378 | 378 |
return r.headers |
379 | 379 |
|
380 |
def assoc_floating_ip_to_server(self, server_id, address):
|
|
380 |
def attach_floating_ip(self, server_id, address):
|
|
381 | 381 |
"""Associate the address ip to server with server_id |
382 | 382 |
|
383 | 383 |
:param server_id: (int) |
... | ... | |
393 | 393 |
:raises AssertionError: if address is emtpy |
394 | 394 |
""" |
395 | 395 |
server_id = int(server_id) |
396 |
assert address, 'address is needed for assoc_floating_ip_to_server'
|
|
396 |
assert address, 'address is needed for attach_floating_ip'
|
|
397 | 397 |
r = self.servers_post( |
398 | 398 |
server_id, 'action', |
399 | 399 |
json_data=dict(addFloatingIp=dict(address=address))) |
400 | 400 |
return r.headers |
401 | 401 |
|
402 |
def disassoc_floating_ip_to_server(self, server_id, address):
|
|
402 |
def detach_floating_ip(self, server_id, address):
|
|
403 | 403 |
"""Disassociate an address ip from the server with server_id |
404 | 404 |
|
405 | 405 |
:param server_id: (int) |
... | ... | |
415 | 415 |
:raises AssertionError: if address is emtpy |
416 | 416 |
""" |
417 | 417 |
server_id = int(server_id) |
418 |
assert address, 'address is needed for disassoc_floating_ip_to_server'
|
|
418 |
assert address, 'address is needed for detach_floating_ip'
|
|
419 | 419 |
r = self.servers_post( |
420 | 420 |
server_id, 'action', |
421 | 421 |
json_data=dict(removeFloatingIp=dict(address=address))) |
Also available in: Unified diff