LOG.warn is deprecated in Python3 and was used only here
in karbor, this patch updates it to LOG.warning.
Change-Id: Icad346bb6fd3efcac2f42fead1327585297f2f96
Now when doing checkpoint copy failed, checkpoint
will be wait_copying status forever, and so we can
not do the restore anymore. So we should add an API
to support checkpoint status reset if we deeply knows
that the checkpoint is ok. This patch added API
support for doing checkpoint state reset.
Implements: bp checkpoint-status-reset
Change-Id: Iabaa98c9900fba554be2ad0833d438901e01147a
Currently, general users have rights to restore other users'
checkpoints. We should add permission check to avoid the security
risk.
Closes-Bug: #1805004
Change-Id: If0f957a3aa8f25778833d7611342fab6b8efa388
Add optional content parameter for checkpoint interface, so that other
checkpoint bank plugin like database bank plugin can be introduced to
Karbor.
Change-Id: I4eaad0b3fe38cb95a668b83acba39cd831bbb7df
Closes-Bug: #1745909
Add VerificationsController to Karbor API. The verify action
of the volume backup plugin is introduced in this patch.
The verify aciton of other plugins will be introduced later.
Implements: blueprint support-verify-the-checkpoint-api
Change-Id: I2fb36fe836b23519aaf0a5219b4404f819f0dc36
When calling show_resource() in protection.manager.ProtectionManager,
the result may be None that got the NoneType has no attribute
'to_dict'. This patch fixes it.
Change-Id: I895fa492acbac8885cfb27640528280b69ba7c14
Closes-Bug: #1716860
In 2 places, 'raise' was used without value, and with no exception
context, causing NoneType to be raised. Fix that by raising the correct
exception type. In list_objects, return an empty response if no objects
are found.
Change-Id: Ib7e902bd1f4d491ba0d53c6f9c85559fb7292a4c
We should provide the plugin name as defined in entry_point instead of
the path for the plugin when loading by stevedore.
Change-Id: I1b95699befd1e8a6d7cfdc61d0fe98e8c3c61ca0
Closes-bug: #1701786
The restore properties of restore's parameter have not been
checked. The restore property value should be one of the pr
operties in restore_schema of the plugin.
Closes-Bug: #1686709
Change-Id: I910f74fb4254951b399980c1cd616abc354392a0
Create a class of 'Recource' to replace the original definition.
It will bring several advantages.
1. The new class will be used as tuple which can't be modified,
accessed by name or index.
2. The instance of new class can be hashable whatever the type of
members of instace. So, it can be used in method of 'build_graph'.
3. Add some other functions to it, such as transform it to dict.
4. It is easy to chose members of it to be serialized by modifing
the definition of property of 'Resource'.
Change-Id: Ib5f3fea53bff9fe0a7c3b88339af26b70a6b7d3c
User can get the extra_info of resource instances from
the response of this API.
Co-authored-by: xiangxinyong <xiangxinyong@huawei.com>
blueprint instances-extra-info
Change-Id: Id97b8e5b3c29283320f5d4aa81d3947505b35671
When I create some checkpoints by "OS Infra Provider" and "Noop",
and I query checkpoints by one provider(such as "OS Infra Provider"),
it return all checkpoints include "OS Infra Provider" and "Noop".
Change-Id: Ia93d3131b2d9df8fea6a5d7a66027ae652d4cfa1
Closes-Bug: #1657394
This patch has done the preparation works for refactoring clients,
such as initiate keystone plugin, generate session etc. There are
several patches to do for refactoring the clients.
Change-Id: I61d2a42fb6f0de2d98714a7e19c1a220dec95082
Implements: blueprint refactor-clients
Partial-Bug: #1566793
Refactor flows:
- rename flows into a short-name logical operations
- rename all 'restoration' into 'restore'
Change-Id: Ib676508b14b114a24c370e70f8e375d41239a973
Protection plugin now needs to implement methods for each operation
(protect, delete, restore). Each protection plugin is created in the
context of the flow, while each operation is created in the context of
the resource.
A protection plugin is responsible for returning an Operation class for
each operation. Such Operation class defines the behavior of the
protection plugin by implementing these optional hooks:
- on_prepare_begin hook is invoked before any hook of this resource and
dependent resources has begun
- on_prepare_finish hook is invoked after any prepare hooks of dependent
resources are complete.
- on_main hook is invoked after the resource prepare hooks are complete
- on_complete hook is invoked once the resource's main hook is
complete, and the dependent resources' on_complete hooks are complete
HeatTemplate is now created and supplied from a task instead of being
created and passed to resource tasks before the restore operation began.
Change-Id: I847eec6990b2d24a66a12542d242fbfb682272fe
Co-Authored-By: Saggi Mizrahi <saggi.mizrahi@huawei.com>
Implements: blueprint protection-plugin-is-design
ProviderRegistry used to return None when the provider was not found.
Change this behavior - ProviderRegistry raises ProviderNotFound, and
it is the caller responsibility to handle the exception.
Change-Id: I249875412c7307161f9022190807f8907e8f5f1e
Currently, immediatelly after heat stack has been created, status is
updated to success, without waiting for the stack result.
Instead, set the success status only after heat stack finished
successfully.
Change-Id: I60c795ec547070b7d53f31fbd7865c573efe4433
Scenario #1
User need a parameter for the region name to query resource
instances from different region endpoint.
Scenario #2
User uses the Protectable Instances API to query database
instances from the verdor's backup software. User must provide
some parameters about authentication to the restfull API of the
verdor's backup software.
A dict type parameter is needed for Protectable Instances API.
And it is optional.
blueprint instances-parameters
Change-Id: I6677e86467c516433a1ba15eac42f339b953d3d9
Restore REST body includes the parameters attribute which specifies
each resource or resource type paramters according to protection
plugin's restore schema.
Restore target auth parameters (such as username and password) to be
sent in 'restore_auth' dictionary in the restore body and not saved
in the restore object.
Change-Id: I7e73d2a0f1d347e83c9bb412649533700bd35ea4