Docs: enable warning-is-error, fix errors
Enable "warning-is-error" for sphinx, and fix multiple small warnings which now appear as errors. Change-Id: Ieb3598095338b6c5ba68a3ee21d6da04201917a2
This commit is contained in:
parent
5516e645ca
commit
0324a8b108
|
@ -5,5 +5,6 @@ Swift
|
|||
"""""
|
||||
|
||||
.. autoclass:: karbor.services.protection.bank_plugins.swift_bank_plugin.SwiftBankPlugin
|
||||
:noindex:
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
|
|
@ -83,10 +83,10 @@ latex_documents = [
|
|||
]
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
#intersphinx_mapping = {'http://docs.python.org/': None}
|
||||
# intersphinx_mapping = {'http://docs.python.org/': None}
|
||||
html_last_updated_fmt = '%Y-%m-%d %H:%M'
|
||||
|
||||
# -- Options for openstackdocstheme -------------------------------------------
|
||||
repository_name = 'openstack/karbor'
|
||||
bug_project = project.lower()
|
||||
bug_tag = ''
|
||||
bug_tag = ''
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
Karobr Developer Reference
|
||||
==========================
|
||||
|
||||
Code Reference
|
||||
--------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
../api/autoindex
|
|
@ -35,6 +35,13 @@ Available Plugins
|
|||
protectable_plugins
|
||||
protection_plugins
|
||||
|
||||
Karbor Code Reference
|
||||
=====================
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
devref/index
|
||||
|
||||
Karbor Specs
|
||||
============
|
||||
.. toctree::
|
||||
|
|
|
@ -69,3 +69,5 @@ Neutron (optional)
|
|||
|
||||
enable_service neutron q-svc q-agt q-dhcp q-meta
|
||||
disable_service n-net
|
||||
|
||||
.. include:: mod_wsgi.rst
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
|
||||
Installing Karbor API with mod_wsgi
|
||||
=====================================
|
||||
===================================
|
||||
|
||||
#. Install the Apache Service::
|
||||
|
||||
|
@ -21,11 +21,11 @@ Installing Karbor API with mod_wsgi
|
|||
|
||||
#. Copy ``etc/apache2/apache-karbor-api.conf`` under the apache sites::
|
||||
|
||||
Fedora/RHEL7/CentOS7:
|
||||
sudo cp etc/apache2/apache-karbor-api.conf /etc/httpd/conf.d/apache-karbor-api.conf
|
||||
|
||||
Debian/Ubuntu:
|
||||
sudo cp etc/apache2/apache-karbor-api.conf /etc/apache2/sites-available/apache-karbor-api.conf
|
||||
Fedora/RHEL7/CentOS7:
|
||||
sudo cp etc/apache2/apache-karbor-api.conf /etc/httpd/conf.d/apache-karbor-api.conf
|
||||
|
||||
Debian/Ubuntu:
|
||||
sudo cp etc/apache2/apache-karbor-api.conf /etc/apache2/sites-available/apache-karbor-api.conf
|
||||
|
||||
#. Edit ``apache-karbor-api.conf`` according to installation
|
||||
and environment.
|
||||
|
@ -41,9 +41,9 @@ Installing Karbor API with mod_wsgi
|
|||
|
||||
#. Enable the apache watcher site and reload::
|
||||
|
||||
Fedora/RHEL7/CentOS7:
|
||||
sudo systemctl reload httpd
|
||||
|
||||
Debian/Ubuntu:
|
||||
sudo a2ensite apache-karbor-api
|
||||
sudo apache2ctl -k restart
|
||||
Fedora/RHEL7/CentOS7:
|
||||
sudo systemctl reload httpd
|
||||
|
||||
Debian/Ubuntu:
|
||||
sudo a2ensite apache-karbor-api
|
||||
sudo apache2ctl -k restart
|
||||
|
|
|
@ -5,6 +5,7 @@ Project
|
|||
^^^^^^^
|
||||
|
||||
.. autoclass:: karbor.services.protection.protectable_plugins.project.ProjectProtectablePlugin()
|
||||
:noindex:
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
|
@ -12,6 +13,7 @@ Server
|
|||
^^^^^^
|
||||
|
||||
.. autoclass:: karbor.services.protection.protectable_plugins.server.ServerProtectablePlugin()
|
||||
:noindex:
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
|
@ -19,6 +21,7 @@ Volume
|
|||
^^^^^^
|
||||
|
||||
.. autoclass:: karbor.services.protection.protectable_plugins.volume.VolumeProtectablePlugin()
|
||||
:noindex:
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
|
@ -26,6 +29,7 @@ Image
|
|||
^^^^^
|
||||
|
||||
.. autoclass:: karbor.services.protection.protectable_plugins.image.ImageProtectablePlugin()
|
||||
:noindex:
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ Server to Bank
|
|||
""""""""""""""
|
||||
|
||||
.. autoclass:: karbor.services.protection.protection_plugins.server.nova_protection_plugin.NovaProtectionPlugin()
|
||||
:noindex:
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
|
@ -22,6 +23,7 @@ Cinder Backup
|
|||
"""""""""""""
|
||||
|
||||
.. autoclass:: karbor.services.protection.protection_plugins.volume.cinder_protection_plugin.CinderBackupProtectionPlugin()
|
||||
:noindex:
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
|
@ -32,6 +34,7 @@ Image to Bank
|
|||
"""""""""""""
|
||||
|
||||
.. autoclass:: karbor.services.protection.protection_plugins.image.image_protection_plugin.GlanceProtectionPlugin()
|
||||
:noindex:
|
||||
:members:
|
||||
:show-inheritance:
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ application - Application Data Protection as a Service.
|
|||
|
||||
|
||||
Mission Statement
|
||||
~~~~~~~~~~~~~~~~~
|
||||
-----------------
|
||||
To protect the Data and Metadata that comprises an OpenStack-deployed
|
||||
Application against loss/damage (e.g. backup, replication) by providing a
|
||||
standard framework of APIs and services that allows vendors to provide plugins
|
||||
|
@ -79,20 +79,18 @@ Example
|
|||
Let’s take the OpenStack::Cinder::Volume resource *Protect* action.
|
||||
|
||||
One of the action parameters in the Parameters Schema will be
|
||||
"Consistency Level":
|
||||
"Consistency Level"::
|
||||
|
||||
.. code-block:: JSON
|
||||
|
||||
"parameters_schema" : {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"consistency_level": {
|
||||
"title": "Consistency Level",
|
||||
"description": "The preferred consistency level",
|
||||
"enum": [ "Crash", "OS", "Application" ]
|
||||
}
|
||||
"parameters_schema" : {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"consistency_level": {
|
||||
"title": "Consistency Level",
|
||||
"description": "The preferred consistency level",
|
||||
"enum": ["Crash", "OS", "Application"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Protection Plans
|
||||
----------------
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
===============
|
||||
==============
|
||||
Release Notes
|
||||
===============
|
||||
==============
|
||||
|
||||
.. release-notes::
|
||||
.. release-notes::
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
http://creativecommons.org/licenses/by/3.0/legalcode
|
||||
|
||||
==========================================
|
||||
=======================
|
||||
Karbor db purge utility
|
||||
==========================================
|
||||
=======================
|
||||
|
||||
https://blueprints.launchpad.net/karbor/+spec/clean-deleted-data-in-db
|
||||
|
||||
|
@ -69,7 +69,7 @@ None, this would be run from karbor-manage
|
|||
CLI impact
|
||||
----------
|
||||
|
||||
A new karbor-manage command will be added:
|
||||
A new karbor-manage command will be added::
|
||||
|
||||
karbor-manage db purge <age_in_days>
|
||||
|
||||
|
@ -150,4 +150,4 @@ This is already discussed and accepted in other OpenStack components,
|
|||
such as Glance [1] and Cinder [2].
|
||||
|
||||
[1] https://specs.openstack.org/openstack/glance-specs/specs/mitaka/database-purge.html
|
||||
[2] https://specs.openstack.org/openstack/cinder-specs/specs/kilo/database-purge.html
|
||||
[2] https://specs.openstack.org/openstack/cinder-specs/specs/kilo/database-purge.html
|
||||
|
|
|
@ -57,9 +57,10 @@ Plan Controller
|
|||
|
||||
This API enables the Karbor user to access the protection Plan registry
|
||||
and do the following operations:
|
||||
- Plan CRUD.
|
||||
- List Plans.
|
||||
- Starting and suspending of plans.
|
||||
|
||||
- Plan CRUD.
|
||||
- List Plans.
|
||||
- Starting and suspending of plans.
|
||||
|
||||
|
||||
Scheduled Operation Controller
|
||||
|
@ -67,8 +68,8 @@ Scheduled Operation Controller
|
|||
|
||||
This API enables the Karbor user to manage Scheduled Operations:
|
||||
|
||||
- Operation CRUD.
|
||||
- List Operations.
|
||||
- Operation CRUD.
|
||||
- List Operations.
|
||||
|
||||
Trigger Controller
|
||||
------------------
|
||||
|
@ -76,8 +77,9 @@ Trigger Controller
|
|||
This API enables the Karbor user to manage Triggers:
|
||||
A trigger only can be deleted when it isn't used in any of the
|
||||
scheduled operation.
|
||||
- Trigger CRUD.
|
||||
- List Triggers.
|
||||
|
||||
- Trigger CRUD.
|
||||
- List Triggers.
|
||||
|
||||
|
||||
Restore Controller
|
||||
|
@ -85,7 +87,7 @@ Restore Controller
|
|||
|
||||
This API enables the Karbor user restore a checkpoint on to a restore target:
|
||||
|
||||
- Create restored system from a checkpoint.
|
||||
- Create restored system from a checkpoint.
|
||||
|
||||
|
||||
============================
|
||||
|
@ -98,98 +100,159 @@ time_triggers and scheduled_operations database tables are the same as
|
|||
tables in the operation engine design.
|
||||
|
||||
1. plans
|
||||
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
+=========================+==============+======+=====+=========+=======+
|
||||
| id | varchar(36) | NO | PRI | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| name | varchar(255) | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| provider_id | varchar(36) | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| project_id | varchar(255) | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| status | varchar(64) | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| created_at | Datetime | YES | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| updated_at | Datetime | YES | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| deleted_at | Datetime | YES | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| deleted | Boolean | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
|
||||
2. resources
|
||||
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
+=========================+==============+======+=====+=========+=======+
|
||||
| id | Integer | NO | PRI | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| plan_id | varchar(255) | NO | FOR | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| resource_id | varchar(36) | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| resource_type | varchar(64) | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| created_at | Datetime | YES | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| updated_at | Datetime | YES | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| deleted_at | Datetime | YES | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| deleted | Boolean | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
|
||||
3. restores
|
||||
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
+=================+==============+======+=====+=========+=======+
|
||||
| id | varchar(36) | NO | PRI | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| project_id | varchar(255) | NO | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| provider_id | varchar(36) | NO | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| checkpoint_id | varchar(36) | NO | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| restore_target | varchar(255) | NO | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| parameters | varchar(255) | NO | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| status | varchar(64) | NO | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| created_at | Datetime | YES | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| updated_at | Datetime | YES | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| deleted_at | Datetime | YES | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
| deleted | Boolean | NO | | NULL | |
|
||||
+-----------------+--------------+------+-----+---------+-------+
|
||||
|
||||
4. triggers
|
||||
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
+====================+==============+======+=====+=========+=======+
|
||||
| id | varchar(36) | NO | PRI | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
| name | varchar(255) | NO | | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
| project_id | varchar(255) | NO | | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
| type | varchar(64) | NO | | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
| properties | TEXT | NO | | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
| created_at | Datetime | YES | | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
| updated_at | Datetime | YES | | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
| deleted_at | Datetime | YES | | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
| deleted | Boolean | NO | | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
|
||||
5. scheduled_operations
|
||||
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
+======================+==============+======+=====+=========+=======+
|
||||
| id | varchar(36) | NO | PRI | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| name | varchar(255) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| operation_type | varchar(64) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| project_id | varchar(255) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| trigger_id | varchar(36) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| operation_definition | TEXT | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| created_at | Datetime | YES | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| updated_at | Datetime | YES | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| deleted_at | Datetime | YES | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| deleted | Boolean | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
|
||||
5. services
|
||||
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
+======================+==============+======+=====+=========+=======+
|
||||
| id | Integer | NO | PRI | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| host | varchar(255) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| binary | varchar(255) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| topic | varchar(255) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| report_count | Integer | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| disabled | Boolean | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| disabled_reason | varchar(255) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| modified_at | Datetime | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| rpc_current_version | varchar(36) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| rpc_available_version| varchar(36) | NO | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| created_at | Datetime | YES | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| updated_at | Datetime | YES | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| deleted_at | Datetime | YES | | NULL | |
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
| deleted | Boolean | NO | | NULL | |
|
||||
+--------------------+--------------+------+-----+---------+-------+
|
||||
+----------------------+--------------+------+-----+---------+-------+
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
http://creativecommons.org/licenses/by/3.0/legalcode
|
||||
|
||||
==========================================
|
||||
===================================
|
||||
API for custom checkpoint meta-data
|
||||
==========================================
|
||||
===================================
|
||||
|
||||
https://blueprints.launchpad.net/cinder/+spec/custom-checkpoint-metadata
|
||||
|
||||
|
@ -34,9 +34,9 @@ When creating a checkpoint a new field would be available called
|
|||
``extra-info``.
|
||||
This field must be a map in the format of::
|
||||
|
||||
{
|
||||
"key": "value",
|
||||
}
|
||||
{
|
||||
"key": "value",
|
||||
}
|
||||
|
||||
Keys and values *must* both be strings. Keys that are officially recognized
|
||||
will be in the format of ``karbor-<key-name>`` for example
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
http://creativecommons.org/licenses/by/3.0/legalcode
|
||||
|
||||
==========================================
|
||||
==========================
|
||||
Checkpoint scheduled clean
|
||||
==========================================
|
||||
==========================
|
||||
|
||||
https://blueprints.launchpad.net/karbor/+spec/checkpoint-scheduled-clean
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
http://creativecommons.org/licenses/by/3.0/legalcode
|
||||
|
||||
=========================================
|
||||
========================================
|
||||
Cinder volume snapshot protection plugin
|
||||
=========================================
|
||||
========================================
|
||||
|
||||
https://blueprints.launchpad.net/karbor/+spec/cinder-volume-snapshot-plugin
|
||||
|
||||
|
@ -52,48 +52,50 @@ of this operation to delete the volume snapshot.
|
|||
Cinder volume snapshot protection plugin schema:
|
||||
------------------------------------------------
|
||||
|
||||
OPTIONS_SCHEMA = {
|
||||
"title": "Volume Snapshot Protection Options",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"snapshot_name": {
|
||||
"type": "string",
|
||||
"title": "Snapshot Name",
|
||||
"description": "The name of the volume snapshot."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "Description",
|
||||
"description": "The description of the volume snapshot."
|
||||
},
|
||||
"force": {
|
||||
"type": "boolean",
|
||||
"title": "Force",
|
||||
"description": "If force is True, create a snapshot even if the volume is attached to an instance.",
|
||||
"default": False
|
||||
}
|
||||
},
|
||||
"required": ["snapshot_name", "description", "force"]
|
||||
}
|
||||
::
|
||||
|
||||
RESTORE_SCHEMA = {
|
||||
"title": "Volume Protection Restore",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"restore_name": {
|
||||
"type": "string",
|
||||
"title": "Restore Name",
|
||||
"description": "The name of the restored volume.",
|
||||
"default": None
|
||||
OPTIONS_SCHEMA = {
|
||||
"title": "Volume Snapshot Protection Options",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"snapshot_name": {
|
||||
"type": "string",
|
||||
"title": "Snapshot Name",
|
||||
"description": "The name of the volume snapshot."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "Description",
|
||||
"description": "The description of the volume snapshot."
|
||||
},
|
||||
"force": {
|
||||
"type": "boolean",
|
||||
"title": "Force",
|
||||
"description": "If force is True, create a snapshot even if the volume is attached to an instance.",
|
||||
"default": False
|
||||
}
|
||||
},
|
||||
"restore_description": {
|
||||
"type": "string",
|
||||
"title": "Restore Description",
|
||||
"description": "The description of the restored volume.",
|
||||
"default": None
|
||||
"required": ["snapshot_name", "description", "force"]
|
||||
}
|
||||
|
||||
RESTORE_SCHEMA = {
|
||||
"title": "Volume Protection Restore",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"restore_name": {
|
||||
"type": "string",
|
||||
"title": "Restore Name",
|
||||
"description": "The name of the restored volume.",
|
||||
"default": None
|
||||
},
|
||||
"restore_description": {
|
||||
"type": "string",
|
||||
"title": "Restore Description",
|
||||
"description": "The description of the restored volume.",
|
||||
"default": None
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Alternatives
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
http://creativecommons.org/licenses/by/3.0/legalcode
|
||||
|
||||
==========================================
|
||||
=====================================
|
||||
File System based Bank implementation
|
||||
==========================================
|
||||
=====================================
|
||||
|
||||
https://blueprints.launchpad.net/karbor/+spec/file-system-bank
|
||||
|
||||
|
|
|
@ -4,19 +4,36 @@ Karbor Specs
|
|||
This section contains detailed specification documents for
|
||||
different features inside Karbor.
|
||||
|
||||
Contents:
|
||||
Approved Specs
|
||||
--------------
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:maxdepth: 1
|
||||
|
||||
add-db-manage-purge
|
||||
api-service
|
||||
bank-plugin-lease
|
||||
checkpoint-metadata
|
||||
checkpoint-scheduled-clean
|
||||
cinder-volume-snapshot-plugin
|
||||
file-system-bank
|
||||
instances-extra-info
|
||||
instances-parameters
|
||||
manila-share-snapshot-plugins
|
||||
operation-engine/operation_engine_design
|
||||
pluggable_protection_provider
|
||||
protection-service/protection-service
|
||||
protection-service/restore-design-spec
|
||||
refactor_clients
|
||||
remove_heat
|
||||
restore-resource-status
|
||||
s3-bank
|
||||
trove-database-backup-plugins
|
||||
|
||||
Spec Template
|
||||
-------------
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:maxdepth: 1
|
||||
|
||||
skeleton
|
||||
template
|
||||
|
|
|
@ -59,57 +59,67 @@ Logo of the resource. The extra-info of this resource is collapsed by default.
|
|||
If a user/tenant click the icon, The extra-info will be displayed under this resource.
|
||||
Click the icon again, the extra-info will be collapsed.
|
||||
|
||||
Add a new field extra_info to the response for Protectable Instances API.
|
||||
/{project_id}/protectables/{protectable_type}/instances:
|
||||
get:
|
||||
summary: Resource Instances
|
||||
description: |
|
||||
Return all the available instances for the given protectable type.
|
||||
examples:
|
||||
application/json: {
|
||||
"instances": [
|
||||
{
|
||||
"id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
|
||||
"type": "OS::Nova::Server",
|
||||
"name": "My VM",
|
||||
"extra_info": {
|
||||
"hostname": "KarborServer",
|
||||
"availability_zone": "AZOne",
|
||||
"cell_name": "CellOne"
|
||||
}
|
||||
"dependent_resources": [
|
||||
{
|
||||
"id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
|
||||
"type": "OS::Glance::Image",
|
||||
"name": "cirros-0.3.4-x86_64-uec"
|
||||
"extra_info": {
|
||||
"availability_zone": "AZOne",
|
||||
"cell_name": "CellOne"
|
||||
Add a new field extra_info to the response for Protectable Instances API::
|
||||
|
||||
/{project_id}/protectables/{protectable_type}/instances:
|
||||
get:
|
||||
summary: Resource Instances
|
||||
description: |
|
||||
Return all the available instances for the given protectable type.
|
||||
examples:
|
||||
application/json: {
|
||||
"instances": [
|
||||
{
|
||||
"id": "cb4ef2ff-10f5-46c9-bce4-cf7a49c65a01",
|
||||
"type": "OS::Nova::Server",
|
||||
"name": "My VM",
|
||||
"extra_info": {
|
||||
"hostname": "KarborServer",
|
||||
"availability_zone": "AZOne",
|
||||
"cell_name": "CellOne"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
"dependent_resources": [
|
||||
{
|
||||
"id": "99777fdd-8a5b-45ab-ba2c-52420008103f",
|
||||
"type": "OS::Glance::Image",
|
||||
"name": "cirros-0.3.4-x86_64-uec"
|
||||
"extra_info": {
|
||||
"availability_zone": "AZOne",
|
||||
"cell_name": "CellOne"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Protectable Plugins can return the extra_info of resource Instances.
|
||||
|
||||
The extra_info field in resource database table is only for presentation to a user/tenant.
|
||||
The values in extra_info field can not be used and modified in karbor protection service.
|
||||
Add a new field extra_info to resources database table;
|
||||
resources
|
||||
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| Field | Type | Null | Key | Default | Extra |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
+=========================+==============+======+=====+=========+=======+
|
||||
| id | Integer | NO | PRI | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| plan_id | varchar(255) | NO | FOR | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| resource_id | varchar(36) | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| resource_type | varchar(64) | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| resource_name | varchar(255) | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| resource_extra_info | Text | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| created_at | Datetime | YES | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| updated_at | Datetime | YES | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| deleted_at | Datetime | YES | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
| deleted | Boolean | NO | | NULL | |
|
||||
+-------------------------+--------------+------+-----+---------+-------+
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
http://creativecommons.org/licenses/by/3.0/legalcode
|
||||
|
||||
===================================================
|
||||
==================================================
|
||||
Add parameters field for protectable instances API
|
||||
===================================================
|
||||
==================================================
|
||||
|
||||
https://blueprints.launchpad.net/cinder/+spec/custom-checkpoint-metadata
|
||||
|
||||
|
@ -42,37 +42,36 @@ A dict type parameter is needed for Protectable Instances API. And it is optiona
|
|||
Proposed change
|
||||
===============
|
||||
|
||||
Add a new field parameters to the params of request for Protectable Instances API.
|
||||
Add a new field parameters to the params of request for Protectable Instances API::
|
||||
|
||||
/{project_id}/protectables/{protectable_type}/instances:
|
||||
get:
|
||||
summary: Resource Instances
|
||||
description: |
|
||||
Return all the available instances for the given protectable type.
|
||||
parameters:
|
||||
- $ref: '#/parameters/projectParam'
|
||||
- $ref: '#/parameters/protectable_typeParam'
|
||||
- $ref: '#/parameters/nameFilterParam'
|
||||
- $ref: '#/parameters/sortParam'
|
||||
- $ref: '#/parameters/limitParam'
|
||||
- $ref: '#/parameters/markerParam'
|
||||
- $ref: '#/parameters/ParametersParam'
|
||||
/{project_id}/protectables/{protectable_type}/instances:
|
||||
get:
|
||||
summary: Resource Instances
|
||||
description: |
|
||||
Return all the available instances for the given protectable type.
|
||||
parameters:
|
||||
- $ref: '#/parameters/projectParam'
|
||||
- $ref: '#/parameters/protectable_typeParam'
|
||||
- $ref: '#/parameters/nameFilterParam'
|
||||
- $ref: '#/parameters/sortParam'
|
||||
- $ref: '#/parameters/limitParam'
|
||||
- $ref: '#/parameters/markerParam'
|
||||
- $ref: '#/parameters/ParametersParam'
|
||||
|
||||
The params of request: A dictionary-like object containing both the parameters from
|
||||
the query string and request body.
|
||||
|
||||
Convert the data of parameters to the query string of API.
|
||||
|
||||
For example:
|
||||
For example::
|
||||
|
||||
"parameters": {
|
||||
"region_name": "USA"
|
||||
}
|
||||
"parameters": {
|
||||
"region_name": "USA"
|
||||
}
|
||||
|
||||
Add the query string about the parameters to Protectable Instances API.
|
||||
Add the query string about the parameters to Protectable Instances API::
|
||||
|
||||
|
||||
/{project_id}/protectables/{protectable_type}/instances?parameters=%7B%27region_name%27%3A+%27USA%27%7D
|
||||
/{project_id}/protectables/{protectable_type}/instances?parameters=%7B%27region_name%27%3A+%27USA%27%7D
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -72,53 +72,55 @@ of this operation to delete the share snapshot.
|
|||
Manila share protection plugin schema:
|
||||
--------------------------------------
|
||||
|
||||
OPTIONS_SCHEMA = {
|
||||
"title": "Share Protection Options",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"snapshot_name": {
|
||||
"type": "string",
|
||||
"title": "Snapshot Name",
|
||||
"description": "The name of the snapshot."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "Description",
|
||||
"description": "The description of the share snapshot."
|
||||
},
|
||||
"force": {
|
||||
"type": "boolean",
|
||||
"title": "Force",
|
||||
"description": "Optional flag to indicate whether to snapshot a share even if it's busy.",
|
||||
"default": False
|
||||
}
|
||||
},
|
||||
"required": ["snapshot_name", "description", "force"]
|
||||
}
|
||||
::
|
||||
|
||||
RESTORE_SCHEMA = {
|
||||
"title": "Share Protection Restore",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"share_id": {
|
||||
"type": "string",
|
||||
"title": "Share ID",
|
||||
"description": "The target share ID to restore to."
|
||||
OPTIONS_SCHEMA = {
|
||||
"title": "Share Protection Options",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"snapshot_name": {
|
||||
"type": "string",
|
||||
"title": "Snapshot Name",
|
||||
"description": "The name of the snapshot."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "Description",
|
||||
"description": "The description of the share snapshot."
|
||||
},
|
||||
"force": {
|
||||
"type": "boolean",
|
||||
"title": "Force",
|
||||
"description": "Optional flag to indicate whether to snapshot a share even if it's busy.",
|
||||
"default": False
|
||||
}
|
||||
},
|
||||
"restore_name": {
|
||||
"type": "string",
|
||||
"title": "Restore Name",
|
||||
"description": "The name of the restored share.",
|
||||
"default": None
|
||||
},
|
||||
"restore_description": {
|
||||
"type": "string",
|
||||
"title": "Restore Description",
|
||||
"description": "The description of the restored share.",
|
||||
"default": None
|
||||
"required": ["snapshot_name", "description", "force"]
|
||||
}
|
||||
|
||||
RESTORE_SCHEMA = {
|
||||
"title": "Share Protection Restore",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"share_id": {
|
||||
"type": "string",
|
||||
"title": "Share ID",
|
||||
"description": "The target share ID to restore to."
|
||||
},
|
||||
"restore_name": {
|
||||
"type": "string",
|
||||
"title": "Restore Name",
|
||||
"description": "The name of the restored share.",
|
||||
"default": None
|
||||
},
|
||||
"restore_description": {
|
||||
"type": "string",
|
||||
"title": "Restore Description",
|
||||
"description": "The description of the restored share.",
|
||||
"default": None
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Alternatives
|
||||
|
@ -193,7 +195,7 @@ None
|
|||
Testing
|
||||
=======
|
||||
|
||||
Unit tests in Karbor .
|
||||
Unit tests in Karbor.
|
||||
|
||||
|
||||
Documentation Impact
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
.. role:: purple
|
||||
.. role:: black
|
||||
|
||||
==========================================
|
||||
=============================
|
||||
Pluggable Protection Provider
|
||||
==========================================
|
||||
=============================
|
||||
|
||||
https://blueprints.launchpad.net/karbor/+spec/protection-plugin-is-design
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
http://creativecommons.org/licenses/by/3.0/legalcode
|
||||
|
||||
====================================
|
||||
=========================
|
||||
Protection Service Basics
|
||||
====================================
|
||||
=========================
|
||||
|
||||
https://bugs.launchpad.net/karbor/+bug/1529199
|
||||
|
||||
|
@ -27,7 +27,7 @@ resource dependency and thus be executed on parallel or linearly according to
|
|||
the graph task flow.
|
||||
|
||||
RPC interfaces
|
||||
================================================
|
||||
==============
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/openstack/karbor/master/doc/images/protection-service/protection-architecture.png
|
||||
|
||||
|
@ -35,7 +35,7 @@ From the module graph, protection service basically provide following RPC
|
|||
calls:
|
||||
|
||||
Operation RPC:
|
||||
--------------------
|
||||
--------------
|
||||
**execute_operation(backup_plan:BackupPlan, action:Action):** where action
|
||||
could be protect or restore
|
||||
|
||||
|
@ -89,7 +89,7 @@ it needs create key/value for checkpoint itself. After that, it will build
|
|||
multiple indexes for easier list checkpoints.
|
||||
|
||||
Typical scenario
|
||||
======================================
|
||||
================
|
||||
A typical scenario will start from a triggered operation being sent through RPC
|
||||
call to Protection Service.
|
||||
|
||||
|
@ -105,12 +105,12 @@ events, will call RPC call of Protection Service:
|
|||
execute_operation(backup_plan:Bac,upPlan, action:Action);
|
||||
|
||||
2. ProtectionManager
|
||||
------------------------
|
||||
--------------------
|
||||
who plays as one of the RPC server endpoints, and will handle this RPC call by
|
||||
following sequence:
|
||||
|
||||
2.1 CreateCheckpointTask:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
This task will be the start point task of the graph flow. This task will call
|
||||
the unique instance of class
|
||||
**Checkpoints**:create_checkpoint(plan:ProtectionPlan), to create one
|
||||
|
@ -142,7 +142,7 @@ id, snapshot id, image id, etc) into the Bank under the corresponding
|
|||
**ProtectionDefinition**.
|
||||
|
||||
2.3 CompleteCheckpointTask
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
This task is added into the top layer task flow right after the task flow built
|
||||
form ProtectProvider, which will be executed only when all tasks ahead of it
|
||||
|
|
|
@ -27,7 +27,7 @@ The most important assumption we hold here is that the bank of karbor, which
|
|||
holds our protection data, is high available and reliable.
|
||||
|
||||
Restore from what point
|
||||
================================================
|
||||
=======================
|
||||
|
||||
In `document protection service design <https://raw.githubusercontent.com/openstack/karbor/master/doc/source/spes/protection-service/protection-service.rst>`_
|
||||
, we have described the procedure to protect resource, where for each protection
|
||||
|
@ -39,12 +39,12 @@ foundation where we can build our restoration.
|
|||
Checkpoint including following data:
|
||||
|
||||
Plan:
|
||||
--------------------
|
||||
-----
|
||||
This item is the plan which used to be executed and thus produced this
|
||||
checkpoint.
|
||||
|
||||
Resource dependency graph:
|
||||
----------------------------------
|
||||
--------------------------
|
||||
The resource
|
||||
dependency graph describes the resource stack set in the plan, and the dependency
|
||||
among them and their sub resources.
|
||||
|
@ -58,7 +58,7 @@ is the resources stack with same/similar dependency of the original resource
|
|||
stack at the time point of protection.
|
||||
|
||||
Resource definition data:
|
||||
------------------------------
|
||||
-------------------------
|
||||
Resource definition data is the data defined and persisted by each protection
|
||||
plugin, where protection plugin could persist the metadata of the protection
|
||||
resource, say, backup id, or the original resource, even the data to be backed
|
||||
|
@ -102,7 +102,7 @@ single task doesn't need care about task flow building but only needs implement
|
|||
the restore() function.
|
||||
|
||||
options to implement ProtectionPlugin restore()
|
||||
--------------------------------------------------
|
||||
-----------------------------------------------
|
||||
|
||||
Basically, the standard protection plugin restore is to generate heat resource
|
||||
in memory, but we also tolerates some other backup protection plugin which
|
||||
|
@ -185,7 +185,7 @@ Considering this limitation, the protection plugin with option1 implementation
|
|||
could choose to extend heat resource to include its own resource building logic.
|
||||
|
||||
work flow of restoration:
|
||||
-----------------------------
|
||||
-------------------------
|
||||
.. image:: https://raw.githubusercontent.com/openstack/karbor/master/doc/images/protection-service/restore-processing-sequence-flow.png
|
||||
|
||||
|
||||
|
@ -216,12 +216,12 @@ API or config file, and karbor could define some rules to adapt one world to
|
|||
another.
|
||||
|
||||
Restore heat stack managed resources(TBD)
|
||||
==========================================
|
||||
=========================================
|
||||
The basic idea here is to iterate the
|
||||
original source template, and look up corresponding resource in protection
|
||||
checkpoint, and thus rebuild the source template with checkpoint data. In this
|
||||
way, the rebuilt resource are still managed by heat stack.
|
||||
|
||||
How to watch restoration procedure(TBD)
|
||||
========================================
|
||||
=======================================
|
||||
The basic idea is to watch corresponding heat stack.
|
||||
|
|
|
@ -41,7 +41,9 @@ the protect/restore works. There are some changes to create and use the clients
|
|||
of other services before using that new mechanism.
|
||||
|
||||
1. create client
|
||||
The client may be created like this.
|
||||
The client may be created like this
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def create(context):
|
||||
# user_auth_plugin: created by context, which stores the user token.
|
||||
|
@ -119,7 +121,7 @@ Work Items
|
|||
----------
|
||||
|
||||
* refactor all clients of other openstack services been using
|
||||
in protect service.
|
||||
in protect service.
|
||||
|
||||
Dependencies
|
||||
============
|
||||
|
|
|
@ -15,7 +15,7 @@ Problem description
|
|||
|
||||
The database instance managed by Trove can not be protected by Karbor now. Currently,
|
||||
Trove as a Database service allows the user to quickly and easily use database features
|
||||
without the burden of handling complex administrative tasks.
|
||||
without the burden of handling complex administrative tasks.
|
||||
|
||||
The users can use Database service (Trove) to backup a database and store the backup
|
||||
artifact in the Object Storage service. Later on, if the original database is damaged,
|
||||
|
@ -45,19 +45,21 @@ The type of resource database instance is "OS::Trove::Instance". It will be adde
|
|||
RESOURCE_TYPES in karbor.
|
||||
|
||||
|
||||
1. The parent resource types:
|
||||
PROJECT_RESOURCE_TYPE.
|
||||
1. The parent resource types: PROJECT_RESOURCE_TYPE
|
||||
|
||||
2. list the resources:
|
||||
This interface of plugin will call the 'list' method of Instances manager in troveclient.
|
||||
|
||||
This interface of plugin will call the 'list' method of Instances manager in troveclient.
|
||||
|
||||
3. show the resource:
|
||||
This interface of plugin will call the 'get' method of Instances manager in troveclient.
|
||||
The parameter is a database instance id.
|
||||
|
||||
This interface of plugin will call the 'get' method of Instances manager in troveclient.
|
||||
The parameter is a database instance id.
|
||||
|
||||
4. get dependent resources:
|
||||
The parameter parent_resource is a project, this interface of plugin will return the
|
||||
database instance in this project.
|
||||
|
||||
The parameter parent_resource is a project, this interface of plugin will return the
|
||||
database instance in this project.
|
||||
|
||||
|
||||
Trove database instance protection plugin
|
||||
|
@ -65,58 +67,63 @@ Trove database instance protection plugin
|
|||
A new protection plugin about Trove database instance need be implemented.
|
||||
|
||||
1. Protect Operation:
|
||||
The 'create' method of Backups manager will be called in the main hook
|
||||
of this operation to make a backup of the database instance.
|
||||
|
||||
The 'create' method of Backups manager will be called in the main hook
|
||||
of this operation to make a backup of the database instance.
|
||||
|
||||
2. Restore Operation:
|
||||
The 'create' method of Instances manager
|
||||
will be called in the main hook of this operation to create a new database instance from
|
||||
the giving backup.
|
||||
|
||||
The 'create' method of Instances manager
|
||||
will be called in the main hook of this operation to create a new database instance from
|
||||
the giving backup.
|
||||
|
||||
3. Delete Operation:
|
||||
The database instance backup will be deleted.
|
||||
The 'delete' method of Backups manager will be called in the main hook
|
||||
of this operation to delete the database instance backup.
|
||||
|
||||
The database instance backup will be deleted.
|
||||
The 'delete' method of Backups manager will be called in the main hook
|
||||
of this operation to delete the database instance backup.
|
||||
|
||||
Trove database instance protection plugin schema:
|
||||
-------------------------------------------------
|
||||
|
||||
OPTIONS_SCHEMA = {
|
||||
"title": "Database Instance Protection Options",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"backup_name": {
|
||||
"type": "string",
|
||||
"title": "Backup Name",
|
||||
"description": "The name of the database instance backup."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "Description",
|
||||
"description": "The description of the database instance backup."
|
||||
}
|
||||
},
|
||||
"required": ["backup_name", "description"]
|
||||
}
|
||||
::
|
||||
|
||||
RESTORE_SCHEMA = {
|
||||
"title": "Database Instance Protection Restore",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"restore_name": {
|
||||
"type": "string",
|
||||
"title": "Restore Name",
|
||||
"description": "The name of the restored database instance.",
|
||||
"default": None
|
||||
OPTIONS_SCHEMA = {
|
||||
"title": "Database Instance Protection Options",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"backup_name": {
|
||||
"type": "string",
|
||||
"title": "Backup Name",
|
||||
"description": "The name of the database instance backup."
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"title": "Description",
|
||||
"description": "The description of the database instance backup."
|
||||
}
|
||||
},
|
||||
"restore_description": {
|
||||
"type": "string",
|
||||
"title": "Restore Description",
|
||||
"description": "The description of the restored database instance.",
|
||||
"default": None
|
||||
"required": ["backup_name", "description"]
|
||||
}
|
||||
|
||||
RESTORE_SCHEMA = {
|
||||
"title": "Database Instance Protection Restore",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"restore_name": {
|
||||
"type": "string",
|
||||
"title": "Restore Name",
|
||||
"description": "The name of the restored database instance.",
|
||||
"default": None
|
||||
},
|
||||
"restore_description": {
|
||||
"type": "string",
|
||||
"title": "Restore Description",
|
||||
"description": "The description of the restored database instance.",
|
||||
"default": None
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Alternatives
|
||||
|
@ -191,7 +198,7 @@ None
|
|||
Testing
|
||||
=======
|
||||
|
||||
Unit tests in Karbor .
|
||||
Unit tests in Karbor.
|
||||
|
||||
|
||||
Documentation Impact
|
||||
|
|
|
@ -19,9 +19,8 @@ from oslo_serialization import jsonutils
|
|||
from oslo_utils import excutils
|
||||
from oslo_utils import strutils
|
||||
import six
|
||||
import webob
|
||||
|
||||
from six.moves import http_client
|
||||
import webob
|
||||
|
||||
from karbor import exception
|
||||
from karbor import i18n
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import httplib
|
||||
from karbor.api.openstack import wsgi
|
||||
from six.moves import http_client
|
||||
import webob.dec
|
||||
|
||||
from oslo_serialization import jsonutils
|
||||
|
@ -44,7 +44,7 @@ class Versions(object):
|
|||
])
|
||||
|
||||
response = webob.Response(request=req,
|
||||
status=httplib.MULTIPLE_CHOICES,
|
||||
status=http_client.MULTIPLE_CHOICES,
|
||||
content_type='application/json')
|
||||
response.body = jsonutils.dumps(dict(versions=version_objs))
|
||||
return response
|
||||
|
|
|
@ -24,9 +24,9 @@ from karbor.services.operationengine.engine.triggers.timetrigger import \
|
|||
|
||||
|
||||
RATE = 2
|
||||
FREQ_TO_KWARGS = [{'days': RATE*366},
|
||||
{'days': RATE*31},
|
||||
{'days': RATE*7},
|
||||
FREQ_TO_KWARGS = [{'days': RATE * 366},
|
||||
{'days': RATE * 31},
|
||||
{'days': RATE * 7},
|
||||
{'days': RATE},
|
||||
{'hours': RATE},
|
||||
{'minutes': RATE},
|
||||
|
@ -109,7 +109,8 @@ class ICal(timeformats.TimeFormat):
|
|||
"""Compute next time
|
||||
|
||||
:param current_time: the time before the next time
|
||||
:return datetime or None
|
||||
:return: datetime or None
|
||||
|
||||
"""
|
||||
next_time = self.rrule_obj.after(current_time)
|
||||
return next_time if next_time else None
|
||||
|
@ -117,7 +118,8 @@ class ICal(timeformats.TimeFormat):
|
|||
def get_min_interval(self):
|
||||
"""Get minimum interval of two adjacent time points
|
||||
|
||||
:return int(seconds) or None
|
||||
:return: int(seconds) or None
|
||||
|
||||
"""
|
||||
gen = self.rrule_obj
|
||||
kwargs = FREQ_TO_KWARGS[self.min_freq]
|
||||
|
|
|
@ -95,7 +95,7 @@ class TriggerManager(object):
|
|||
the operation is registered to
|
||||
:param operation_id: ID of the operation
|
||||
:param kwargs: Any parameters
|
||||
:raise InvalidInput if the trigger_type is invalid or
|
||||
:raise InvalidInput: if the trigger_type is invalid or
|
||||
other exceptionis register_operation of trigger raises
|
||||
"""
|
||||
trigger = self._trigger_obj_map.get(trigger_id, None)
|
||||
|
@ -113,7 +113,7 @@ class TriggerManager(object):
|
|||
:param trigger_id: The ID of the trigger which
|
||||
the operation is registered to
|
||||
:param operation_id: ID of the operation
|
||||
:raise InvalidInput if the trigger_type is invalid or
|
||||
:raise InvalidInput: if the trigger_type is invalid or
|
||||
other exceptionis unregister_operation of trigger raises
|
||||
"""
|
||||
trigger = self._trigger_obj_map.get(trigger_id, None)
|
||||
|
|
|
@ -40,7 +40,7 @@ class OperationManager(object):
|
|||
|
||||
:param operation_type: the type of operation
|
||||
:param operation_definition: the definition of operation
|
||||
:raise InvalidInput if the operation_type is invalid or
|
||||
:raise InvalidInput: if the operation_type is invalid or
|
||||
InvalidOperationDefinition if operation_definition is invalid
|
||||
"""
|
||||
op = self._get_operation(operation_type)
|
||||
|
@ -51,7 +51,7 @@ class OperationManager(object):
|
|||
|
||||
:param operation_type: the type of operation
|
||||
:param operation_definition: the definition of operation
|
||||
:raise InvalidInput if the operation_type is invalid.
|
||||
:raise InvalidInput: if the operation_type is invalid.
|
||||
"""
|
||||
op = self._get_operation(operation_type)
|
||||
op.run(operation_definition, **kwargs)
|
||||
|
|
|
@ -34,8 +34,8 @@ class WorkFlowEngine(object):
|
|||
"""build flow
|
||||
|
||||
:param flow_name: the flow name
|
||||
:param flow_type:'linear' or 'graph',default:'graph'
|
||||
:return:linear flow or graph flow
|
||||
:param flow_type: 'linear' or 'graph', default:'graph'
|
||||
:return: linear flow or graph flow
|
||||
"""
|
||||
return
|
||||
|
||||
|
@ -56,11 +56,11 @@ class WorkFlowEngine(object):
|
|||
inject=None, **kwargs):
|
||||
"""create a task
|
||||
|
||||
:param function:make a task from this callable
|
||||
:param function: make a task from this callable
|
||||
:param requires: A OrderedSet of inputs this task requires to function.
|
||||
:param provides:A set, string or list of items that this will be
|
||||
:param provides: A set, string or list of items that this will be
|
||||
providing (or could provide) to others
|
||||
:param inject:An immutable input_name => value dictionary which
|
||||
:param inject: An immutable input_name => value dictionary which
|
||||
specifies any initial inputs that should be
|
||||
automatically injected into the task scope before the
|
||||
task execution commences
|
||||
|
|
|
@ -17,11 +17,11 @@ def wait_until_true(predicate, timeout=60, sleep=1, exception=None):
|
|||
"""Wait until callable predicate is evaluated as True
|
||||
|
||||
:param predicate: Callable deciding whether waiting should continue.
|
||||
Best practice is to instantiate predicate with functools.partial()
|
||||
Best practice is to instantiate predicate with functools.partial()
|
||||
:param timeout: Timeout in seconds how long should function wait.
|
||||
:param sleep: Polling interval for results in seconds.
|
||||
:param exception: Exception class for eventlet.Timeout.
|
||||
(see doc for eventlet.Timeout for more information)
|
||||
(see doc for eventlet.Timeout for more information)
|
||||
|
||||
"""
|
||||
with eventlet.timeout.Timeout(timeout, exception):
|
||||
|
|
|
@ -35,7 +35,7 @@ def find_config(config_path):
|
|||
|
||||
:param config_path: Full or relative path to the config.
|
||||
:returns: Full path of the config, if it exists.
|
||||
:raises: `karbor.exception.ConfigNotFound`
|
||||
:raises karbor.exception.ConfigNotFound:
|
||||
|
||||
"""
|
||||
possible_locations = [
|
||||
|
|
|
@ -65,6 +65,7 @@ karbor.operationengine.engine.executor =
|
|||
source-dir = doc/source
|
||||
build-dir = doc/build
|
||||
all_files = 1
|
||||
warning-is-error = 1
|
||||
|
||||
[upload_sphinx]
|
||||
upload-dir = doc/build/html
|
||||
|
@ -85,4 +86,10 @@ output_file = karbor/locale/karbor.pot
|
|||
|
||||
[pbr]
|
||||
autodoc_index_modules = true
|
||||
autodoc_exclude_modules =
|
||||
karbor.tests.*
|
||||
karbor.wsgi.*
|
||||
karbor.services.protection.bank_plugins.*
|
||||
karbor.services.protection.protectable_plugins.*
|
||||
karbor.services.protection.protection_plugins.*
|
||||
warnerrors = true
|
||||
|
|
Loading…
Reference in New Issue