
The original cgcs-patch is rpm based which requires a complete re-write to work on ostree/dpkg systems like Debian. The code has been forked, since the older Centos env and python2.7 are end-of-life. Forking the code allows all new development to not require re-testing on Centos. The debian folder under cgcs-patch has been moved under sw-patch Renaming and refactoring will be done in later commits. pylint is un-clamped in order to work on python3.9 Some minor pylint suppressions have been added. Test Plan: Verify that this builds on Debian Verify that the ISO installs the new content on Debian without breaking packages that import cgcs_patch. Verify patching service runs on Debian Co-Authored-By: Jessica Castelino <jessica.castelino@windriver.com> Story: 2009101 Task: 43076 Signed-off-by: Al Bailey <al.bailey@windriver.com> Change-Id: I3f1bca749404053bae63d4bcc9fb2477cf909fcd
52 lines
1.2 KiB
Python
52 lines
1.2 KiB
Python
"""
|
|
Copyright (c) 2015-2021 Wind River Systems, Inc.
|
|
|
|
SPDX-License-Identifier: Apache-2.0
|
|
|
|
"""
|
|
|
|
import os
|
|
try:
|
|
# The tsconfig module is only available at runtime
|
|
import tsconfig.tsconfig as tsc
|
|
|
|
INITIAL_CONFIG_COMPLETE_FLAG = os.path.join(
|
|
tsc.PLATFORM_CONF_PATH, ".initial_config_complete")
|
|
except Exception:
|
|
pass
|
|
|
|
PATCH_AGENT_STATE_IDLE = "idle"
|
|
PATCH_AGENT_STATE_INSTALLING = "installing"
|
|
PATCH_AGENT_STATE_INSTALL_FAILED = "install-failed"
|
|
PATCH_AGENT_STATE_INSTALL_REJECTED = "install-rejected"
|
|
|
|
PATCH_STORAGE_DIR = "/opt/patching"
|
|
|
|
ADDRESS_VERSION_IPV4 = 4
|
|
ADDRESS_VERSION_IPV6 = 6
|
|
CONTROLLER_FLOATING_HOSTNAME = "controller"
|
|
|
|
AVAILABLE = 'Available'
|
|
APPLIED = 'Applied'
|
|
PARTIAL_APPLY = 'Partial-Apply'
|
|
PARTIAL_REMOVE = 'Partial-Remove'
|
|
COMMITTED = 'Committed'
|
|
UNKNOWN = 'n/a'
|
|
|
|
STATUS_OBSOLETE = 'OBS'
|
|
STATUS_RELEASED = 'REL'
|
|
STATUS_DEVELOPEMENT = 'DEV'
|
|
|
|
CLI_OPT_ALL = '--all'
|
|
CLI_OPT_DRY_RUN = '--dry-run'
|
|
CLI_OPT_RECURSIVE = '--recursive'
|
|
CLI_OPT_RELEASE = '--release'
|
|
|
|
ENABLE_DEV_CERTIFICATE_PATCH_IDENTIFIER = 'ENABLE_DEV_CERTIFICATE'
|
|
|
|
LOOPBACK_INTERFACE_NAME = "lo"
|
|
|
|
SEMANTIC_PREAPPLY = 'pre-apply'
|
|
SEMANTIC_PREREMOVE = 'pre-remove'
|
|
SEMANTIC_ACTIONS = [SEMANTIC_PREAPPLY, SEMANTIC_PREREMOVE]
|