+ # Crypto
+
+ @staticmethod
+ def perspective_x509_cert_create(params):
+ """Creates a new X509 certificate for SSL/TLS.
+
+ """
+ (validity, ) = params
+ return backend.CreateX509Certificate(validity)
+
+ @staticmethod
+ def perspective_x509_cert_remove(params):
+ """Removes a X509 certificate.
+
+ """
+ (name, ) = params
+ return backend.RemoveX509Certificate(name)
+
+ # Import and export
+
+ @staticmethod
+ def perspective_import_start(params):
+ """Starts an import daemon.
+
+ """
+ (x509_key_name, source_x509_ca, instance, dest, dest_args) = params
+ return backend.StartImportExportDaemon(constants.IEM_IMPORT,
+ x509_key_name, source_x509_ca,
+ None, None,
+ objects.Instance.FromDict(instance),
+ dest,
+ _DecodeImportExportIO(dest,
+ dest_args))
+ @staticmethod
+ def perspective_export_start(params):
+ """Starts an export daemon.
+
+ """
+ (x509_key_name, dest_x509_ca, host, port, instance,
+ source, source_args) = params
+ return backend.StartImportExportDaemon(constants.IEM_EXPORT,
+ x509_key_name, dest_x509_ca,
+ host, port,
+ objects.Instance.FromDict(instance),
+ source,
+ _DecodeImportExportIO(source,
+ source_args))
+
+ @staticmethod
+ def perspective_impexp_status(params):
+ """Retrieves the status of an import or export daemon.
+
+ """
+ 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.
+
+ """
+ return backend.CleanupImportExport(params[0])
+