The karbor.services.protection.protection_plugin Module

The karbor.services.protection.protection_plugin Module

class karbor.services.protection.protection_plugin.Operation

Bases: object

on_complete(checkpoint, resource, context, parameters, **kwargs)

on_complete hook runs after all dependent resource’s hooks

Optional :param checkpoint: checkpoint object for this operation :param resource: a resource object for this operation :param context: current operation context (viable for clients) :param parameters: dictionary representing operation parameters :param restore: Restore object for restore operation only

on_main(checkpoint, resource, context, parameters, **kwargs)

on_main hook runs in parallel to other resources’ on_main hooks

Your main operation heavy lifting should probably be here. Optional :param checkpoint: checkpoint object for this operation :param resource: a resource object for this operation :param context: current operation context (viable for clients) :param parameters: dictionary representing operation parameters :param restore: Restore object for restore operation only

on_prepare_begin(checkpoint, resource, context, parameters, **kwargs)

on_prepare_begin hook runs before any child resource’s hooks run

Optional :param checkpoint: checkpoint object for this operation :param resource: a resource object for this operation :param context: current operation context (viable for clients) :param parameters: dictionary representing operation parameters :param restore: Restore object for restore operation only

on_prepare_finish(checkpoint, resource, context, parameters, **kwargs)

on_prepare_finish hook runs after all child resources’ prepare hooks

Optional :param checkpoint: checkpoint object for this operation :param resource: a resource object for this operation :param context: current operation context (viable for clients) :param parameters: dictionary representing operation parameters :param restore: Restore object for restore operation only

class karbor.services.protection.protection_plugin.ProtectionPlugin(config=None)

Bases: object

get_copy_operation(resource)

Returns the copy Operation for this resource

Returns:Operation for the resource
get_delete_operation(resource)

Returns the delete Operation for this resource

Returns:Operation for the resource
classmethod get_options_schema(resource_type)

Returns the protect options schema for a resource type

Returns:a dictionary representing the schema
get_protect_operation(resource)

Returns the protect Operation for this resource

Returns:Operation for the resource
get_restore_operation(resource)

Returns the restore Operation for this resource

Returns:Operation for the resource
classmethod get_restore_schema(resource_type)

Returns the restore schema for a resource type

Returns:a dictionary representing the schema
classmethod get_saved_info(metadata_store, resource)

Returns the saved info for a resource

Returns:a dictionary representing the saved info
classmethod get_saved_info_schema(resource_type)

Returns the saved info schema for a resource type

Returns:a dictionary representing the schema
classmethod get_supported_resources_types()

Returns a list of resource types this plugin supports

Returns:a list of resource types
get_verify_operation(resource)

Returns the verify Operation for this resource

Returns:Operation for the resource
classmethod get_verify_schema(resource_type)

Returns the verify schema for a resource type

Returns:a dictionary representing the schema
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.