Commit f2cf4da2 authored by Jose A. Lopes's avatar Jose A. Lopes
Browse files

Update references to Python constants



Update references to the Python constants introduced by the previous
patch.
Signed-off-by: default avatarJose A. Lopes <jabolopes@google.com>
Reviewed-by: default avatarKlaus Aehlig <aehlig@google.com>
parent f361a6ee
......@@ -152,24 +152,17 @@ ENABLE_SPLIT_QUERY = _autoconf.ENABLE_SPLIT_QUERY
ENABLE_RESTRICTED_COMMANDS = _autoconf.ENABLE_RESTRICTED_COMMANDS
# SSH constants
SSH = "ssh"
SCP = "scp"
SSH = _constants.SSH
SCP = _constants.SCP
NODED = "ganeti-noded"
CONFD = "ganeti-confd"
LUXID = "ganeti-luxid"
RAPI = "ganeti-rapi"
MASTERD = "ganeti-masterd"
MOND = "ganeti-mond"
NODED = _constants.NODED
CONFD = _constants.CONFD
LUXID = _constants.LUXID
RAPI = _constants.RAPI
MASTERD = _constants.MASTERD
MOND = _constants.MOND
DAEMONS = compat.UniqueFrozenset([
NODED,
CONFD,
LUXID,
RAPI,
MASTERD,
MOND,
])
DAEMONS = _constants.DAEMONS
DAEMONS_PORTS = {
# daemon-name: ("proto", "default-port")
......@@ -2458,17 +2451,13 @@ PGREP = "pgrep"
INITIAL_NODE_GROUP_NAME = "default"
# Possible values for NodeGroup.alloc_policy
ALLOC_POLICY_PREFERRED = "preferred"
ALLOC_POLICY_LAST_RESORT = "last_resort"
ALLOC_POLICY_UNALLOCABLE = "unallocable"
VALID_ALLOC_POLICIES = [
ALLOC_POLICY_PREFERRED,
ALLOC_POLICY_LAST_RESORT,
ALLOC_POLICY_UNALLOCABLE,
]
ALLOC_POLICY_PREFERRED = _constants.ALLOC_POLICY_PREFERRED
ALLOC_POLICY_LAST_RESORT = _constants.ALLOC_POLICY_LAST_RESORT
ALLOC_POLICY_UNALLOCABLE = _constants.ALLOC_POLICY_UNALLOCABLE
VALID_ALLOC_POLICIES = _constants.VALID_ALLOC_POLICIES
# Temporary external/shared storage parameters
BLOCKDEV_DRIVER_MANUAL = "manual"
BLOCKDEV_DRIVER_MANUAL = _constants.BLOCKDEV_DRIVER_MANUAL
# qemu-img path, required for ovfconverter
QEMUIMG_PATH = _autoconf.QEMUIMG_PATH
......@@ -2518,36 +2507,27 @@ RANDOM_UUID_FILE = "/proc/sys/kernel/random/uuid"
UUID_REGEX = "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
# Auto-repair tag prefixes
AUTO_REPAIR_TAG_PREFIX = "ganeti:watcher:autorepair:"
AUTO_REPAIR_TAG_ENABLED = AUTO_REPAIR_TAG_PREFIX
AUTO_REPAIR_TAG_SUSPENDED = AUTO_REPAIR_TAG_PREFIX + "suspend:"
AUTO_REPAIR_TAG_PENDING = AUTO_REPAIR_TAG_PREFIX + "pending:"
AUTO_REPAIR_TAG_RESULT = AUTO_REPAIR_TAG_PREFIX + "result:"
AUTO_REPAIR_TAG_PREFIX = _constants.AUTO_REPAIR_TAG_PREFIX
AUTO_REPAIR_TAG_ENABLED = _constants.AUTO_REPAIR_TAG_ENABLED
AUTO_REPAIR_TAG_SUSPENDED = _constants.AUTO_REPAIR_TAG_SUSPENDED
AUTO_REPAIR_TAG_PENDING = _constants.AUTO_REPAIR_TAG_PENDING
AUTO_REPAIR_TAG_RESULT = _constants.AUTO_REPAIR_TAG_RESULT
# Auto-repair levels
AUTO_REPAIR_FIX_STORAGE = "fix-storage"
AUTO_REPAIR_MIGRATE = "migrate"
AUTO_REPAIR_FAILOVER = "failover"
AUTO_REPAIR_REINSTALL = "reinstall"
AUTO_REPAIR_ALL_TYPES = [
AUTO_REPAIR_FIX_STORAGE,
AUTO_REPAIR_MIGRATE,
AUTO_REPAIR_FAILOVER,
AUTO_REPAIR_REINSTALL,
]
AUTO_REPAIR_FIX_STORAGE = _constants.AUTO_REPAIR_FIX_STORAGE
AUTO_REPAIR_MIGRATE = _constants.AUTO_REPAIR_MIGRATE
AUTO_REPAIR_FAILOVER = _constants.AUTO_REPAIR_FAILOVER
AUTO_REPAIR_REINSTALL = _constants.AUTO_REPAIR_REINSTALL
AUTO_REPAIR_ALL_TYPES = _constants.AUTO_REPAIR_ALL_TYPES
# Auto-repair results
AUTO_REPAIR_SUCCESS = "success"
AUTO_REPAIR_FAILURE = "failure"
AUTO_REPAIR_ENOPERM = "enoperm"
AUTO_REPAIR_ALL_RESULTS = frozenset([
AUTO_REPAIR_SUCCESS,
AUTO_REPAIR_FAILURE,
AUTO_REPAIR_ENOPERM,
])
AUTO_REPAIR_SUCCESS = _constants.AUTO_REPAIR_SUCCESS
AUTO_REPAIR_FAILURE = _constants.AUTO_REPAIR_FAILURE
AUTO_REPAIR_ENOPERM = _constants.AUTO_REPAIR_ENOPERM
AUTO_REPAIR_ALL_RESULTS = _constants.AUTO_REPAIR_ALL_RESULTS
# The version identifier for builtin data collectors
BUILTIN_DATA_COLLECTOR_VERSION = "B"
BUILTIN_DATA_COLLECTOR_VERSION = _constants.BUILTIN_DATA_COLLECTOR_VERSION
# The reason trail opcode parameter name
OPCODE_REASON = "reason"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment