Revision ef2e6c9f kamaki/clients/cyclades/__init__.py
b/kamaki/clients/cyclades/__init__.py | ||
---|---|---|
81 | 81 |
:returns: (dict) response headers |
82 | 82 |
""" |
83 | 83 |
req = {'start': {}} |
84 |
r = self.servers_post(server_id, 'action', json_data=req, success=202)
|
|
84 |
r = self.servers_action_post(server_id, json_data=req, success=202)
|
|
85 | 85 |
return r.headers |
86 | 86 |
|
87 | 87 |
def shutdown_server(self, server_id): |
... | ... | |
92 | 92 |
:returns: (dict) response headers |
93 | 93 |
""" |
94 | 94 |
req = {'shutdown': {}} |
95 |
r = self.servers_post(server_id, 'action', json_data=req, success=202)
|
|
95 |
r = self.servers_action_post(server_id, json_data=req, success=202)
|
|
96 | 96 |
return r.headers |
97 | 97 |
|
98 | 98 |
def get_server_console(self, server_id): |
... | ... | |
102 | 102 |
:returns: (dict) info to set a VNC connection to VM |
103 | 103 |
""" |
104 | 104 |
req = {'console': {'type': 'vnc'}} |
105 |
r = self.servers_post(server_id, 'action', json_data=req, success=200)
|
|
105 |
r = self.servers_action_post(server_id, json_data=req, success=200)
|
|
106 | 106 |
return r.json['console'] |
107 | 107 |
|
108 | 108 |
def get_firewall_profile(self, server_id): |
... | ... | |
131 | 131 |
:returns: (dict) response headers |
132 | 132 |
""" |
133 | 133 |
req = {'firewallProfile': {'profile': profile}} |
134 |
r = self.servers_post(server_id, 'action', json_data=req, success=202)
|
|
134 |
r = self.servers_action_post(server_id, json_data=req, success=202)
|
|
135 | 135 |
return r.headers |
136 | 136 |
|
137 | 137 |
def list_servers(self, detail=False, changes_since=None): |
... | ... | |
463 | 463 |
""" |
464 | 464 |
server_id = int(server_id) |
465 | 465 |
assert address, 'address is needed for attach_floating_ip' |
466 |
r = self.servers_post( |
|
467 |
server_id, 'action', |
|
468 |
json_data=dict(addFloatingIp=dict(address=address))) |
|
466 |
req = dict(addFloatingIp=dict(address=address)) |
|
467 |
r = self.servers_action_post(server_id, json_data=req) |
|
469 | 468 |
return r.headers |
470 | 469 |
|
471 | 470 |
def detach_floating_ip(self, server_id, address): |
... | ... | |
485 | 484 |
""" |
486 | 485 |
server_id = int(server_id) |
487 | 486 |
assert address, 'address is needed for detach_floating_ip' |
488 |
r = self.servers_post( |
|
489 |
server_id, 'action', |
|
490 |
json_data=dict(removeFloatingIp=dict(address=address))) |
|
487 |
req = dict(removeFloatingIp=dict(address=address)) |
|
488 |
r = self.servers_action_post(server_id, json_data=req) |
|
491 | 489 |
return r.headers |
Also available in: Unified diff