Revision 09471611 tools/cloud
b/tools/cloud | ||
---|---|---|
231 | 231 |
self.http_post(path, body) |
232 | 232 |
|
233 | 233 |
|
234 |
@command_name('console') |
|
235 |
class ServerConsole(Command): |
|
236 |
description = 'get VNC console' |
|
237 |
syntax = '<server id>' |
|
238 |
|
|
239 |
def add_options(self, parser): |
|
240 |
pass |
|
241 |
|
|
242 |
def execute(self, server_id): |
|
243 |
path = '/api/%s/servers/%d/action' % (self.api, int(server_id)) |
|
244 |
body = json.dumps({'console':{'type':'VNC'}}) |
|
245 |
reply = self.http_post(path, body) |
|
246 |
print_dict(reply) |
|
247 |
|
|
248 |
|
|
234 | 249 |
@command_name('lsaddr') |
235 | 250 |
class ListAddresses(Command): |
236 | 251 |
description = 'list server addresses' |
Also available in: Unified diff