Revision 47f8a2d2 daemons/ganeti-noded
b/daemons/ganeti-noded | ||
---|---|---|
353 | 353 |
# export/import -------------------------- |
354 | 354 |
|
355 | 355 |
@staticmethod |
356 |
def perspective_snapshot_export(params): |
|
357 |
"""Export a given snapshot. |
|
358 |
|
|
359 |
""" |
|
360 |
disk = objects.Disk.FromDict(params[0]) |
|
361 |
dest_node = params[1] |
|
362 |
instance = objects.Instance.FromDict(params[2]) |
|
363 |
cluster_name = params[3] |
|
364 |
dev_idx = params[4] |
|
365 |
debug = params[5] |
|
366 |
return backend.ExportSnapshot(disk, dest_node, instance, |
|
367 |
cluster_name, dev_idx, debug) |
|
368 |
|
|
369 |
@staticmethod |
|
370 | 356 |
def perspective_finalize_export(params): |
371 | 357 |
"""Expose the finalize export functionality. |
372 | 358 |
|
... | ... | |
488 | 474 |
return backend.RunRenameInstance(inst, old_name, debug) |
489 | 475 |
|
490 | 476 |
@staticmethod |
491 |
def perspective_instance_os_import(params): |
|
492 |
"""Run the import function of an OS onto a given instance. |
|
493 |
|
|
494 |
""" |
|
495 |
inst_s, src_node, src_images, cluster_name, debug = params |
|
496 |
inst = objects.Instance.FromDict(inst_s) |
|
497 |
return backend.ImportOSIntoInstance(inst, src_node, src_images, |
|
498 |
cluster_name, debug) |
|
499 |
|
|
500 |
@staticmethod |
|
501 | 477 |
def perspective_instance_shutdown(params): |
502 | 478 |
"""Shutdown an instance. |
503 | 479 |
|
Also available in: Unified diff