# export/import --------------------------
@staticmethod
- def perspective_snapshot_export(params):
- """Export a given snapshot.
-
- """
- disk = objects.Disk.FromDict(params[0])
- dest_node = params[1]
- instance = objects.Instance.FromDict(params[2])
- cluster_name = params[3]
- dev_idx = params[4]
- debug = params[5]
- return backend.ExportSnapshot(disk, dest_node, instance,
- cluster_name, dev_idx, debug)
-
- @staticmethod
def perspective_finalize_export(params):
"""Expose the finalize export functionality.
return backend.RunRenameInstance(inst, old_name, debug)
@staticmethod
- def perspective_instance_os_import(params):
- """Run the import function of an OS onto a given instance.
-
- """
- inst_s, src_node, src_images, cluster_name, debug = params
- inst = objects.Instance.FromDict(inst_s)
- return backend.ImportOSIntoInstance(inst, src_node, src_images,
- cluster_name, debug)
-
- @staticmethod
def perspective_instance_shutdown(params):
"""Shutdown an instance.
return backend.GetImportExportStatus(params[0])
@staticmethod
+ def perspective_impexp_abort(params):
+ """Aborts an import or export.
+
+ """
+ return backend.AbortImportExport(params[0])
+
+ @staticmethod
def perspective_impexp_cleanup(params):
"""Cleans up after an import or export.