# 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.
# Crypto
@staticmethod
- def perspective_create_x509_certificate(params):
+ def perspective_x509_cert_create(params):
"""Creates a new X509 certificate for SSL/TLS.
"""
return backend.CreateX509Certificate(validity)
@staticmethod
- def perspective_remove_x509_certificate(params):
+ def perspective_x509_cert_remove(params):
"""Removes a X509 certificate.
"""
# Import and export
@staticmethod
- def perspective_start_import_listener(params):
+ def perspective_import_start(params):
"""Starts an import daemon.
"""
_DecodeImportExportIO(dest,
dest_args))
@staticmethod
- def perspective_start_export(params):
+ def perspective_export_start(params):
"""Starts an export daemon.
"""
source_args))
@staticmethod
- def perspective_get_import_export_status(params):
+ def perspective_impexp_status(params):
"""Retrieves the status of an import or export daemon.
"""
return backend.GetImportExportStatus(params[0])
@staticmethod
- def perspective_cleanup_import_export(params):
+ 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.
"""