tacker/tacker/policies
Hiromu Asahina d40de6c71e Fix LCM failure
In current implementation, if the tacker servers go down during LCM
operation, the operation state will be fixed to `PROCESSING` even after
servers restart. Once this problem happens, users cannot change the
operation state with APIs, which means users have to change the state by
updating DB directly.

This patch fixes this problem by adding a `/vnf_lcm_op_occs/{id}/cancel`
endpoint according to ETSI NFV SOL003 [1]. Users can change the state of
LCM operations in `PROCESSING` to `FAILED_TEMP` with this API.

Note that currently the cancel API support only a transition from
PROCESSING -> FAILED_TEMP (i.e., transitions from ROLLING_BACK and
STARTING are not supported)

In addition, as the current ``_get_affected_resources`` doesn't work
correctly when there are no updated resources, this patch modify
``utils.py`` [2] to fix it and update the tests [3] depending on
``utils.py``.

[1] https://www.etsi.org/deliver/etsi_gs/NFV-SOL/001_099/003/03.05.01_60/gs_NFV-SOL003v030501p.pdf
[2] tacker/vnflcm/utils.py
[3] tacker/tests/unit/conductor/test_conductor_server.py

Change-Id: I54aa967be7903c064433f01adf0f99074577a8da
Closes-bug: #1924917
Signed-off-by: Hiromu Asahina <hiromu.asahina.az@hco.ntt.co.jp>
2022-02-15 19:52:59 +09:00
..
__init__.py Multi version API support 2021-09-16 01:19:51 +00:00
base.py Implement policy in code 2019-09-19 06:30:04 +00:00
vnf_lcm.py Fix LCM failure 2022-02-15 19:52:59 +09:00
vnf_package.py Implementation Artifacts support in Tacker 2020-09-21 03:27:17 -04:00