Protectable Plugins Development Guide

Protectable Plugins Development Guide


This Guide provides instructions on how to develop and use your protectable plugins; the guide also gives an overview of the existing protectable plugins.

Before you read this document, it is recommended to:

#. Deploy an OpenStack environment with the latest Karbor version. See the Karbor Installation Guide.


The protectable plugin is responsible for the implementation of getting a type of protectable element which Karbor can protect. Most prominently OpenStack resources (volume, project, server, etc). The actual instance of protectable element is named Resource. The Protectable Plugin about one type resource defines what types resource it depend on. It defines the dependency between different resource type in the default distribution of Karbor.

You can extend the functionality of gettting the Karbor’s protectable resources through implementing new protectable plugins.

Create a protectable plugin

The Karbor code-base has a python API that corresponds to the set of API calls you must implement to be a Karbor protectable plugin. Within the source code directory, look at karbor/service/protection/

A protectable plugin must implement the following methods:

  1. get_resource_type: This function will return the resource type that this plugin supports.
  2. get_parent_resource_types: This function will return the possible parent resource types.
  3. list_resources: This function will list resource instances of type this plugin supported.
  4. show_resource: This function will show one resource detail information.
  5. get_dependent_resources: This function will be called for every parent resource type. For example, a the parent resource types for volume are “server” and “project”. The method get_dependent_resources will be called once for each.

Add the configuration of the protectable plugin

  1. Adding the Plugin class module to the entry_points Add the protectable plugin module name to the protection namespace of karbor in the entry_points section of setup.cfg file
karbor.protectables =
project =
server =
volume =
image =
share =
network =
database =
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.