CONFIG_REVISION = _constants.CONFIG_REVISION
CONFIG_VERSION = _constants.CONFIG_VERSION
-#: RPC protocol version
PROTOCOL_VERSION = _constants.PROTOCOL_VERSION
-# user separation
DAEMONS_GROUP = _constants.DAEMONS_GROUP
ADMIN_GROUP = _constants.ADMIN_GROUP
MASTERD_USER = _constants.MASTERD_USER
ENABLE_SPLIT_QUERY = _constants.ENABLE_SPLIT_QUERY
ENABLE_RESTRICTED_COMMANDS = _constants.ENABLE_RESTRICTED_COMMANDS
-# SSH constants
SSH = _constants.SSH
SCP = _constants.SCP
LUXI_OVERRIDE = _constants.LUXI_OVERRIDE
LUXI_OVERRIDE_MASTER = _constants.LUXI_OVERRIDE_MASTER
LUXI_OVERRIDE_QUERY = _constants.LUXI_OVERRIDE_QUERY
-# one of "no", "yes", "only"
+
SYSLOG_USAGE = _constants.SYSLOG_USAGE
SYSLOG_NO = _constants.SYSLOG_NO
SYSLOG_YES = _constants.SYSLOG_YES
HKR_FAIL = _constants.HKR_FAIL
HKR_SUCCESS = _constants.HKR_SUCCESS
-# Storage types
ST_BLOCK = _constants.ST_BLOCK
ST_DISKLESS = _constants.ST_DISKLESS
ST_EXT = _constants.ST_EXT
LDS_FAULTY = _constants.LDS_FAULTY
LDS_NAMES = _constants.LDS_NAMES
-# disk template types
DT_BLOCK = _constants.DT_BLOCK
DT_DISKLESS = _constants.DT_DISKLESS
DT_DRBD8 = _constants.DT_DRBD8
DTS_NO_FREE_SPACE_CHECK = _constants.DTS_NO_FREE_SPACE_CHECK
DTS_BLOCK = _constants.DTS_BLOCK
+DTS_DRBD = _constants.DTS_DRBD
+
DRBD_HMAC_ALG = _constants.DRBD_HMAC_ALG
DRBD_DEFAULT_NET_PROTOCOL = _constants.DRBD_DEFAULT_NET_PROTOCOL
DRBD_MIGRATION_NET_PROTOCOL = _constants.DRBD_MIGRATION_NET_PROTOCOL
DRBD_B_DISK_DRAIN = _constants.DRBD_B_DISK_DRAIN
DRBD_B_DISK_FLUSH = _constants.DRBD_B_DISK_FLUSH
+# the set of lvm-based disk templates
+DTS_LVM = DISK_TEMPLATES - DTS_NOT_LVM
+
# Valid barrier combinations: "n" or any non-null subset of "bfd"
DRBD_VALID_BARRIER_OPT = compat.UniqueFrozenset([
frozenset([DRBD_B_NONE]),
FD_LOOP = _constants.FD_LOOP
FILE_DRIVER = _constants.FILE_DRIVER
-LDS_DRBD = _constants.LDS_DRBD
-
-# disk access mode
DISK_RDONLY = _constants.DISK_RDONLY
DISK_RDWR = _constants.DISK_RDWR
DISK_ACCESS_SET = _constants.DISK_ACCESS_SET
REPLACE_DISK_AUTO = _constants.REPLACE_DISK_AUTO
REPLACE_MODES = _constants.REPLACE_MODES
-# Instance export mode
EXPORT_MODE_LOCAL = _constants.EXPORT_MODE_LOCAL
EXPORT_MODE_REMOTE = _constants.EXPORT_MODE_REMOTE
EXPORT_MODES = _constants.EXPORT_MODES
-# instance creation modes
INSTANCE_CREATE = _constants.INSTANCE_CREATE
INSTANCE_IMPORT = _constants.INSTANCE_IMPORT
INSTANCE_REMOTE_IMPORT = _constants.INSTANCE_REMOTE_IMPORT
INISECT_BEP = _constants.INISECT_BEP
INISECT_OSP = _constants.INISECT_OSP
-# dynamic device modification
DDM_ADD = _constants.DDM_ADD
DDM_MODIFY = _constants.DDM_MODIFY
DDM_REMOVE = _constants.DDM_REMOVE
DDMS_VALUES = _constants.DDMS_VALUES
DDMS_VALUES_WITH_MODIFY = _constants.DDMS_VALUES_WITH_MODIFY
-# TODO: DDM_SWAP, DDM_MOVE?
# common exit codes
EXIT_SUCCESS = _constants.EXIT_SUCCESS
EXIT_CONFIRMATION = _constants.EXIT_CONFIRMATION
EXIT_UNKNOWN_FIELD = _constants.EXIT_UNKNOWN_FIELD
-# tags
TAG_CLUSTER = _constants.TAG_CLUSTER
TAG_NODEGROUP = _constants.TAG_NODEGROUP
TAG_NODE = _constants.TAG_NODE
ES_PARAMETERS_FILE = _constants.ES_PARAMETERS_FILE
-# reboot types
INSTANCE_REBOOT_SOFT = _constants.INSTANCE_REBOOT_SOFT
INSTANCE_REBOOT_HARD = _constants.INSTANCE_REBOOT_HARD
INSTANCE_REBOOT_FULL = _constants.INSTANCE_REBOOT_FULL
DDP_LOCAL_MINOR = _constants.DDP_LOCAL_MINOR
DDP_REMOTE_MINOR = _constants.DDP_REMOTE_MINOR
-# OOB supported commands
OOB_POWER_ON = _constants.OOB_POWER_ON
OOB_POWER_OFF = _constants.OOB_POWER_OFF
OOB_POWER_CYCLE = _constants.OOB_POWER_CYCLE
INIC_PARAMS_TYPES = _constants.INIC_PARAMS_TYPES
INIC_PARAMS = _constants.INIC_PARAMS
-# Hypervisor constants
HT_XEN_PVM = _constants.HT_XEN_PVM
HT_FAKE = _constants.HT_FAKE
HT_XEN_HVM = _constants.HT_XEN_HVM
VNC_BASE_PORT = _constants.VNC_BASE_PORT
VNC_DEFAULT_BIND_ADDRESS = _constants.VNC_DEFAULT_BIND_ADDRESS
-# NIC types
-HT_NIC_RTL8139 = "rtl8139"
-HT_NIC_NE2K_PCI = "ne2k_pci"
-HT_NIC_NE2K_ISA = "ne2k_isa"
-HT_NIC_I82551 = "i82551"
-HT_NIC_I85557B = "i82557b"
-HT_NIC_I8259ER = "i82559er"
-HT_NIC_PCNET = "pcnet"
-HT_NIC_E1000 = "e1000"
-HT_NIC_PARAVIRTUAL = HT_DISK_PARAVIRTUAL = "paravirtual"
-
-HT_HVM_VALID_NIC_TYPES = compat.UniqueFrozenset([
- HT_NIC_RTL8139,
- HT_NIC_NE2K_PCI,
- HT_NIC_E1000,
- HT_NIC_NE2K_ISA,
- HT_NIC_PARAVIRTUAL,
- ])
-HT_KVM_VALID_NIC_TYPES = compat.UniqueFrozenset([
- HT_NIC_RTL8139,
- HT_NIC_NE2K_PCI,
- HT_NIC_NE2K_ISA,
- HT_NIC_I82551,
- HT_NIC_I85557B,
- HT_NIC_I8259ER,
- HT_NIC_PCNET,
- HT_NIC_E1000,
- HT_NIC_PARAVIRTUAL,
- ])
-
-# Vif types
-# default vif type in xen-hvm
-HT_HVM_VIF_IOEMU = "ioemu"
-HT_HVM_VIF_VIF = "vif"
-HT_HVM_VALID_VIF_TYPES = compat.UniqueFrozenset([
- HT_HVM_VIF_IOEMU,
- HT_HVM_VIF_VIF,
- ])
-
-# Disk types
-HT_DISK_IOEMU = "ioemu"
-HT_DISK_IDE = "ide"
-HT_DISK_SCSI = "scsi"
-HT_DISK_SD = "sd"
-HT_DISK_MTD = "mtd"
-HT_DISK_PFLASH = "pflash"
-
-HT_CACHE_DEFAULT = "default"
-HT_CACHE_NONE = "none"
-HT_CACHE_WTHROUGH = "writethrough"
-HT_CACHE_WBACK = "writeback"
-HT_VALID_CACHE_TYPES = compat.UniqueFrozenset([
- HT_CACHE_DEFAULT,
- HT_CACHE_NONE,
- HT_CACHE_WTHROUGH,
- HT_CACHE_WBACK,
- ])
-
-HT_HVM_VALID_DISK_TYPES = compat.UniqueFrozenset([
- HT_DISK_PARAVIRTUAL,
- HT_DISK_IOEMU,
- ])
-HT_KVM_VALID_DISK_TYPES = compat.UniqueFrozenset([
- HT_DISK_PARAVIRTUAL,
- HT_DISK_IDE,
- HT_DISK_SCSI,
- HT_DISK_SD,
- HT_DISK_MTD,
- HT_DISK_PFLASH,
- ])
-
-# Mouse types:
-HT_MOUSE_MOUSE = "mouse"
-HT_MOUSE_TABLET = "tablet"
-
-HT_KVM_VALID_MOUSE_TYPES = compat.UniqueFrozenset([
- HT_MOUSE_MOUSE,
- HT_MOUSE_TABLET,
- ])
-
-# Boot order
-HT_BO_FLOPPY = "floppy"
-HT_BO_CDROM = "cdrom"
-HT_BO_DISK = "disk"
-HT_BO_NETWORK = "network"
-
-HT_KVM_VALID_BO_TYPES = compat.UniqueFrozenset([
- HT_BO_FLOPPY,
- HT_BO_CDROM,
- HT_BO_DISK,
- HT_BO_NETWORK,
- ])
-
-# SPICE lossless image compression options
-HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ = "auto_glz"
-HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ = "auto_lz"
-HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC = "quic"
-HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ = "glz"
-HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ = "lz"
-HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF = "off"
-
-HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS = compat.UniqueFrozenset([
- HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ,
- HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ,
- HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC,
- HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ,
- HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ,
- HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF,
- ])
-
-# SPICE lossy image compression options (valid for both jpeg and zlib-glz)
-HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO = "auto"
-HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER = "never"
-HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS = "always"
-
-HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS = compat.UniqueFrozenset([
- HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO,
- HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER,
- HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS,
- ])
-
-# SPICE video stream detection
-HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF = "off"
-HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL = "all"
-HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER = "filter"
-
-HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS = compat.UniqueFrozenset([
- HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF,
- HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL,
- HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER,
- ])
-# Security models
-HT_SM_NONE = "none"
-HT_SM_USER = "user"
-HT_SM_POOL = "pool"
+HT_NIC_RTL8139 = _constants.HT_NIC_RTL8139
+HT_NIC_NE2K_PCI = _constants.HT_NIC_NE2K_PCI
+HT_NIC_NE2K_ISA = _constants.HT_NIC_NE2K_ISA
+HT_NIC_I82551 = _constants.HT_NIC_I82551
+HT_NIC_I85557B = _constants.HT_NIC_I85557B
+HT_NIC_I8259ER = _constants.HT_NIC_I8259ER
+HT_NIC_PCNET = _constants.HT_NIC_PCNET
+HT_NIC_E1000 = _constants.HT_NIC_E1000
+HT_NIC_PARAVIRTUAL = _constants.HT_NIC_PARAVIRTUAL
+HT_HVM_VALID_NIC_TYPES = _constants.HT_HVM_VALID_NIC_TYPES
+HT_KVM_VALID_NIC_TYPES = _constants.HT_KVM_VALID_NIC_TYPES
+
+HT_HVM_VIF_IOEMU = _constants.HT_HVM_VIF_IOEMU
+HT_HVM_VIF_VIF = _constants.HT_HVM_VIF_VIF
+HT_HVM_VALID_VIF_TYPES = _constants.HT_HVM_VALID_VIF_TYPES
+
+HT_DISK_IOEMU = _constants.HT_DISK_IOEMU
+HT_DISK_IDE = _constants.HT_DISK_IDE
+HT_DISK_SCSI = _constants.HT_DISK_SCSI
+HT_DISK_SD = _constants.HT_DISK_SD
+HT_DISK_MTD = _constants.HT_DISK_MTD
+HT_DISK_PFLASH = _constants.HT_DISK_PFLASH
+HT_DISK_PARAVIRTUAL = _constants.HT_DISK_PARAVIRTUAL
+HT_HVM_VALID_DISK_TYPES = _constants.HT_HVM_VALID_DISK_TYPES
+HT_KVM_VALID_DISK_TYPES = _constants.HT_KVM_VALID_DISK_TYPES
+
+HT_CACHE_DEFAULT = _constants.HT_CACHE_DEFAULT
+HT_CACHE_NONE = _constants.HT_CACHE_NONE
+HT_CACHE_WTHROUGH = _constants.HT_CACHE_WTHROUGH
+HT_CACHE_WBACK = _constants.HT_CACHE_WBACK
+HT_VALID_CACHE_TYPES = _constants.HT_VALID_CACHE_TYPES
+
+HT_MOUSE_MOUSE = _constants.HT_MOUSE_MOUSE
+HT_MOUSE_TABLET = _constants.HT_MOUSE_TABLET
+HT_KVM_VALID_MOUSE_TYPES = _constants.HT_KVM_VALID_MOUSE_TYPES
+
+HT_BO_FLOPPY = _constants.HT_BO_FLOPPY
+HT_BO_CDROM = _constants.HT_BO_CDROM
+HT_BO_DISK = _constants.HT_BO_DISK
+HT_BO_NETWORK = _constants.HT_BO_NETWORK
+HT_KVM_VALID_BO_TYPES = _constants.HT_KVM_VALID_BO_TYPES
+
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ = \
+ _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ = \
+ _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC = \
+ _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ = \
+ _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ = \
+ _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF = \
+ _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF
+HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS = \
+ _constants.HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS
+
+HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO = _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO
+HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER = \
+ _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER
+HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS = \
+ _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS
+
+HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS = \
+ _constants.HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS
+
+HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF = \
+ _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF
+HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL = \
+ _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL
+HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER = \
+ _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER
+HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS = \
+ _constants.HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS
+
+HT_SM_NONE = _constants.HT_SM_NONE
+HT_SM_USER = _constants.HT_SM_USER
+HT_SM_POOL = _constants.HT_SM_POOL
+HT_KVM_VALID_SM_TYPES = _constants.HT_KVM_VALID_SM_TYPES
+
+HT_KVM_ENABLED = _constants.HT_KVM_ENABLED
+HT_KVM_DISABLED = _constants.HT_KVM_DISABLED
+HT_KVM_FLAG_VALUES = _constants.HT_KVM_FLAG_VALUES
-HT_KVM_VALID_SM_TYPES = compat.UniqueFrozenset([
- HT_SM_NONE,
- HT_SM_USER,
- HT_SM_POOL,
- ])
-
-# Kvm flag values
-HT_KVM_ENABLED = "enabled"
-HT_KVM_DISABLED = "disabled"
-
-HT_KVM_FLAG_VALUES = compat.UniqueFrozenset([HT_KVM_ENABLED, HT_KVM_DISABLED])
-
-# Migration type
HT_MIGRATION_LIVE = _constants.HT_MIGRATION_LIVE
HT_MIGRATION_NONLIVE = _constants.HT_MIGRATION_NONLIVE
HT_MIGRATION_MODES = _constants.HT_MIGRATION_MODES
-# Cluster Verify steps
VERIFY_NPLUSONE_MEM = _constants.VERIFY_NPLUSONE_MEM
VERIFY_OPTIONAL_CHECKS = _constants.VERIFY_OPTIONAL_CHECKS
-# Cluster Verify error classes
CV_TCLUSTER = _constants.CV_TCLUSTER
CV_TGROUP = _constants.CV_TGROUP
CV_TNODE = _constants.CV_TNODE
CV_TINSTANCE = _constants.CV_TINSTANCE
-# Cluster Verify error codes and documentation
CV_ECLUSTERCFG = _constants.CV_ECLUSTERCFG
CV_ECLUSTERCERT = _constants.CV_ECLUSTERCERT
CV_ECLUSTERFILECHECK = _constants.CV_ECLUSTERFILECHECK
INSTST_ERRORDOWN = _constants.INSTST_ERRORDOWN
INSTST_ALL = _constants.INSTST_ALL
-# Admin states
ADMINST_UP = _constants.ADMINST_UP
ADMINST_DOWN = _constants.ADMINST_DOWN
ADMINST_OFFLINE = _constants.ADMINST_OFFLINE
ADMINST_ALL = _constants.ADMINST_ALL
-# Node roles
NR_REGULAR = _constants.NR_REGULAR
NR_MASTER = _constants.NR_MASTER
NR_MCANDIDATE = _constants.NR_MCANDIDATE
SSL_CERT_EXPIRATION_WARN = _constants.SSL_CERT_EXPIRATION_WARN
SSL_CERT_EXPIRATION_ERROR = _constants.SSL_CERT_EXPIRATION_ERROR
-# Allocator framework constants
IALLOCATOR_VERSION = _constants.IALLOCATOR_VERSION
IALLOCATOR_DIR_IN = _constants.IALLOCATOR_DIR_IN
IALLOCATOR_DIR_OUT = _constants.IALLOCATOR_DIR_OUT
IALLOCATOR_SEARCH_PATH = _constants.IALLOCATOR_SEARCH_PATH
DEFAULT_IALLOCATOR_SHORTCUT = _constants.DEFAULT_IALLOCATOR_SHORTCUT
-# Node evacuation
NODE_EVAC_PRI = _constants.NODE_EVAC_PRI
NODE_EVAC_SEC = _constants.NODE_EVAC_SEC
NODE_EVAC_ALL = _constants.NODE_EVAC_ALL
JOB_NOTCHANGED = _constants.JOB_NOTCHANGED
-# Job status
JOB_STATUS_QUEUED = _constants.JOB_STATUS_QUEUED
JOB_STATUS_WAITING = _constants.JOB_STATUS_WAITING
JOB_STATUS_CANCELING = _constants.JOB_STATUS_CANCELING
JOBS_FINALIZED = _constants.JOBS_FINALIZED
JOB_STATUS_ALL = _constants.JOB_STATUS_ALL
-# OpCode status
-# not yet finalized
OP_STATUS_QUEUED = _constants.OP_STATUS_QUEUED
OP_STATUS_WAITING = _constants.OP_STATUS_WAITING
OP_STATUS_CANCELING = _constants.OP_STATUS_CANCELING
OP_STATUS_RUNNING = _constants.OP_STATUS_RUNNING
-# finalized
OP_STATUS_CANCELED = _constants.OP_STATUS_CANCELED
OP_STATUS_SUCCESS = _constants.OP_STATUS_SUCCESS
OP_STATUS_ERROR = _constants.OP_STATUS_ERROR
OPS_FINALIZED = _constants.OPS_FINALIZED
-# OpCode priority
OP_PRIO_LOWEST = _constants.OP_PRIO_LOWEST
OP_PRIO_HIGHEST = _constants.OP_PRIO_HIGHEST
OP_PRIO_LOW = _constants.OP_PRIO_LOW
LOCK_ATTEMPTS_MAXWAIT = _constants.LOCK_ATTEMPTS_MAXWAIT
LOCK_ATTEMPTS_MINWAIT = _constants.LOCK_ATTEMPTS_MINWAIT
-# Execution log types
ELOG_MESSAGE = _constants.ELOG_MESSAGE
ELOG_REMOTE_IMPORT = _constants.ELOG_REMOTE_IMPORT
ELOG_JQUEUE_TEST = _constants.ELOG_JQUEUE_TEST
-# /etc/hosts modification
-ETC_HOSTS_ADD = "add"
-ETC_HOSTS_REMOVE = "remove"
-
-# Job queue test
-JQT_MSGPREFIX = "TESTMSG="
-JQT_EXPANDNAMES = "expandnames"
-JQT_EXEC = "exec"
-JQT_LOGMSG = "logmsg"
-JQT_STARTMSG = "startmsg"
-JQT_ALL = compat.UniqueFrozenset([
- JQT_EXPANDNAMES,
- JQT_EXEC,
- JQT_LOGMSG,
- JQT_STARTMSG,
- ])
-
-# Query resources
-QR_CLUSTER = "cluster"
-QR_INSTANCE = "instance"
-QR_NODE = "node"
-QR_LOCK = "lock"
-QR_GROUP = "group"
-QR_OS = "os"
-QR_JOB = "job"
-QR_EXPORT = "export"
-QR_NETWORK = "network"
-QR_EXTSTORAGE = "extstorage"
-
-#: List of resources which can be queried using L{opcodes.OpQuery}
-QR_VIA_OP = compat.UniqueFrozenset([
- QR_CLUSTER,
- QR_INSTANCE,
- QR_NODE,
- QR_GROUP,
- QR_OS,
- QR_EXPORT,
- QR_NETWORK,
- QR_EXTSTORAGE,
- ])
-
-#: List of resources which can be queried using Local UniX Interface
-QR_VIA_LUXI = QR_VIA_OP.union([
- QR_LOCK,
- QR_JOB,
- ])
-
-#: List of resources which can be queried using RAPI
-QR_VIA_RAPI = QR_VIA_LUXI
-
-# Query field types
-QFT_UNKNOWN = "unknown"
-QFT_TEXT = "text"
-QFT_BOOL = "bool"
-QFT_NUMBER = "number"
-QFT_UNIT = "unit"
-QFT_TIMESTAMP = "timestamp"
-QFT_OTHER = "other"
-
-#: All query field types
-QFT_ALL = compat.UniqueFrozenset([
- QFT_UNKNOWN,
- QFT_TEXT,
- QFT_BOOL,
- QFT_NUMBER,
- QFT_UNIT,
- QFT_TIMESTAMP,
- QFT_OTHER,
- ])
-
-# Query result field status (don't change or reuse values as they're used by
-# clients)
-#: Normal field status
-RS_NORMAL = 0
-#: Unknown field
-RS_UNKNOWN = 1
-#: No data (e.g. RPC error), can be used instead of L{RS_OFFLINE}
-RS_NODATA = 2
-#: Value unavailable/unsupported for item; if this field is supported
-#: but we cannot get the data for the moment, RS_NODATA or
-#: RS_OFFLINE should be used
-RS_UNAVAIL = 3
-#: Resource marked offline
-RS_OFFLINE = 4
-
-RS_ALL = compat.UniqueFrozenset([
- RS_NORMAL,
- RS_UNKNOWN,
- RS_NODATA,
- RS_UNAVAIL,
- RS_OFFLINE,
- ])
-
-#: Dictionary with special field cases and their verbose/terse formatting
-RSS_DESCRIPTION = {
- RS_UNKNOWN: ("(unknown)", "??"),
- RS_NODATA: ("(nodata)", "?"),
- RS_OFFLINE: ("(offline)", "*"),
- RS_UNAVAIL: ("(unavail)", "-"),
- }
-
-# max dynamic devices
-MAX_NICS = 8
-MAX_DISKS = 16
-
-# SSCONF file prefix
-SSCONF_FILEPREFIX = "ssconf_"
-# SSCONF keys
-SS_CLUSTER_NAME = "cluster_name"
-SS_CLUSTER_TAGS = "cluster_tags"
-SS_FILE_STORAGE_DIR = "file_storage_dir"
-SS_SHARED_FILE_STORAGE_DIR = "shared_file_storage_dir"
-SS_MASTER_CANDIDATES = "master_candidates"
-SS_MASTER_CANDIDATES_IPS = "master_candidates_ips"
-SS_MASTER_IP = "master_ip"
-SS_MASTER_NETDEV = "master_netdev"
-SS_MASTER_NETMASK = "master_netmask"
-SS_MASTER_NODE = "master_node"
-SS_NODE_LIST = "node_list"
-SS_NODE_PRIMARY_IPS = "node_primary_ips"
-SS_NODE_SECONDARY_IPS = "node_secondary_ips"
-SS_OFFLINE_NODES = "offline_nodes"
-SS_ONLINE_NODES = "online_nodes"
-SS_PRIMARY_IP_FAMILY = "primary_ip_family"
-SS_INSTANCE_LIST = "instance_list"
-SS_RELEASE_VERSION = "release_version"
-SS_HYPERVISOR_LIST = "hypervisor_list"
-SS_MAINTAIN_NODE_HEALTH = "maintain_node_health"
-SS_UID_POOL = "uid_pool"
-SS_NODEGROUPS = "nodegroups"
-SS_NETWORKS = "networks"
-
-# This is not a complete SSCONF key, but the prefix for the hypervisor keys
-SS_HVPARAMS_PREF = "hvparams_"
-
-# Hvparams keys:
-SS_HVPARAMS_XEN_PVM = SS_HVPARAMS_PREF + HT_XEN_PVM
-SS_HVPARAMS_XEN_FAKE = SS_HVPARAMS_PREF + HT_FAKE
-SS_HVPARAMS_XEN_HVM = SS_HVPARAMS_PREF + HT_XEN_HVM
-SS_HVPARAMS_XEN_KVM = SS_HVPARAMS_PREF + HT_KVM
-SS_HVPARAMS_XEN_CHROOT = SS_HVPARAMS_PREF + HT_CHROOT
-SS_HVPARAMS_XEN_LXC = SS_HVPARAMS_PREF + HT_LXC
-
-VALID_SS_HVPARAMS_KEYS = compat.UniqueFrozenset([
- SS_HVPARAMS_XEN_PVM,
- SS_HVPARAMS_XEN_FAKE,
- SS_HVPARAMS_XEN_HVM,
- SS_HVPARAMS_XEN_KVM,
- SS_HVPARAMS_XEN_CHROOT,
- SS_HVPARAMS_XEN_LXC,
- ])
-
-SS_FILE_PERMS = 0444
-
-# cluster wide default parameters
-DEFAULT_ENABLED_HYPERVISOR = HT_XEN_PVM
+ETC_HOSTS_ADD = _constants.ETC_HOSTS_ADD
+ETC_HOSTS_REMOVE = _constants.ETC_HOSTS_REMOVE
+
+JQT_MSGPREFIX = _constants.JQT_MSGPREFIX
+JQT_EXPANDNAMES = _constants.JQT_EXPANDNAMES
+JQT_EXEC = _constants.JQT_EXEC
+JQT_LOGMSG = _constants.JQT_LOGMSG
+JQT_STARTMSG = _constants.JQT_STARTMSG
+JQT_ALL = _constants.JQT_ALL
+
+QR_CLUSTER = _constants.QR_CLUSTER
+QR_INSTANCE = _constants.QR_INSTANCE
+QR_NODE = _constants.QR_NODE
+QR_LOCK = _constants.QR_LOCK
+QR_GROUP = _constants.QR_GROUP
+QR_OS = _constants.QR_OS
+QR_JOB = _constants.QR_JOB
+QR_EXPORT = _constants.QR_EXPORT
+QR_NETWORK = _constants.QR_NETWORK
+QR_EXTSTORAGE = _constants.QR_EXTSTORAGE
+QR_VIA_OP = _constants.QR_VIA_OP
+QR_VIA_LUXI = _constants.QR_VIA_LUXI
+QR_VIA_RAPI = _constants.QR_VIA_RAPI
+
+QFT_UNKNOWN = _constants.QFT_UNKNOWN
+QFT_TEXT = _constants.QFT_TEXT
+QFT_BOOL = _constants.QFT_BOOL
+QFT_NUMBER = _constants.QFT_NUMBER
+QFT_UNIT = _constants.QFT_UNIT
+QFT_TIMESTAMP = _constants.QFT_TIMESTAMP
+QFT_OTHER = _constants.QFT_OTHER
+QFT_ALL = _constants.QFT_ALL
+
+RS_NORMAL = _constants.RS_NORMAL
+RS_UNKNOWN = _constants.RS_UNKNOWN
+RS_NODATA = _constants.RS_NODATA
+RS_UNAVAIL = _constants.RS_UNAVAIL
+RS_OFFLINE = _constants.RS_OFFLINE
+RS_ALL = _constants.RS_ALL
+RSS_DESCRIPTION = _constants.RSS_DESCRIPTION
+
+MAX_NICS = _constants.MAX_NICS
+MAX_DISKS = _constants.MAX_DISKS
+
+SSCONF_FILEPREFIX = _constants.SSCONF_FILEPREFIX
+
+SS_CLUSTER_NAME = _constants.SS_CLUSTER_NAME
+SS_CLUSTER_TAGS = _constants.SS_CLUSTER_TAGS
+SS_FILE_STORAGE_DIR = _constants.SS_FILE_STORAGE_DIR
+SS_SHARED_FILE_STORAGE_DIR = _constants.SS_SHARED_FILE_STORAGE_DIR
+SS_MASTER_CANDIDATES = _constants.SS_MASTER_CANDIDATES
+SS_MASTER_CANDIDATES_IPS = _constants.SS_MASTER_CANDIDATES_IPS
+SS_MASTER_IP = _constants.SS_MASTER_IP
+SS_MASTER_NETDEV = _constants.SS_MASTER_NETDEV
+SS_MASTER_NETMASK = _constants.SS_MASTER_NETMASK
+SS_MASTER_NODE = _constants.SS_MASTER_NODE
+SS_NODE_LIST = _constants.SS_NODE_LIST
+SS_NODE_PRIMARY_IPS = _constants.SS_NODE_PRIMARY_IPS
+SS_NODE_SECONDARY_IPS = _constants.SS_NODE_SECONDARY_IPS
+SS_OFFLINE_NODES = _constants.SS_OFFLINE_NODES
+SS_ONLINE_NODES = _constants.SS_ONLINE_NODES
+SS_PRIMARY_IP_FAMILY = _constants.SS_PRIMARY_IP_FAMILY
+SS_INSTANCE_LIST = _constants.SS_INSTANCE_LIST
+SS_RELEASE_VERSION = _constants.SS_RELEASE_VERSION
+SS_HYPERVISOR_LIST = _constants.SS_HYPERVISOR_LIST
+SS_MAINTAIN_NODE_HEALTH = _constants.SS_MAINTAIN_NODE_HEALTH
+SS_UID_POOL = _constants.SS_UID_POOL
+SS_NODEGROUPS = _constants.SS_NODEGROUPS
+SS_NETWORKS = _constants.SS_NETWORKS
+
+SS_HVPARAMS_PREF = _constants.SS_HVPARAMS_PREF
+
+SS_HVPARAMS_XEN_PVM = _constants.SS_HVPARAMS_XEN_PVM
+SS_HVPARAMS_XEN_FAKE = _constants.SS_HVPARAMS_XEN_FAKE
+SS_HVPARAMS_XEN_HVM = _constants.SS_HVPARAMS_XEN_HVM
+SS_HVPARAMS_XEN_KVM = _constants.SS_HVPARAMS_XEN_KVM
+SS_HVPARAMS_XEN_CHROOT = _constants.SS_HVPARAMS_XEN_CHROOT
+SS_HVPARAMS_XEN_LXC = _constants.SS_HVPARAMS_XEN_LXC
+VALID_SS_HVPARAMS_KEYS = _constants.VALID_SS_HVPARAMS_KEYS
+
+SS_FILE_PERMS = _constants.SS_FILE_PERMS
+
+DEFAULT_ENABLED_HYPERVISOR = _constants.DEFAULT_ENABLED_HYPERVISOR
HVC_DEFAULTS = {
HT_XEN_PVM: {
},
}
-HVC_GLOBALS = compat.UniqueFrozenset([
- HV_MIGRATION_PORT,
- HV_MIGRATION_BANDWIDTH,
- HV_MIGRATION_MODE,
- HV_XEN_CMD,
- ])
+HVC_GLOBALS = _constants.HVC_GLOBALS
BEC_DEFAULTS = {
BE_MINMEM: 128,
ND_OVS_LINK: ""
}
-NDC_GLOBALS = compat.UniqueFrozenset([
- ND_EXCLUSIVE_STORAGE,
- ])
+NDC_GLOBALS = _constants.NDC_GLOBALS
DISK_LD_DEFAULTS = {
DT_DRBD8: {
NIC_VLAN: VALUE_HS_NOTHING,
}
-# All of the following values are quite arbitrarily - there are no
-# "good" defaults, these must be customised per-site
-ISPECS_MINMAX_DEFAULTS = {
- ISPECS_MIN: {
- ISPEC_MEM_SIZE: 128,
- ISPEC_CPU_COUNT: 1,
- ISPEC_DISK_COUNT: 1,
- ISPEC_DISK_SIZE: 1024,
- ISPEC_NIC_COUNT: 1,
- ISPEC_SPINDLE_USE: 1,
- },
- ISPECS_MAX: {
- ISPEC_MEM_SIZE: 32768,
- ISPEC_CPU_COUNT: 8,
- ISPEC_DISK_COUNT: MAX_DISKS,
- ISPEC_DISK_SIZE: 1024 * 1024,
- ISPEC_NIC_COUNT: MAX_NICS,
- ISPEC_SPINDLE_USE: 12,
- },
- }
+ISPECS_MINMAX_DEFAULTS = _constants.ISPECS_MINMAX_DEFAULTS
+
IPOLICY_DEFAULTS = {
ISPECS_MINMAX: [ISPECS_MINMAX_DEFAULTS],
ISPECS_STD: {
IPOLICY_SPINDLE_RATIO: 32.0,
}
-MASTER_POOL_SIZE_DEFAULT = 10
+MASTER_POOL_SIZE_DEFAULT = _constants.MASTER_POOL_SIZE_DEFAULT
-# Exclusive storage:
-# Error margin used to compare physical disks
-PART_MARGIN = .01
-# Space reserved when creating instance disks
-PART_RESERVED = .02
+PART_MARGIN = _constants.PART_MARGIN
+PART_RESERVED = _constants.PART_RESERVED
CONFD_PROTOCOL_VERSION = _constants.CONFD_PROTOCOL_VERSION
CONFD_REQ_NODE_INSTANCES = _constants.CONFD_REQ_NODE_INSTANCES
CONFD_REQS = _constants.CONFD_REQS
-# Confd request query fields. These are used to narrow down queries.
-# These must be strings rather than integers, because json-encoding
-# converts them to strings anyway, as they're used as dict-keys.
CONFD_REQQ_LINK = _constants.CONFD_REQQ_LINK
CONFD_REQQ_IP = _constants.CONFD_REQQ_IP
CONFD_REQQ_IPLIST = _constants.CONFD_REQQ_IPLIST
CONFD_ERROR_INTERNAL = _constants.CONFD_ERROR_INTERNAL
CONFD_ERROR_ARGUMENT = _constants.CONFD_ERROR_ARGUMENT
-# Each request is "salted" by the current timestamp.
-# This constants decides how many seconds of skew to accept.
-# TODO: make this a default and allow the value to be more configurable
CONFD_MAX_CLOCK_SKEW = _constants.CONFD_MAX_CLOCK_SKEW
-# When we haven't reloaded the config for more than this amount of
-# seconds, we force a test to see if inotify is betraying us. Using a
-# prime number to ensure we get less chance of 'same wakeup' with
-# other processes.
CONFD_CONFIG_RELOAD_TIMEOUT = _constants.CONFD_CONFIG_RELOAD_TIMEOUT
-
-# If we receive more than one update in this amount of microseconds,
-# we move to polling every RATELIMIT seconds, rather than relying on
-# inotify, to be able to serve more requests.
CONFD_CONFIG_RELOAD_RATELIMIT = _constants.CONFD_CONFIG_RELOAD_RATELIMIT
-# Magic number prepended to all confd queries.
-# This allows us to distinguish different types of confd protocols and handle
-# them. For example by changing this we can move the whole payload to be
-# compressed, or move away from json.
CONFD_MAGIC_FOURCC = _constants.CONFD_MAGIC_FOURCC
-# By default a confd request is sent to the minimum between this number and all
-# MCs. 6 was chosen because even in the case of a disastrous 50% response rate,
-# we should have enough answers to be able to compare more than one.
CONFD_DEFAULT_REQ_COVERAGE = _constants.CONFD_DEFAULT_REQ_COVERAGE
-# Timeout in seconds to expire pending query request in the confd client
-# library. We don't actually expect any answer more than 10 seconds after we
-# sent a request.
CONFD_CLIENT_EXPIRE_TIMEOUT = _constants.CONFD_CLIENT_EXPIRE_TIMEOUT
-# Maximum UDP datagram size.
-# On IPv4: 64K - 20 (ip header size) - 8 (udp header size) = 65507
-# On IPv6: 64K - 40 (ip6 header size) - 8 (udp header size) = 65487
-# (assuming we can't use jumbo frames)
-# We just set this to 60K, which should be enough
-MAX_UDP_DATA_SIZE = 61440
+MAX_UDP_DATA_SIZE = _constants.MAX_UDP_DATA_SIZE
-# User-id pool minimum/maximum acceptable user-ids.
-UIDPOOL_UID_MIN = 0
-UIDPOOL_UID_MAX = 2 ** 32 - 1 # Assuming 32 bit user-ids
+UIDPOOL_UID_MIN = _constants.UIDPOOL_UID_MIN
+UIDPOOL_UID_MAX = _constants.UIDPOOL_UID_MAX
-# Name or path of the pgrep command
-PGREP = "pgrep"
+PGREP = _constants.PGREP
-# Name of the node group that gets created at cluster init or upgrade
-INITIAL_NODE_GROUP_NAME = "default"
+INITIAL_NODE_GROUP_NAME = _constants.INITIAL_NODE_GROUP_NAME
-# Possible values for NodeGroup.alloc_policy
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 = _constants.BLOCKDEV_DRIVER_MANUAL
-# qemu-img path, required for ovfconverter
QEMUIMG_PATH = _constants.QEMUIMG_PATH
-# Whether htools was enabled at compilation time
HTOOLS = _constants.HTOOLS
-# The hail iallocator
-IALLOC_HAIL = "hail"
-
-# Fake opcodes for functions that have hooks attached to them via
-# backend.RunLocalHooks
-FAKE_OP_MASTER_TURNUP = "OP_CLUSTER_IP_TURNUP"
-FAKE_OP_MASTER_TURNDOWN = "OP_CLUSTER_IP_TURNDOWN"
-
-# SSH key types
-SSHK_RSA = "rsa"
-SSHK_DSA = "dsa"
-SSHK_ALL = compat.UniqueFrozenset([SSHK_RSA, SSHK_DSA])
-
-# SSH authorized key types
-SSHAK_RSA = "ssh-rsa"
-SSHAK_DSS = "ssh-dss"
-SSHAK_ALL = compat.UniqueFrozenset([SSHAK_RSA, SSHAK_DSS])
-
-# SSH setup
-SSHS_CLUSTER_NAME = "cluster_name"
-SSHS_SSH_HOST_KEY = "ssh_host_key"
-SSHS_SSH_ROOT_KEY = "ssh_root_key"
-SSHS_NODE_DAEMON_CERTIFICATE = "node_daemon_certificate"
-
-#: Key files for SSH daemon
+IALLOC_HAIL = _constants.IALLOC_HAIL
+
+FAKE_OP_MASTER_TURNUP = _constants.FAKE_OP_MASTER_TURNUP
+FAKE_OP_MASTER_TURNDOWN = _constants.FAKE_OP_MASTER_TURNDOWN
+
+SSHK_RSA = _constants.SSHK_RSA
+SSHK_DSA = _constants.SSHK_DSA
+SSHK_ALL = _constants.SSHK_ALL
+
+SSHAK_RSA = _constants.SSHAK_RSA
+SSHAK_DSS = _constants.SSHAK_DSS
+SSHAK_ALL = _constants.SSHAK_ALL
+
+SSHS_CLUSTER_NAME = _constants.SSHS_CLUSTER_NAME
+SSHS_SSH_HOST_KEY = _constants.SSHS_SSH_HOST_KEY
+SSHS_SSH_ROOT_KEY = _constants.SSHS_SSH_ROOT_KEY
+SSHS_NODE_DAEMON_CERTIFICATE = _constants.SSHS_NODE_DAEMON_CERTIFICATE
+
SSH_DAEMON_KEYFILES = {
SSHK_RSA: (pathutils.SSH_HOST_RSA_PRIV, pathutils.SSH_HOST_RSA_PUB),
SSHK_DSA: (pathutils.SSH_HOST_DSA_PRIV, pathutils.SSH_HOST_DSA_PUB),
}
-# Node daemon setup
-NDS_CLUSTER_NAME = "cluster_name"
-NDS_NODE_DAEMON_CERTIFICATE = "node_daemon_certificate"
-NDS_SSCONF = "ssconf"
-NDS_START_NODE_DAEMON = "start_node_daemon"
+NDS_CLUSTER_NAME = _constants.NDS_CLUSTER_NAME
+NDS_NODE_DAEMON_CERTIFICATE = _constants.NDS_NODE_DAEMON_CERTIFICATE
+NDS_SSCONF = _constants.NDS_SSCONF
+NDS_START_NODE_DAEMON = _constants.NDS_START_NODE_DAEMON
-# Path generating random UUID
RANDOM_UUID_FILE = _constants.RANDOM_UUID_FILE
# Regex string for verifying a 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 = _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 = _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 = _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 = _constants.BUILTIN_DATA_COLLECTOR_VERSION
-# The reason trail opcode parameter name
OPCODE_REASON = _constants.OPCODE_REASON
-# The source reasons for the execution of an OpCode
-OPCODE_REASON_SRC_CLIENT = "gnt:client"
-OPCODE_REASON_SRC_NODED = "gnt:daemon:noded"
-OPCODE_REASON_SRC_OPCODE = "gnt:opcode"
-OPCODE_REASON_SRC_RLIB2 = "gnt:library:rlib2"
-OPCODE_REASON_SRC_USER = "gnt:user"
-
-OPCODE_REASON_SOURCES = compat.UniqueFrozenset([
- OPCODE_REASON_SRC_CLIENT,
- OPCODE_REASON_SRC_NODED,
- OPCODE_REASON_SRC_OPCODE,
- OPCODE_REASON_SRC_RLIB2,
- OPCODE_REASON_SRC_USER,
- ])
+OPCODE_REASON_SRC_CLIENT = _constants.OPCODE_REASON_SRC_CLIENT
+OPCODE_REASON_SRC_NODED = _constants.OPCODE_REASON_SRC_NODED
+OPCODE_REASON_SRC_OPCODE = _constants.OPCODE_REASON_SRC_OPCODE
+OPCODE_REASON_SRC_RLIB2 = _constants.OPCODE_REASON_SRC_RLIB2
+OPCODE_REASON_SRC_USER = _constants.OPCODE_REASON_SRC_USER
+OPCODE_REASON_SOURCES = _constants.OPCODE_REASON_SOURCES
DISKSTATS_FILE = _constants.DISKSTATS_FILE
-# CPU load collector variables
STAT_FILE = _constants.STAT_FILE
CPUAVGLOAD_BUFFER_SIZE = _constants.CPUAVGLOAD_BUFFER_SIZE
CPUAVGLOAD_WINDOW_SIZE = _constants.CPUAVGLOAD_WINDOW_SIZE
-# Mond's variable for periodical data collection
MOND_TIME_INTERVAL = _constants.MOND_TIME_INTERVAL
# MonD's latest API version
UPGRADE_QUEUE_DRAIN_TIMEOUT = _constants.UPGRADE_QUEUE_DRAIN_TIMEOUT
UPGRADE_QUEUE_POLL_INTERVAL = _constants.UPGRADE_QUEUE_POLL_INTERVAL
+# device types to hotplug
+HOTPLUG_TARGET_DISK = _constants.HOTPLUG_TARGET_DISK
+HOTPLUG_TARGET_NIC = _constants.HOTPLUG_TARGET_NIC
+HOTPLUG_ALL_TARGETS = _constants.HOTPLUG_ALL_TARGETS
+
+# hotplug actions
+HOTPLUG_ACTION_ADD = _constants.HOTPLUG_ACTION_ADD
+HOTPLUG_ACTION_REMOVE = _constants.HOTPLUG_ACTION_REMOVE
+HOTPLUG_ACTION_MODIFY = _constants.HOTPLUG_ACTION_MODIFY
+HOTPLUG_ALL_ACTIONS = _constants.HOTPLUG_ALL_ACTIONS
+
+# other constants
+
+HAS_GNU_LN = _constants.HAS_GNU_LN
+
# Do not re-export imported modules
del re, _vcsversion, _constants, socket, pathutils, compat