Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.
Change-Id: Ifd0d1b8aa419e39361e76a4f846cb4eeaf0d46ca
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
When we run unittest with a way like:
python -m unittest2 <test_file>
then NoSuchOptError exception will raised
Change-Id: Ib0f9276c1b86ff7f2d1e401ddfae2bf4e920fa78
Fix the order of decorators and parameters for
karbor.protection.manager.ProtectionServiceTest in unittest.
Change-Id: I9d58c33787e0b2039a046ea30c7238485a76af2d
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
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
Currently, network topology is the dependency of server
resource, it will make users confused to protect the server
with network topology and bring network conflict issues.
This patch will fix it.
Change-Id: I21d62d66f5d66a1bc5e2c41ffc510fba19393ac5
Closes-Bug:#1711879
This API is a new one. After this API is merged to karborclient.
I will submit another patch about fullstack of it.
Change-Id: Idf67d5fdc5c2c4bb960212dae4c18294109a6fbf
blueprint: operation-log-api
Some tests used incorrect order of arguments in
assertEqual(observed, expected). The correct order expected
by testtool is assertEqual(expected, observed).
Change-Id: I2f5d59b1115c82c2811aeb753404ac2c99d2746d
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
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
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