From 933ce71e1c21370c4be38558dd010f8a70025069 Mon Sep 17 00:00:00 2001 From: Edson Dias Date: Thu, 2 Jan 2025 16:12:08 -0300 Subject: [PATCH] Update references to appframework lifecycle constants. The application framework lifecycle constants were split into two files, sysinv/helm/lifecycle_constants.py and sysinv/common/constants.py. Aiming to facilitate the split of the application framework into a separate application in the future, the review: https://review.opendev.org/c/starlingx/config/+/936252 moved the lifecycle variables to helm/lifecycle_contants file. This commit updates all references that pointed to the lifecycles constants at sysinv/common/constants.py file, changing them to point to the new variables in sysinv/helm/lifecycle_contants.py Test plan: PASS: build-pkgs && build-image PASS: AIO-SX fresh install PASS: Upload, apply, remove, delete, update and upgrade sriov-fec-operator app. Story: 2011242 Task: 51593 Depends-on: https://review.opendev.org/c/starlingx/config/+/936252 Change-Id: I37b932fee6df4e729e3234d8c6f7e97a04861249 Signed-off-by: Edson Dias --- .../lifecycle/lifecycle_sriov_fec_operator.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python3-k8sapp-sriov-fec-operator/k8sapp_sriov_fec_operator/k8sapp_sriov_fec_operator/lifecycle/lifecycle_sriov_fec_operator.py b/python3-k8sapp-sriov-fec-operator/k8sapp_sriov_fec_operator/k8sapp_sriov_fec_operator/lifecycle/lifecycle_sriov_fec_operator.py index 0984d94..cd913c4 100644 --- a/python3-k8sapp-sriov-fec-operator/k8sapp_sriov_fec_operator/k8sapp_sriov_fec_operator/lifecycle/lifecycle_sriov_fec_operator.py +++ b/python3-k8sapp-sriov-fec-operator/k8sapp_sriov_fec_operator/k8sapp_sriov_fec_operator/lifecycle/lifecycle_sriov_fec_operator.py @@ -32,19 +32,19 @@ class SriovFecOperatorAppLifecycleOperator(base.AppLifecycleOperator): :param hook_info: LifecycleHookInfo object """ - if hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_FLUXCD_REQUEST: + if hook_info.lifecycle_type == LifecycleConstants.APP_LIFECYCLE_TYPE_FLUXCD_REQUEST: if hook_info.operation == constants.APP_APPLY_OP: - if hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_POST: + if hook_info.relative_timing == LifecycleConstants.APP_LIFECYCLE_TIMING_POST: return self.post_apply(app_op, app, hook_info) - if hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_OPERATION: + if hook_info.lifecycle_type == LifecycleConstants.APP_LIFECYCLE_TYPE_OPERATION: if hook_info.operation == constants.APP_REMOVE_OP: - if hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_PRE: + if hook_info.relative_timing == LifecycleConstants.APP_LIFECYCLE_TIMING_PRE: return self.pre_remove(app) - if hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_OPERATION: + if hook_info.lifecycle_type == LifecycleConstants.APP_LIFECYCLE_TYPE_OPERATION: if hook_info.operation == constants.APP_REMOVE_OP: - if hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_POST: + if hook_info.relative_timing == LifecycleConstants.APP_LIFECYCLE_TIMING_POST: return self.post_remove(app) super(SriovFecOperatorAppLifecycleOperator, self).app_lifecycle_actions(