Revision b3b32add kamaki/cli.py
b/kamaki/cli.py | ||
---|---|---|
257 | 257 |
self.client.reboot_server(int(server_id), self.options.hard) |
258 | 258 |
|
259 | 259 |
|
260 |
@command(api='asterias')
|
|
260 |
@command(api='cyclades')
|
|
261 | 261 |
class server_start(object): |
262 | 262 |
"""start server""" |
263 | 263 |
|
... | ... | |
265 | 265 |
self.client.start_server(int(server_id)) |
266 | 266 |
|
267 | 267 |
|
268 |
@command(api='asterias')
|
|
268 |
@command(api='cyclades')
|
|
269 | 269 |
class server_shutdown(object): |
270 | 270 |
"""shutdown server""" |
271 | 271 |
|
... | ... | |
273 | 273 |
self.client.shutdown_server(int(server_id)) |
274 | 274 |
|
275 | 275 |
|
276 |
@command(api='asterias')
|
|
276 |
@command(api='cyclades')
|
|
277 | 277 |
class server_console(object): |
278 | 278 |
"""get a VNC console""" |
279 | 279 |
|
... | ... | |
282 | 282 |
print_dict(reply) |
283 | 283 |
|
284 | 284 |
|
285 |
@command(api='asterias')
|
|
285 |
@command(api='cyclades')
|
|
286 | 286 |
class server_firewall(object): |
287 | 287 |
"""set the firewall profile""" |
288 | 288 |
|
... | ... | |
290 | 290 |
self.client.set_firewall_profile(int(server_id), profile) |
291 | 291 |
|
292 | 292 |
|
293 |
@command(api='asterias')
|
|
293 |
@command(api='cyclades')
|
|
294 | 294 |
class server_addr(object): |
295 | 295 |
"""list server addresses""" |
296 | 296 |
|
... | ... | |
336 | 336 |
self.client.delete_server_metadata(int(server_id), key) |
337 | 337 |
|
338 | 338 |
|
339 |
@command(api='asterias')
|
|
339 |
@command(api='cyclades')
|
|
340 | 340 |
class server_stats(object): |
341 | 341 |
"""get server statistics""" |
342 | 342 |
|
... | ... | |
392 | 392 |
|
393 | 393 |
|
394 | 394 |
@command(api='compute') |
395 |
class image_create(object): |
|
396 |
"""create image""" |
|
397 |
|
|
398 |
def main(self, server_id, name): |
|
399 |
reply = self.client.create_image(int(server_id), name) |
|
400 |
print_dict(reply) |
|
401 |
|
|
402 |
|
|
403 |
@command(api='compute') |
|
404 | 395 |
class image_delete(object): |
405 | 396 |
"""delete image""" |
406 | 397 |
|
... | ... | |
444 | 435 |
self.client.delete_image_metadata(image_id, key) |
445 | 436 |
|
446 | 437 |
|
447 |
@command(api='asterias')
|
|
438 |
@command(api='cyclades')
|
|
448 | 439 |
class network_list(object): |
449 | 440 |
"""list networks""" |
450 | 441 |
|
... | ... | |
458 | 449 |
print_items(networks) |
459 | 450 |
|
460 | 451 |
|
461 |
@command(api='asterias')
|
|
452 |
@command(api='cyclades')
|
|
462 | 453 |
class network_create(object): |
463 | 454 |
"""create a network""" |
464 | 455 |
|
... | ... | |
467 | 458 |
print_dict(reply) |
468 | 459 |
|
469 | 460 |
|
470 |
@command(api='asterias')
|
|
461 |
@command(api='cyclades')
|
|
471 | 462 |
class network_info(object): |
472 | 463 |
"""get network details""" |
473 | 464 |
|
... | ... | |
476 | 467 |
print_dict(network) |
477 | 468 |
|
478 | 469 |
|
479 |
@command(api='asterias')
|
|
470 |
@command(api='cyclades')
|
|
480 | 471 |
class network_rename(object): |
481 | 472 |
"""update network name""" |
482 | 473 |
|
... | ... | |
484 | 475 |
self.client.update_network_name(network_id, new_name) |
485 | 476 |
|
486 | 477 |
|
487 |
@command(api='asterias')
|
|
478 |
@command(api='cyclades')
|
|
488 | 479 |
class network_delete(object): |
489 | 480 |
"""delete a network""" |
490 | 481 |
|
... | ... | |
492 | 483 |
self.client.delete_network(network_id) |
493 | 484 |
|
494 | 485 |
|
495 |
@command(api='asterias')
|
|
486 |
@command(api='cyclades')
|
|
496 | 487 |
class network_connect(object): |
497 | 488 |
"""connect a server to a network""" |
498 | 489 |
|
... | ... | |
500 | 491 |
self.client.connect_server(server_id, network_id) |
501 | 492 |
|
502 | 493 |
|
503 |
@command(api='asterias')
|
|
494 |
@command(api='cyclades')
|
|
504 | 495 |
class network_disconnect(object): |
505 | 496 |
"""disconnect a server from a network""" |
506 | 497 |
|
Also available in: Unified diff