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 intel-device-plugins app. Story: 2011242 Task: 51585 Depends-on: https://review.opendev.org/c/starlingx/config/+/936252 Change-Id: I834129a48005693a05806a3314a6e1155f7e004b Signed-off-by: Edson Dias <edson.dias@windriver.com>
This commit is contained in:
parent
9420bf9662
commit
a30d52ceee
@ -14,6 +14,7 @@ from sysinv.common import constants
|
||||
from sysinv.common import exception
|
||||
from sysinv.helm import lifecycle_base as base
|
||||
from sysinv.helm import lifecycle_utils
|
||||
from sysinv.helm.lifecycle_constants import LifecycleConstants
|
||||
import yaml
|
||||
|
||||
LOG = logging.getLogger(__name__)
|
||||
@ -34,20 +35,20 @@ class IntelDevicePluginsAppLifecycleOperator(base.AppLifecycleOperator):
|
||||
|
||||
"""
|
||||
# Semantic Check
|
||||
if (hook_info.lifecycle_type == constants.APP_LIFECYCLE_TYPE_SEMANTIC_CHECK
|
||||
if (hook_info.lifecycle_type == LifecycleConstants.APP_LIFECYCLE_TYPE_SEMANTIC_CHECK
|
||||
and hook_info.operation == constants.APP_APPLY_OP
|
||||
and hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_PRE):
|
||||
and hook_info.relative_timing == LifecycleConstants.APP_LIFECYCLE_TIMING_PRE):
|
||||
return self._pre_semantic_check(app, app_op)
|
||||
|
||||
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:
|
||||
lifecycle_utils.create_local_registry_secrets(app_op, app, hook_info)
|
||||
lifecycle_utils.add_pod_security_admission_controller_labels(
|
||||
app_op, app, hook_info)
|
||||
return self._update_component_label(app_op, app)
|
||||
elif hook_info.operation == constants.APP_REMOVE_OP and \
|
||||
hook_info.relative_timing == constants.APP_LIFECYCLE_TIMING_POST:
|
||||
hook_info.relative_timing == LifecycleConstants.APP_LIFECYCLE_TIMING_POST:
|
||||
return lifecycle_utils.delete_local_registry_secrets(app_op, app, hook_info)
|
||||
|
||||
super(IntelDevicePluginsAppLifecycleOperator, self).app_lifecycle_actions(
|
||||
|
Loading…
x
Reference in New Issue
Block a user