Browse Source

Add lifecycle semantic check for auto update

Stx-openstack app is not a RPM installed app which
doesn't support auto-update.

Change-Id: Iec0233910c9e7725c12767138e25b3bd314f82b0
Story: 2007960
Task: 42833
Depends-On: https://review.opendev.org/c/starlingx/config/+/800821/
Signed-off-by: Angie Wang <angie.wang@windriver.com>
changes/24/800824/2
Angie Wang 2 months ago
parent
commit
eec60f8b48
  1. 9
      python-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/lifecycle/lifecycle_openstack.py

9
python-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/lifecycle/lifecycle_openstack.py

@ -76,9 +76,12 @@ class OpenstackAppLifecycleOperator(base.AppLifecycleOperator):
# Semantic checks
elif hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_SEMANTIC_CHECK:
if hook_info.mode == constants.APP_LIFECYCLE_MODE_AUTO and \
hook_info.operation == constants.APP_EVALUATE_REAPPLY_OP:
return self._semantic_check_evaluate_app_reapply(app_op, app, hook_info)
if hook_info.mode == constants.APP_LIFECYCLE_MODE_AUTO:
if hook_info.operation == constants.APP_EVALUATE_REAPPLY_OP:
return self._semantic_check_evaluate_app_reapply(app_op, app, hook_info)
elif hook_info.operation == constants.APP_UPDATE_OP:
raise exception.LifecycleSemanticCheckOperationNotSupported(
mode=constants.APP_LIFECYCLE_MODE_AUTO, op=constants.APP_UPDATE_OP, name=app.name)
elif hook_info.mode == constants.APP_LIFECYCLE_MODE_MANUAL and \
hook_info.operation == constants.APP_APPLY_OP and \
hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_PRE:

Loading…
Cancel
Save