4 # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 """Module holding different constants."""
27 from ganeti import _constants
28 from ganeti import _vcsversion
29 from ganeti import compat
30 from ganeti import pathutils
34 RELEASE_VERSION = _constants.RELEASE_VERSION
35 OS_API_V10 = _constants.OS_API_V10
36 OS_API_V15 = _constants.OS_API_V15
37 OS_API_V20 = _constants.OS_API_V20
38 OS_API_VERSIONS = _constants.OS_API_VERSIONS
39 VCS_VERSION = _vcsversion.VCS_VERSION
40 EXPORT_VERSION = _constants.EXPORT_VERSION
41 RAPI_VERSION = _constants.RAPI_VERSION
43 VERSION_MAJOR = _constants.VERSION_MAJOR
44 VERSION_MINOR = _constants.VERSION_MINOR
45 VERSION_REVISION = _constants.VERSION_REVISION
47 DIR_VERSION = _constants.DIR_VERSION
49 CONFIG_MAJOR = _constants.CONFIG_MAJOR
50 CONFIG_MINOR = _constants.CONFIG_MINOR
51 CONFIG_REVISION = _constants.CONFIG_REVISION
52 CONFIG_VERSION = _constants.CONFIG_VERSION
54 #: RPC protocol version
55 PROTOCOL_VERSION = _constants.PROTOCOL_VERSION
58 DAEMONS_GROUP = _constants.DAEMONS_GROUP
59 ADMIN_GROUP = _constants.ADMIN_GROUP
60 MASTERD_USER = _constants.MASTERD_USER
61 MASTERD_GROUP = _constants.MASTERD_GROUP
62 RAPI_USER = _constants.RAPI_USER
63 RAPI_GROUP = _constants.RAPI_GROUP
64 CONFD_USER = _constants.CONFD_USER
65 CONFD_GROUP = _constants.CONFD_GROUP
66 LUXID_USER = _constants.LUXID_USER
67 LUXID_GROUP = _constants.LUXID_GROUP
68 NODED_USER = _constants.NODED_USER
69 NODED_GROUP = _constants.NODED_GROUP
70 MOND_USER = _constants.MOND_USER
71 MOND_GROUP = _constants.MOND_GROUP
72 SSH_LOGIN_USER = _constants.SSH_LOGIN_USER
73 SSH_CONSOLE_USER = _constants.SSH_CONSOLE_USER
75 CPU_PINNING_SEP = _constants.CPU_PINNING_SEP
76 CPU_PINNING_ALL = _constants.CPU_PINNING_ALL
77 CPU_PINNING_ALL_VAL = _constants.CPU_PINNING_ALL_VAL
78 CPU_PINNING_OFF = _constants.CPU_PINNING_OFF
80 CPU_PINNING_ALL_XEN = _constants.CPU_PINNING_ALL_XEN
82 CPU_PINNING_ALL_KVM = _constants.CPU_PINNING_ALL_KVM
84 DD_CMD = _constants.DD_CMD
85 MAX_WIPE_CHUNK = _constants.MAX_WIPE_CHUNK
86 MIN_WIPE_CHUNK_PERCENT = _constants.MIN_WIPE_CHUNK_PERCENT
88 RUN_DIRS_MODE = _constants.RUN_DIRS_MODE
89 SECURE_DIR_MODE = _constants.SECURE_DIR_MODE
90 SECURE_FILE_MODE = _constants.SECURE_FILE_MODE
91 ADOPTABLE_BLOCKDEV_ROOT = _constants.ADOPTABLE_BLOCKDEV_ROOT
92 ENABLE_CONFD = _constants.ENABLE_CONFD
93 ENABLE_MOND = _constants.ENABLE_MOND
94 ENABLE_SPLIT_QUERY = _constants.ENABLE_SPLIT_QUERY
95 ENABLE_RESTRICTED_COMMANDS = _constants.ENABLE_RESTRICTED_COMMANDS
101 NODED = _constants.NODED
102 CONFD = _constants.CONFD
103 LUXID = _constants.LUXID
104 RAPI = _constants.RAPI
105 MASTERD = _constants.MASTERD
106 MOND = _constants.MOND
108 DAEMONS = _constants.DAEMONS
110 DAEMONS_PORTS = _constants.DAEMONS_PORTS
112 DEFAULT_NODED_PORT = _constants.DEFAULT_NODED_PORT
113 DEFAULT_CONFD_PORT = _constants.DEFAULT_CONFD_PORT
114 DEFAULT_MOND_PORT = _constants.DEFAULT_MOND_PORT
115 DEFAULT_RAPI_PORT = _constants.DEFAULT_RAPI_PORT
117 FIRST_DRBD_PORT = _constants.FIRST_DRBD_PORT
118 LAST_DRBD_PORT = _constants.LAST_DRBD_PORT
120 DAEMONS_LOGBASE = _constants.DAEMONS_LOGBASE
123 dict((daemon, pathutils.GetLogFilename(DAEMONS_LOGBASE[daemon]))
124 for daemon in DAEMONS_LOGBASE)
126 # Some daemons might require more than one logfile.
127 # Specifically, right now only the Haskell http library "snap", used by the
128 # monitoring daemon, requires multiple log files.
130 # These are the only valid reasons for having an extra logfile
131 EXTRA_LOGREASON_ACCESS = "access"
132 EXTRA_LOGREASON_ERROR = "error"
134 VALID_EXTRA_LOGREASONS = compat.UniqueFrozenset([
135 EXTRA_LOGREASON_ACCESS,
136 EXTRA_LOGREASON_ERROR,
139 # These are the extra logfiles, grouped by daemon
140 DAEMONS_EXTRA_LOGBASE = {
142 EXTRA_LOGREASON_ACCESS: _constants.EXTRA_LOGREASON_ACCESS,
143 EXTRA_LOGREASON_ERROR: _constants.EXTRA_LOGREASON_ERROR,
147 DAEMONS_EXTRA_LOGFILES = \
148 dict((daemon, dict((extra,
149 pathutils.GetLogFilename(DAEMONS_EXTRA_LOGBASE[daemon][extra]))
150 for extra in DAEMONS_EXTRA_LOGBASE[daemon]))
151 for daemon in DAEMONS_EXTRA_LOGBASE)
153 DEV_CONSOLE = _constants.DEV_CONSOLE
155 PROC_MOUNTS = _constants.PROC_MOUNTS
157 LUXI_EOM = _constants.LUXI_EOM
158 LUXI_VERSION = _constants.LUXI_VERSION
159 LUXI_OVERRIDE = _constants.LUXI_OVERRIDE
160 LUXI_OVERRIDE_MASTER = _constants.LUXI_OVERRIDE_MASTER
161 LUXI_OVERRIDE_QUERY = _constants.LUXI_OVERRIDE_QUERY
162 # one of "no", "yes", "only"
163 SYSLOG_USAGE = _constants.SYSLOG_USAGE
164 SYSLOG_NO = _constants.SYSLOG_NO
165 SYSLOG_YES = _constants.SYSLOG_YES
166 SYSLOG_ONLY = _constants.SYSLOG_ONLY
167 SYSLOG_SOCKET = _constants.SYSLOG_SOCKET
169 EXPORT_CONF_FILE = _constants.EXPORT_CONF_FILE
171 XEN_BOOTLOADER = _constants.XEN_BOOTLOADER
172 XEN_KERNEL = _constants.XEN_KERNEL
173 XEN_INITRD = _constants.XEN_INITRD
174 XEN_CMD_XM = _constants.XEN_CMD_XM
175 XEN_CMD_XL = _constants.XEN_CMD_XL
176 KNOWN_XEN_COMMANDS = _constants.KNOWN_XEN_COMMANDS
178 # When the Xen toolstack used is "xl", live migration requires the source host
179 # to connect to the target host via ssh (xl runs this command). We need to pass
180 # the command xl runs some extra info so that it can use Ganeti's key
181 # verification and not fail. Note that this string is incomplete: it must be
182 # filled with the cluster name before being used.
183 XL_SSH_CMD = ("ssh -l %s -oGlobalKnownHostsFile=%s"
184 " -oUserKnownHostsFile=/dev/null"
185 " -oCheckHostIp=no -oStrictHostKeyChecking=yes"
186 " -oHostKeyAlias=%%s") % (SSH_LOGIN_USER,
187 pathutils.SSH_KNOWN_HOSTS_FILE)
189 KVM_PATH = _constants.KVM_PATH
190 KVM_KERNEL = _constants.KVM_KERNEL
191 SOCAT_PATH = _constants.SOCAT_PATH
192 SOCAT_USE_ESCAPE = _constants.SOCAT_USE_ESCAPE
193 SOCAT_USE_COMPRESS = _constants.SOCAT_USE_COMPRESS
194 SOCAT_ESCAPE_CODE = _constants.SOCAT_ESCAPE_CODE
197 CONS_SSH = _constants.CONS_SSH
198 CONS_VNC = _constants.CONS_VNC
199 CONS_SPICE = _constants.CONS_SPICE
200 CONS_MESSAGE = _constants.CONS_MESSAGE
201 CONS_ALL = _constants.CONS_ALL
203 RSA_KEY_BITS = _constants.RSA_KEY_BITS
204 OPENSSL_CIPHERS = _constants.OPENSSL_CIPHERS
206 X509_CERT_SIGN_DIGEST = _constants.X509_CERT_SIGN_DIGEST
207 X509_CERT_DEFAULT_VALIDITY = _constants.X509_CERT_DEFAULT_VALIDITY
208 X509_CERT_CN = _constants.X509_CERT_CN
209 X509_CERT_SIGNATURE_HEADER = _constants.X509_CERT_SIGNATURE_HEADER
211 # Import/export daemon mode
212 IEM_IMPORT = _constants.IEM_IMPORT
213 IEM_EXPORT = _constants.IEM_EXPORT
215 # Import/export transport compression
216 IEC_NONE = _constants.IEC_NONE
217 IEC_GZIP = _constants.IEC_GZIP
218 IEC_ALL = _constants.IEC_ALL
220 IE_CUSTOM_SIZE = _constants.IE_CUSTOM_SIZE
222 IE_MAGIC_RE = re.compile(r"^[-_.a-zA-Z0-9]{5,100}$")
224 IEIO_FILE = _constants.IEIO_FILE
225 IEIO_RAW_DISK = _constants.IEIO_RAW_DISK
226 IEIO_SCRIPT = _constants.IEIO_SCRIPT
228 VALUE_DEFAULT = "default"
230 VALUE_GENERATE = "generate"
233 VALUE_FALSE = "false"
234 VALUE_HS_NOTHING = {"Nothing": None}
237 # External script validation mask
238 EXT_PLUGIN_MASK = re.compile("^[a-zA-Z0-9_-]+$")
240 HOOKS_PHASE_PRE = _constants.HOOKS_PHASE_PRE
241 HOOKS_PHASE_POST = _constants.HOOKS_PHASE_POST
242 HOOKS_NAME_CFGUPDATE = _constants.HOOKS_NAME_CFGUPDATE
243 HOOKS_NAME_WATCHER = _constants.HOOKS_NAME_WATCHER
244 HOOKS_VERSION = _constants.HOOKS_VERSION
245 HOOKS_PATH = _constants.HOOKS_PATH
247 HTYPE_CLUSTER = _constants.HTYPE_CLUSTER
248 HTYPE_NODE = _constants.HTYPE_NODE
249 HTYPE_GROUP = _constants.HTYPE_GROUP
250 HTYPE_INSTANCE = _constants.HTYPE_INSTANCE
251 HTYPE_NETWORK = _constants.HTYPE_NETWORK
253 HKR_SKIP = _constants.HKR_SKIP
254 HKR_FAIL = _constants.HKR_FAIL
255 HKR_SUCCESS = _constants.HKR_SUCCESS
258 ST_BLOCK = _constants.ST_BLOCK
259 ST_DISKLESS = _constants.ST_DISKLESS
260 ST_EXT = _constants.ST_EXT
261 ST_FILE = _constants.ST_FILE
262 ST_LVM_PV = _constants.ST_LVM_PV
263 ST_LVM_VG = _constants.ST_LVM_VG
264 ST_RADOS = _constants.ST_RADOS
265 STORAGE_TYPES = _constants.STORAGE_TYPES
266 STS_REPORT = _constants.STS_REPORT
269 # first two are valid in LU context only, not passed to backend
270 SF_NODE = _constants.SF_NODE
271 SF_TYPE = _constants.SF_TYPE
272 # and the rest are valid in backend
273 SF_NAME = _constants.SF_NAME
274 SF_SIZE = _constants.SF_SIZE
275 SF_FREE = _constants.SF_FREE
276 SF_USED = _constants.SF_USED
277 SF_ALLOCATABLE = _constants.SF_ALLOCATABLE
278 VALID_STORAGE_FIELDS = _constants.VALID_STORAGE_FIELDS
279 MODIFIABLE_STORAGE_FIELDS = _constants.MODIFIABLE_STORAGE_FIELDS
281 SO_FIX_CONSISTENCY = _constants.SO_FIX_CONSISTENCY
282 VALID_STORAGE_OPERATIONS = _constants.VALID_STORAGE_OPERATIONS
284 VF_DEV = _constants.VF_DEV
285 VF_INSTANCE = _constants.VF_INSTANCE
286 VF_NAME = _constants.VF_NAME
287 VF_NODE = _constants.VF_NODE
288 VF_PHYS = _constants.VF_PHYS
289 VF_SIZE = _constants.VF_SIZE
290 VF_VG = _constants.VF_VG
292 LDS_OKAY = _constants.LDS_OKAY
293 LDS_UNKNOWN = _constants.LDS_UNKNOWN
294 LDS_FAULTY = _constants.LDS_FAULTY
295 LDS_NAMES = _constants.LDS_NAMES
297 # disk template types
298 DT_BLOCK = _constants.DT_BLOCK
299 DT_DISKLESS = _constants.DT_DISKLESS
300 DT_DRBD8 = _constants.DT_DRBD8
301 DT_EXT = _constants.DT_EXT
302 DT_FILE = _constants.DT_FILE
303 DT_PLAIN = _constants.DT_PLAIN
304 DT_RBD = _constants.DT_RBD
305 DT_SHARED_FILE = _constants.DT_SHARED_FILE
306 DISK_TEMPLATE_PREFERENCE = _constants.DISK_TEMPLATE_PREFERENCE
307 DISK_TEMPLATES = _constants.DISK_TEMPLATES
308 DEFAULT_ENABLED_DISK_TEMPLATES = _constants.DEFAULT_ENABLED_DISK_TEMPLATES
310 MAP_DISK_TEMPLATE_STORAGE_TYPE = _constants.MAP_DISK_TEMPLATE_STORAGE_TYPE
312 DTS_INT_MIRROR = _constants.DTS_INT_MIRROR
313 DTS_EXT_MIRROR = _constants.DTS_EXT_MIRROR
314 DTS_NOT_LVM = _constants.DTS_NOT_LVM
315 DTS_GROWABLE = _constants.DTS_GROWABLE
316 DTS_MAY_ADOPT = _constants.DTS_MAY_ADOPT
317 DTS_MUST_ADOPT = _constants.DTS_MUST_ADOPT
318 DTS_MIRRORED = _constants.DTS_MIRRORED
319 DTS_FILEBASED = _constants.DTS_FILEBASED
320 DTS_COPYABLE = _constants.DTS_COPYABLE
321 DTS_EXCL_STORAGE = _constants.DTS_EXCL_STORAGE
322 DTS_NO_FREE_SPACE_CHECK = _constants.DTS_NO_FREE_SPACE_CHECK
323 DTS_BLOCK = _constants.DTS_BLOCK
325 DRBD_HMAC_ALG = _constants.DRBD_HMAC_ALG
326 DRBD_DEFAULT_NET_PROTOCOL = _constants.DRBD_DEFAULT_NET_PROTOCOL
327 DRBD_MIGRATION_NET_PROTOCOL = _constants.DRBD_MIGRATION_NET_PROTOCOL
328 DRBD_STATUS_FILE = _constants.DRBD_STATUS_FILE
329 DRBD_META_SIZE = _constants.DRBD_META_SIZE
331 DRBD_B_NONE = _constants.DRBD_B_NONE
332 DRBD_B_DISK_BARRIERS = _constants.DRBD_B_DISK_BARRIERS
333 DRBD_B_DISK_DRAIN = _constants.DRBD_B_DISK_DRAIN
334 DRBD_B_DISK_FLUSH = _constants.DRBD_B_DISK_FLUSH
336 # Valid barrier combinations: "n" or any non-null subset of "bfd"
337 DRBD_VALID_BARRIER_OPT = compat.UniqueFrozenset([
338 frozenset([DRBD_B_NONE]),
339 frozenset([DRBD_B_DISK_BARRIERS]),
340 frozenset([DRBD_B_DISK_DRAIN]),
341 frozenset([DRBD_B_DISK_FLUSH]),
342 frozenset([DRBD_B_DISK_DRAIN, DRBD_B_DISK_FLUSH]),
343 frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_DRAIN]),
344 frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_FLUSH]),
345 frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_FLUSH, DRBD_B_DISK_DRAIN]),
348 RBD_CMD = _constants.RBD_CMD
350 FD_BLKTAP = _constants.FD_BLKTAP
351 FD_LOOP = _constants.FD_LOOP
352 FILE_DRIVER = _constants.FILE_DRIVER
354 LDS_DRBD = _constants.LDS_DRBD
357 DISK_RDONLY = _constants.DISK_RDONLY
358 DISK_RDWR = _constants.DISK_RDWR
359 DISK_ACCESS_SET = _constants.DISK_ACCESS_SET
360 DISK_USERSPACE = _constants.DISK_USERSPACE
361 DISK_KERNELSPACE = _constants.DISK_KERNELSPACE
362 DISK_VALID_ACCESS_MODES = _constants.DISK_VALID_ACCESS_MODES
364 REPLACE_DISK_PRI = _constants.REPLACE_DISK_PRI
365 REPLACE_DISK_SEC = _constants.REPLACE_DISK_SEC
366 REPLACE_DISK_CHG = _constants.REPLACE_DISK_CHG
367 REPLACE_DISK_AUTO = _constants.REPLACE_DISK_AUTO
368 REPLACE_MODES = _constants.REPLACE_MODES
370 # Instance export mode
371 EXPORT_MODE_LOCAL = _constants.EXPORT_MODE_LOCAL
372 EXPORT_MODE_REMOTE = _constants.EXPORT_MODE_REMOTE
373 EXPORT_MODES = _constants.EXPORT_MODES
375 # instance creation modes
376 INSTANCE_CREATE = _constants.INSTANCE_CREATE
377 INSTANCE_IMPORT = _constants.INSTANCE_IMPORT
378 INSTANCE_REMOTE_IMPORT = _constants.INSTANCE_REMOTE_IMPORT
379 INSTANCE_CREATE_MODES = _constants.INSTANCE_CREATE_MODES
381 RIE_VERSION = _constants.RIE_VERSION
382 RIE_HANDSHAKE = _constants.RIE_HANDSHAKE
383 RIE_CERT_VALIDITY = _constants.RIE_CERT_VALIDITY
384 RIE_CONNECT_TIMEOUT = _constants.RIE_CONNECT_TIMEOUT
385 RIE_CONNECT_ATTEMPT_TIMEOUT = _constants.RIE_CONNECT_ATTEMPT_TIMEOUT
386 RIE_CONNECT_RETRIES = _constants.RIE_CONNECT_RETRIES
387 CHILD_LINGER_TIMEOUT = _constants.CHILD_LINGER_TIMEOUT
389 INISECT_EXP = _constants.INISECT_EXP
390 INISECT_INS = _constants.INISECT_INS
391 INISECT_HYP = _constants.INISECT_HYP
392 INISECT_BEP = _constants.INISECT_BEP
393 INISECT_OSP = _constants.INISECT_OSP
395 # dynamic device modification
396 DDM_ADD = _constants.DDM_ADD
397 DDM_MODIFY = _constants.DDM_MODIFY
398 DDM_REMOVE = _constants.DDM_REMOVE
399 DDMS_VALUES = _constants.DDMS_VALUES
400 DDMS_VALUES_WITH_MODIFY = _constants.DDMS_VALUES_WITH_MODIFY
401 # TODO: DDM_SWAP, DDM_MOVE?
404 EXIT_SUCCESS = _constants.EXIT_SUCCESS
405 EXIT_FAILURE = _constants.EXIT_FAILURE
406 EXIT_NOTCLUSTER = _constants.EXIT_NOTCLUSTER
407 EXIT_NOTMASTER = _constants.EXIT_NOTMASTER
408 EXIT_NODESETUP_ERROR = _constants.EXIT_NODESETUP_ERROR
409 EXIT_CONFIRMATION = _constants.EXIT_CONFIRMATION
410 EXIT_UNKNOWN_FIELD = _constants.EXIT_UNKNOWN_FIELD
413 TAG_CLUSTER = _constants.TAG_CLUSTER
414 TAG_NODEGROUP = _constants.TAG_NODEGROUP
415 TAG_NODE = _constants.TAG_NODE
416 TAG_INSTANCE = _constants.TAG_INSTANCE
417 TAG_NETWORK = _constants.TAG_NETWORK
418 VALID_TAG_TYPES = _constants.VALID_TAG_TYPES
420 MAX_TAG_LEN = _constants.MAX_TAG_LEN
421 MAX_TAGS_PER_OBJ = _constants.MAX_TAGS_PER_OBJ
424 DEFAULT_BRIDGE = _constants.DEFAULT_BRIDGE
425 DEFAULT_OVS = _constants.DEFAULT_OVS
426 CLASSIC_DRBD_SYNC_SPEED = _constants.CLASSIC_DRBD_SYNC_SPEED
427 IP4_ADDRESS_LOCALHOST = _constants.IP4_ADDRESS_LOCALHOST
428 IP4_ADDRESS_ANY = _constants.IP4_ADDRESS_ANY
429 IP6_ADDRESS_LOCALHOST = _constants.IP6_ADDRESS_LOCALHOST
430 IP6_ADDRESS_ANY = _constants.IP6_ADDRESS_ANY
431 IP4_VERSION = _constants.IP4_VERSION
432 IP6_VERSION = _constants.IP6_VERSION
433 VALID_IP_VERSIONS = _constants.VALID_IP_VERSIONS
434 # for export to htools
435 IP4_FAMILY = socket.AF_INET
436 IP6_FAMILY = socket.AF_INET6
438 TCP_PING_TIMEOUT = _constants.TCP_PING_TIMEOUT
439 DEFAULT_VG = _constants.DEFAULT_VG
440 DEFAULT_DRBD_HELPER = _constants.DEFAULT_DRBD_HELPER
441 MIN_VG_SIZE = _constants.MIN_VG_SIZE
442 DEFAULT_MAC_PREFIX = _constants.DEFAULT_MAC_PREFIX
443 DEFAULT_SHUTDOWN_TIMEOUT = _constants.DEFAULT_SHUTDOWN_TIMEOUT
444 NODE_MAX_CLOCK_SKEW = _constants.NODE_MAX_CLOCK_SKEW
445 DISK_TRANSFER_CONNECT_TIMEOUT = _constants.DISK_TRANSFER_CONNECT_TIMEOUT
446 DISK_SEPARATOR = _constants.DISK_SEPARATOR
447 IP_COMMAND_PATH = _constants.IP_COMMAND_PATH
448 JOB_IDS_KEY = _constants.JOB_IDS_KEY
450 RUNPARTS_SKIP = _constants.RUNPARTS_SKIP
451 RUNPARTS_RUN = _constants.RUNPARTS_RUN
452 RUNPARTS_ERR = _constants.RUNPARTS_ERR
453 RUNPARTS_STATUS = _constants.RUNPARTS_STATUS
455 RPC_ENCODING_NONE = _constants.RPC_ENCODING_NONE
456 RPC_ENCODING_ZLIB_BASE64 = _constants.RPC_ENCODING_ZLIB_BASE64
458 RPC_TMO_URGENT = _constants.RPC_TMO_URGENT
459 RPC_TMO_FAST = _constants.RPC_TMO_FAST
460 RPC_TMO_NORMAL = _constants.RPC_TMO_NORMAL
461 RPC_TMO_SLOW = _constants.RPC_TMO_SLOW
462 RPC_TMO_4HRS = _constants.RPC_TMO_4HRS
463 RPC_TMO_1DAY = _constants.RPC_TMO_1DAY
464 RPC_CONNECT_TIMEOUT = _constants.RPC_CONNECT_TIMEOUT
466 OS_SCRIPT_CREATE = _constants.OS_SCRIPT_CREATE
467 OS_SCRIPT_IMPORT = _constants.OS_SCRIPT_IMPORT
468 OS_SCRIPT_EXPORT = _constants.OS_SCRIPT_EXPORT
469 OS_SCRIPT_RENAME = _constants.OS_SCRIPT_RENAME
470 OS_SCRIPT_VERIFY = _constants.OS_SCRIPT_VERIFY
471 OS_SCRIPTS = _constants.OS_SCRIPTS
473 OS_API_FILE = _constants.OS_API_FILE
474 OS_VARIANTS_FILE = _constants.OS_VARIANTS_FILE
475 OS_PARAMETERS_FILE = _constants.OS_PARAMETERS_FILE
477 OS_VALIDATE_PARAMETERS = _constants.OS_VALIDATE_PARAMETERS
478 OS_VALIDATE_CALLS = _constants.OS_VALIDATE_CALLS
480 ES_ACTION_CREATE = _constants.ES_ACTION_CREATE
481 ES_ACTION_REMOVE = _constants.ES_ACTION_REMOVE
482 ES_ACTION_GROW = _constants.ES_ACTION_GROW
483 ES_ACTION_ATTACH = _constants.ES_ACTION_ATTACH
484 ES_ACTION_DETACH = _constants.ES_ACTION_DETACH
485 ES_ACTION_SETINFO = _constants.ES_ACTION_SETINFO
486 ES_ACTION_VERIFY = _constants.ES_ACTION_VERIFY
488 ES_SCRIPT_CREATE = _constants.ES_SCRIPT_CREATE
489 ES_SCRIPT_REMOVE = _constants.ES_SCRIPT_REMOVE
490 ES_SCRIPT_GROW = _constants.ES_SCRIPT_GROW
491 ES_SCRIPT_ATTACH = _constants.ES_SCRIPT_ATTACH
492 ES_SCRIPT_DETACH = _constants.ES_SCRIPT_DETACH
493 ES_SCRIPT_SETINFO = _constants.ES_SCRIPT_SETINFO
494 ES_SCRIPT_VERIFY = _constants.ES_SCRIPT_VERIFY
495 ES_SCRIPTS = _constants.ES_SCRIPTS
497 ES_PARAMETERS_FILE = _constants.ES_PARAMETERS_FILE
500 INSTANCE_REBOOT_SOFT = _constants.INSTANCE_REBOOT_SOFT
501 INSTANCE_REBOOT_HARD = _constants.INSTANCE_REBOOT_HARD
502 INSTANCE_REBOOT_FULL = _constants.INSTANCE_REBOOT_FULL
503 REBOOT_TYPES = _constants.REBOOT_TYPES
505 INSTANCE_REBOOT_ALLOWED = _constants.INSTANCE_REBOOT_ALLOWED
506 INSTANCE_REBOOT_EXIT = _constants.INSTANCE_REBOOT_EXIT
507 REBOOT_BEHAVIORS = _constants.REBOOT_BEHAVIORS
509 VTYPE_STRING = _constants.VTYPE_STRING
510 VTYPE_MAYBE_STRING = _constants.VTYPE_MAYBE_STRING
511 VTYPE_BOOL = _constants.VTYPE_BOOL
512 VTYPE_SIZE = _constants.VTYPE_SIZE
513 VTYPE_INT = _constants.VTYPE_INT
514 ENFORCEABLE_TYPES = _constants.ENFORCEABLE_TYPES
516 IFACE_NO_IP_VERSION_SPECIFIED = _constants.IFACE_NO_IP_VERSION_SPECIFIED
518 VALID_SERIAL_SPEEDS = _constants.VALID_SERIAL_SPEEDS
520 HV_BOOT_ORDER = _constants.HV_BOOT_ORDER
521 HV_CDROM_IMAGE_PATH = _constants.HV_CDROM_IMAGE_PATH
522 HV_KVM_CDROM2_IMAGE_PATH = _constants.HV_KVM_CDROM2_IMAGE_PATH
523 HV_KVM_FLOPPY_IMAGE_PATH = _constants.HV_KVM_FLOPPY_IMAGE_PATH
524 HV_NIC_TYPE = _constants.HV_NIC_TYPE
525 HV_DISK_TYPE = _constants.HV_DISK_TYPE
526 HV_KVM_CDROM_DISK_TYPE = _constants.HV_KVM_CDROM_DISK_TYPE
527 HV_VNC_BIND_ADDRESS = _constants.HV_VNC_BIND_ADDRESS
528 HV_VNC_PASSWORD_FILE = _constants.HV_VNC_PASSWORD_FILE
529 HV_VNC_TLS = _constants.HV_VNC_TLS
530 HV_VNC_X509 = _constants.HV_VNC_X509
531 HV_VNC_X509_VERIFY = _constants.HV_VNC_X509_VERIFY
532 HV_KVM_SPICE_BIND = _constants.HV_KVM_SPICE_BIND
533 HV_KVM_SPICE_IP_VERSION = _constants.HV_KVM_SPICE_IP_VERSION
534 HV_KVM_SPICE_PASSWORD_FILE = _constants.HV_KVM_SPICE_PASSWORD_FILE
535 HV_KVM_SPICE_LOSSLESS_IMG_COMPR = _constants.HV_KVM_SPICE_LOSSLESS_IMG_COMPR
536 HV_KVM_SPICE_JPEG_IMG_COMPR = _constants.HV_KVM_SPICE_JPEG_IMG_COMPR
537 HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR = _constants.HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR
538 HV_KVM_SPICE_STREAMING_VIDEO_DETECTION = \
539 _constants.HV_KVM_SPICE_STREAMING_VIDEO_DETECTION
540 HV_KVM_SPICE_AUDIO_COMPR = _constants.HV_KVM_SPICE_AUDIO_COMPR
541 HV_KVM_SPICE_USE_TLS = _constants.HV_KVM_SPICE_USE_TLS
542 HV_KVM_SPICE_TLS_CIPHERS = _constants.HV_KVM_SPICE_TLS_CIPHERS
543 HV_KVM_SPICE_USE_VDAGENT = _constants.HV_KVM_SPICE_USE_VDAGENT
544 HV_ACPI = _constants.HV_ACPI
545 HV_PAE = _constants.HV_PAE
546 HV_USE_BOOTLOADER = _constants.HV_USE_BOOTLOADER
547 HV_BOOTLOADER_ARGS = _constants.HV_BOOTLOADER_ARGS
548 HV_BOOTLOADER_PATH = _constants.HV_BOOTLOADER_PATH
549 HV_KERNEL_ARGS = _constants.HV_KERNEL_ARGS
550 HV_KERNEL_PATH = _constants.HV_KERNEL_PATH
551 HV_INITRD_PATH = _constants.HV_INITRD_PATH
552 HV_ROOT_PATH = _constants.HV_ROOT_PATH
553 HV_SERIAL_CONSOLE = _constants.HV_SERIAL_CONSOLE
554 HV_SERIAL_SPEED = _constants.HV_SERIAL_SPEED
555 HV_USB_MOUSE = _constants.HV_USB_MOUSE
556 HV_KEYMAP = _constants.HV_KEYMAP
557 HV_DEVICE_MODEL = _constants.HV_DEVICE_MODEL
558 HV_INIT_SCRIPT = _constants.HV_INIT_SCRIPT
559 HV_MIGRATION_PORT = _constants.HV_MIGRATION_PORT
560 HV_MIGRATION_BANDWIDTH = _constants.HV_MIGRATION_BANDWIDTH
561 HV_MIGRATION_DOWNTIME = _constants.HV_MIGRATION_DOWNTIME
562 HV_MIGRATION_MODE = _constants.HV_MIGRATION_MODE
563 HV_USE_LOCALTIME = _constants.HV_USE_LOCALTIME
564 HV_DISK_CACHE = _constants.HV_DISK_CACHE
565 HV_SECURITY_MODEL = _constants.HV_SECURITY_MODEL
566 HV_SECURITY_DOMAIN = _constants.HV_SECURITY_DOMAIN
567 HV_KVM_FLAG = _constants.HV_KVM_FLAG
568 HV_VHOST_NET = _constants.HV_VHOST_NET
569 HV_KVM_USE_CHROOT = _constants.HV_KVM_USE_CHROOT
570 HV_CPU_MASK = _constants.HV_CPU_MASK
571 HV_MEM_PATH = _constants.HV_MEM_PATH
572 HV_PASSTHROUGH = _constants.HV_PASSTHROUGH
573 HV_BLOCKDEV_PREFIX = _constants.HV_BLOCKDEV_PREFIX
574 HV_REBOOT_BEHAVIOR = _constants.HV_REBOOT_BEHAVIOR
575 HV_CPU_TYPE = _constants.HV_CPU_TYPE
576 HV_CPU_CAP = _constants.HV_CPU_CAP
577 HV_CPU_WEIGHT = _constants.HV_CPU_WEIGHT
578 HV_CPU_CORES = _constants.HV_CPU_CORES
579 HV_CPU_THREADS = _constants.HV_CPU_THREADS
580 HV_CPU_SOCKETS = _constants.HV_CPU_SOCKETS
581 HV_SOUNDHW = _constants.HV_SOUNDHW
582 HV_USB_DEVICES = _constants.HV_USB_DEVICES
583 HV_VGA = _constants.HV_VGA
584 HV_KVM_EXTRA = _constants.HV_KVM_EXTRA
585 HV_KVM_MACHINE_VERSION = _constants.HV_KVM_MACHINE_VERSION
586 HV_KVM_PATH = _constants.HV_KVM_PATH
587 HV_VIF_TYPE = _constants.HV_VIF_TYPE
588 HV_VIF_SCRIPT = _constants.HV_VIF_SCRIPT
589 HV_XEN_CMD = _constants.HV_XEN_CMD
590 HV_XEN_CPUID = _constants.HV_XEN_CPUID
591 HV_VNET_HDR = _constants.HV_VNET_HDR
592 HV_VIRIDIAN = _constants.HV_VIRIDIAN
594 HVS_PARAMETER_TYPES = {
595 HV_KVM_PATH: VTYPE_STRING,
596 HV_BOOT_ORDER: VTYPE_STRING,
597 HV_KVM_FLOPPY_IMAGE_PATH: VTYPE_STRING,
598 HV_CDROM_IMAGE_PATH: VTYPE_STRING,
599 HV_KVM_CDROM2_IMAGE_PATH: VTYPE_STRING,
600 HV_NIC_TYPE: VTYPE_STRING,
601 HV_DISK_TYPE: VTYPE_STRING,
602 HV_KVM_CDROM_DISK_TYPE: VTYPE_STRING,
603 HV_VNC_PASSWORD_FILE: VTYPE_STRING,
604 HV_VNC_BIND_ADDRESS: VTYPE_STRING,
605 HV_VNC_TLS: VTYPE_BOOL,
606 HV_VNC_X509: VTYPE_STRING,
607 HV_VNC_X509_VERIFY: VTYPE_BOOL,
608 HV_KVM_SPICE_BIND: VTYPE_STRING,
609 HV_KVM_SPICE_IP_VERSION: VTYPE_INT,
610 HV_KVM_SPICE_PASSWORD_FILE: VTYPE_STRING,
611 HV_KVM_SPICE_LOSSLESS_IMG_COMPR: VTYPE_STRING,
612 HV_KVM_SPICE_JPEG_IMG_COMPR: VTYPE_STRING,
613 HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR: VTYPE_STRING,
614 HV_KVM_SPICE_STREAMING_VIDEO_DETECTION: VTYPE_STRING,
615 HV_KVM_SPICE_AUDIO_COMPR: VTYPE_BOOL,
616 HV_KVM_SPICE_USE_TLS: VTYPE_BOOL,
617 HV_KVM_SPICE_TLS_CIPHERS: VTYPE_STRING,
618 HV_KVM_SPICE_USE_VDAGENT: VTYPE_BOOL,
621 HV_USE_BOOTLOADER: VTYPE_BOOL,
622 HV_BOOTLOADER_PATH: VTYPE_STRING,
623 HV_BOOTLOADER_ARGS: VTYPE_STRING,
624 HV_KERNEL_PATH: VTYPE_STRING,
625 HV_KERNEL_ARGS: VTYPE_STRING,
626 HV_INITRD_PATH: VTYPE_STRING,
627 HV_ROOT_PATH: VTYPE_MAYBE_STRING,
628 HV_SERIAL_CONSOLE: VTYPE_BOOL,
629 HV_SERIAL_SPEED: VTYPE_INT,
630 HV_USB_MOUSE: VTYPE_STRING,
631 HV_KEYMAP: VTYPE_STRING,
632 HV_DEVICE_MODEL: VTYPE_STRING,
633 HV_INIT_SCRIPT: VTYPE_STRING,
634 HV_MIGRATION_PORT: VTYPE_INT,
635 HV_MIGRATION_BANDWIDTH: VTYPE_INT,
636 HV_MIGRATION_DOWNTIME: VTYPE_INT,
637 HV_MIGRATION_MODE: VTYPE_STRING,
638 HV_USE_LOCALTIME: VTYPE_BOOL,
639 HV_DISK_CACHE: VTYPE_STRING,
640 HV_SECURITY_MODEL: VTYPE_STRING,
641 HV_SECURITY_DOMAIN: VTYPE_STRING,
642 HV_KVM_FLAG: VTYPE_STRING,
643 HV_VHOST_NET: VTYPE_BOOL,
644 HV_KVM_USE_CHROOT: VTYPE_BOOL,
645 HV_CPU_MASK: VTYPE_STRING,
646 HV_MEM_PATH: VTYPE_STRING,
647 HV_PASSTHROUGH: VTYPE_STRING,
648 HV_BLOCKDEV_PREFIX: VTYPE_STRING,
649 HV_REBOOT_BEHAVIOR: VTYPE_STRING,
650 HV_CPU_TYPE: VTYPE_STRING,
651 HV_CPU_CAP: VTYPE_INT,
652 HV_CPU_WEIGHT: VTYPE_INT,
653 HV_CPU_CORES: VTYPE_INT,
654 HV_CPU_THREADS: VTYPE_INT,
655 HV_CPU_SOCKETS: VTYPE_INT,
656 HV_SOUNDHW: VTYPE_STRING,
657 HV_USB_DEVICES: VTYPE_STRING,
658 HV_VGA: VTYPE_STRING,
659 HV_KVM_EXTRA: VTYPE_STRING,
660 HV_KVM_MACHINE_VERSION: VTYPE_STRING,
661 HV_VIF_TYPE: VTYPE_STRING,
662 HV_VIF_SCRIPT: VTYPE_STRING,
663 HV_XEN_CMD: VTYPE_STRING,
664 HV_XEN_CPUID: VTYPE_STRING,
665 HV_VNET_HDR: VTYPE_BOOL,
666 HV_VIRIDIAN: VTYPE_BOOL,
669 HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
671 HVS_PARAMETER_TITLES = _constants.HVS_PARAMETER_TITLES
673 HV_MIGRATION_COMPLETED = _constants.HV_MIGRATION_COMPLETED
674 HV_MIGRATION_ACTIVE = _constants.HV_MIGRATION_ACTIVE
675 HV_MIGRATION_FAILED = _constants.HV_MIGRATION_FAILED
676 HV_MIGRATION_CANCELLED = _constants.HV_MIGRATION_CANCELLED
677 HV_MIGRATION_VALID_STATUSES = _constants.HV_MIGRATION_VALID_STATUSES
678 HV_MIGRATION_FAILED_STATUSES = _constants.HV_MIGRATION_FAILED_STATUSES
679 HV_KVM_MIGRATION_VALID_STATUSES = _constants.HV_KVM_MIGRATION_VALID_STATUSES
681 HV_NODEINFO_KEY_VERSION = _constants.HV_NODEINFO_KEY_VERSION
683 HVST_MEMORY_TOTAL = _constants.HVST_MEMORY_TOTAL
684 HVST_MEMORY_NODE = _constants.HVST_MEMORY_NODE
685 HVST_MEMORY_HV = _constants.HVST_MEMORY_HV
686 HVST_CPU_TOTAL = _constants.HVST_CPU_TOTAL
687 HVST_CPU_NODE = _constants.HVST_CPU_NODE
688 HVSTS_PARAMETERS = _constants.HVSTS_PARAMETERS
689 HVST_DEFAULTS = _constants.HVST_DEFAULTS
690 HVSTS_PARAMETER_TYPES = _constants.HVSTS_PARAMETER_TYPES
692 DS_DISK_TOTAL = _constants.DS_DISK_TOTAL
693 DS_DISK_RESERVED = _constants.DS_DISK_RESERVED
694 DS_DISK_OVERHEAD = _constants.DS_DISK_OVERHEAD
695 DS_DEFAULTS = _constants.DS_DEFAULTS
696 DSS_PARAMETER_TYPES = _constants.DSS_PARAMETER_TYPES
697 DSS_PARAMETERS = _constants.DSS_PARAMETERS
698 DS_VALID_TYPES = _constants.DS_VALID_TYPES
700 BE_MEMORY = _constants.BE_MEMORY
701 BE_MAXMEM = _constants.BE_MAXMEM
702 BE_MINMEM = _constants.BE_MINMEM
703 BE_VCPUS = _constants.BE_VCPUS
704 BE_AUTO_BALANCE = _constants.BE_AUTO_BALANCE
705 BE_ALWAYS_FAILOVER = _constants.BE_ALWAYS_FAILOVER
706 BE_SPINDLE_USE = _constants.BE_SPINDLE_USE
707 BES_PARAMETER_TYPES = _constants.BES_PARAMETER_TYPES
708 BES_PARAMETER_TITLES = _constants.BES_PARAMETER_TITLES
709 BES_PARAMETER_COMPAT = _constants.BES_PARAMETER_COMPAT
710 BES_PARAMETERS = _constants.BES_PARAMETERS
712 ISPEC_MEM_SIZE = _constants.ISPEC_MEM_SIZE
713 ISPEC_CPU_COUNT = _constants.ISPEC_CPU_COUNT
714 ISPEC_DISK_COUNT = _constants.ISPEC_DISK_COUNT
715 ISPEC_DISK_SIZE = _constants.ISPEC_DISK_SIZE
716 ISPEC_NIC_COUNT = _constants.ISPEC_NIC_COUNT
717 ISPEC_SPINDLE_USE = _constants.ISPEC_SPINDLE_USE
718 ISPECS_PARAMETER_TYPES = _constants.ISPECS_PARAMETER_TYPES
719 ISPECS_PARAMETERS = _constants.ISPECS_PARAMETERS
721 ISPECS_MINMAX = _constants.ISPECS_MINMAX
722 ISPECS_MIN = _constants.ISPECS_MIN
723 ISPECS_MAX = _constants.ISPECS_MAX
724 ISPECS_STD = _constants.ISPECS_STD
725 IPOLICY_DTS = _constants.IPOLICY_DTS
726 IPOLICY_VCPU_RATIO = _constants.IPOLICY_VCPU_RATIO
727 IPOLICY_SPINDLE_RATIO = _constants.IPOLICY_SPINDLE_RATIO
728 ISPECS_MINMAX_KEYS = _constants.ISPECS_MINMAX_KEYS
729 IPOLICY_PARAMETERS = _constants.IPOLICY_PARAMETERS
730 IPOLICY_ALL_KEYS = _constants.IPOLICY_ALL_KEYS
732 ND_OOB_PROGRAM = _constants.ND_OOB_PROGRAM
733 ND_SPINDLE_COUNT = _constants.ND_SPINDLE_COUNT
734 ND_EXCLUSIVE_STORAGE = _constants.ND_EXCLUSIVE_STORAGE
735 ND_OVS = _constants.ND_OVS
736 ND_OVS_NAME = _constants.ND_OVS_NAME
737 ND_OVS_LINK = _constants.ND_OVS_LINK
739 NDS_PARAMETER_TYPES = _constants.NDS_PARAMETER_TYPES
740 NDS_PARAMETERS = _constants.NDS_PARAMETERS
741 NDS_PARAMETER_TITLES = _constants.NDS_PARAMETER_TITLES
743 LDP_RESYNC_RATE = _constants.LDP_RESYNC_RATE
744 LDP_STRIPES = _constants.LDP_STRIPES
745 LDP_BARRIERS = _constants.LDP_BARRIERS
746 LDP_NO_META_FLUSH = _constants.LDP_NO_META_FLUSH
747 LDP_DEFAULT_METAVG = _constants.LDP_DEFAULT_METAVG
748 LDP_DISK_CUSTOM = _constants.LDP_DISK_CUSTOM
749 LDP_NET_CUSTOM = _constants.LDP_NET_CUSTOM
750 LDP_PROTOCOL = _constants.LDP_PROTOCOL
751 LDP_DYNAMIC_RESYNC = _constants.LDP_DYNAMIC_RESYNC
752 LDP_PLAN_AHEAD = _constants.LDP_PLAN_AHEAD
753 LDP_FILL_TARGET = _constants.LDP_FILL_TARGET
754 LDP_DELAY_TARGET = _constants.LDP_DELAY_TARGET
755 LDP_MAX_RATE = _constants.LDP_MAX_RATE
756 LDP_MIN_RATE = _constants.LDP_MIN_RATE
757 LDP_POOL = _constants.LDP_POOL
758 LDP_ACCESS = _constants.LDP_ACCESS
759 DISK_LD_TYPES = _constants.DISK_LD_TYPES
760 DISK_LD_PARAMETERS = _constants.DISK_LD_PARAMETERS
762 DRBD_RESYNC_RATE = _constants.DRBD_RESYNC_RATE
763 DRBD_DATA_STRIPES = _constants.DRBD_DATA_STRIPES
764 DRBD_META_STRIPES = _constants.DRBD_META_STRIPES
765 DRBD_DISK_BARRIERS = _constants.DRBD_DISK_BARRIERS
766 DRBD_META_BARRIERS = _constants.DRBD_META_BARRIERS
767 DRBD_DEFAULT_METAVG = _constants.DRBD_DEFAULT_METAVG
768 DRBD_DISK_CUSTOM = _constants.DRBD_DISK_CUSTOM
769 DRBD_NET_CUSTOM = _constants.DRBD_NET_CUSTOM
770 DRBD_PROTOCOL = _constants.DRBD_PROTOCOL
771 DRBD_DYNAMIC_RESYNC = _constants.DRBD_DYNAMIC_RESYNC
772 DRBD_PLAN_AHEAD = _constants.DRBD_PLAN_AHEAD
773 DRBD_FILL_TARGET = _constants.DRBD_FILL_TARGET
774 DRBD_DELAY_TARGET = _constants.DRBD_DELAY_TARGET
775 DRBD_MAX_RATE = _constants.DRBD_MAX_RATE
776 DRBD_MIN_RATE = _constants.DRBD_MIN_RATE
777 LV_STRIPES = _constants.LV_STRIPES
778 RBD_ACCESS = _constants.RBD_ACCESS
779 RBD_POOL = _constants.RBD_POOL
780 DISK_DT_TYPES = _constants.DISK_DT_TYPES
781 DISK_DT_PARAMETERS = _constants.DISK_DT_PARAMETERS
783 DDP_LOCAL_IP = _constants.DDP_LOCAL_IP
784 DDP_REMOTE_IP = _constants.DDP_REMOTE_IP
785 DDP_PORT = _constants.DDP_PORT
786 DDP_LOCAL_MINOR = _constants.DDP_LOCAL_MINOR
787 DDP_REMOTE_MINOR = _constants.DDP_REMOTE_MINOR
789 # OOB supported commands
790 OOB_POWER_ON = _constants.OOB_POWER_ON
791 OOB_POWER_OFF = _constants.OOB_POWER_OFF
792 OOB_POWER_CYCLE = _constants.OOB_POWER_CYCLE
793 OOB_POWER_STATUS = _constants.OOB_POWER_STATUS
794 OOB_HEALTH = _constants.OOB_HEALTH
795 OOB_COMMANDS = _constants.OOB_COMMANDS
797 OOB_POWER_STATUS_POWERED = _constants.OOB_POWER_STATUS_POWERED
799 OOB_TIMEOUT = _constants.OOB_TIMEOUT
800 OOB_POWER_DELAY = _constants.OOB_POWER_DELAY
802 OOB_STATUS_OK = _constants.OOB_STATUS_OK
803 OOB_STATUS_WARNING = _constants.OOB_STATUS_WARNING
804 OOB_STATUS_CRITICAL = _constants.OOB_STATUS_CRITICAL
805 OOB_STATUS_UNKNOWN = _constants.OOB_STATUS_UNKNOWN
806 OOB_STATUSES = _constants.OOB_STATUSES
808 PP_DEFAULT = _constants.PP_DEFAULT
810 NIC_MODE = _constants.NIC_MODE
811 NIC_LINK = _constants.NIC_LINK
812 NIC_VLAN = _constants.NIC_VLAN
813 NICS_PARAMETER_TYPES = _constants.NICS_PARAMETER_TYPES
814 NICS_PARAMETERS = _constants.NICS_PARAMETERS
816 NIC_MODE_BRIDGED = _constants.NIC_MODE_BRIDGED
817 NIC_MODE_ROUTED = _constants.NIC_MODE_ROUTED
818 NIC_MODE_OVS = _constants.NIC_MODE_OVS
819 NIC_IP_POOL = _constants.NIC_IP_POOL
820 NIC_VALID_MODES = _constants.NIC_VALID_MODES
822 RESERVE_ACTION = _constants.RESERVE_ACTION
823 RELEASE_ACTION = _constants.RELEASE_ACTION
825 IDISK_SIZE = _constants.IDISK_SIZE
826 IDISK_SPINDLES = _constants.IDISK_SPINDLES
827 IDISK_MODE = _constants.IDISK_MODE
828 IDISK_ADOPT = _constants.IDISK_ADOPT
829 IDISK_VG = _constants.IDISK_VG
830 IDISK_METAVG = _constants.IDISK_METAVG
831 IDISK_PROVIDER = _constants.IDISK_PROVIDER
832 IDISK_NAME = _constants.IDISK_NAME
833 IDISK_PARAMS_TYPES = _constants.IDISK_PARAMS_TYPES
834 IDISK_PARAMS = _constants.IDISK_PARAMS
836 INIC_MAC = _constants.INIC_MAC
837 INIC_IP = _constants.INIC_IP
838 INIC_MODE = _constants.INIC_MODE
839 INIC_LINK = _constants.INIC_LINK
840 INIC_NETWORK = _constants.INIC_NETWORK
841 INIC_NAME = _constants.INIC_NAME
842 INIC_VLAN = _constants.INIC_VLAN
843 INIC_BRIDGE = _constants.INIC_BRIDGE
844 INIC_PARAMS_TYPES = _constants.INIC_PARAMS_TYPES
845 INIC_PARAMS = _constants.INIC_PARAMS
847 # Hypervisor constants
848 HT_XEN_PVM = _constants.HT_XEN_PVM
849 HT_FAKE = _constants.HT_FAKE
850 HT_XEN_HVM = _constants.HT_XEN_HVM
851 HT_KVM = _constants.HT_KVM
852 HT_CHROOT = _constants.HT_CHROOT
853 HT_LXC = _constants.HT_LXC
854 HYPER_TYPES = _constants.HYPER_TYPES
855 HTS_REQ_PORT = _constants.HTS_REQ_PORT
857 VNC_BASE_PORT = _constants.VNC_BASE_PORT
858 VNC_DEFAULT_BIND_ADDRESS = _constants.VNC_DEFAULT_BIND_ADDRESS
861 HT_NIC_RTL8139 = _constants.HT_NIC_RTL8139
862 HT_NIC_NE2K_PCI = _constants.HT_NIC_NE2K_PCI
863 HT_NIC_NE2K_ISA = _constants.HT_NIC_NE2K_ISA
864 HT_NIC_I82551 = _constants.HT_NIC_I82551
865 HT_NIC_I85557B = _constants.HT_NIC_I85557B
866 HT_NIC_I8259ER = _constants.HT_NIC_I8259ER
867 HT_NIC_PCNET = _constants.HT_NIC_PCNET
868 HT_NIC_E1000 = _constants.HT_NIC_E1000
869 HT_NIC_PARAVIRTUAL = _constants.HT_NIC_PARAVIRTUAL
870 HT_HVM_VALID_NIC_TYPES = _constants.HT_HVM_VALID_NIC_TYPES
871 HT_KVM_VALID_NIC_TYPES = _constants.HT_KVM_VALID_NIC_TYPES
873 HT_HVM_VIF_IOEMU = _constants.HT_HVM_VIF_IOEMU
874 HT_HVM_VIF_VIF = _constants.HT_HVM_VIF_VIF
875 HT_HVM_VALID_VIF_TYPES = _constants.HT_HVM_VALID_VIF_TYPES
877 HT_DISK_IOEMU = _constants.HT_DISK_IOEMU
878 HT_DISK_IDE = _constants.HT_DISK_IDE
879 HT_DISK_SCSI = _constants.HT_DISK_SCSI
880 HT_DISK_SD = _constants.HT_DISK_SD
881 HT_DISK_MTD = _constants.HT_DISK_MTD
882 HT_DISK_PFLASH = _constants.HT_DISK_PFLASH
883 HT_DISK_PARAVIRTUAL = _constants.HT_DISK_PARAVIRTUAL
884 HT_HVM_VALID_DISK_TYPES = _constants.HT_HVM_VALID_DISK_TYPES
885 HT_KVM_VALID_DISK_TYPES = _constants.HT_KVM_VALID_DISK_TYPES
887 HT_CACHE_DEFAULT = _constants.HT_CACHE_DEFAULT
888 HT_CACHE_NONE = _constants.HT_CACHE_NONE
889 HT_CACHE_WTHROUGH = _constants.HT_CACHE_WTHROUGH
890 HT_CACHE_WBACK = _constants.HT_CACHE_WBACK
891 HT_VALID_CACHE_TYPES = _constants.HT_VALID_CACHE_TYPES
893 HT_MOUSE_MOUSE = _constants.HT_MOUSE_MOUSE
894 HT_MOUSE_TABLET = _constants.HT_MOUSE_TABLET
895 HT_KVM_VALID_MOUSE_TYPES = _constants.HT_KVM_VALID_MOUSE_TYPES
897 HT_BO_FLOPPY = _constants.HT_BO_FLOPPY
898 HT_BO_CDROM = _constants.HT_BO_CDROM
899 HT_BO_DISK = _constants.HT_BO_DISK
900 HT_BO_NETWORK = _constants.HT_BO_NETWORK
901 HT_KVM_VALID_BO_TYPES = _constants.HT_KVM_VALID_BO_TYPES
903 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ = \
904 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ
905 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ = \
906 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ
907 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC = \
908 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC
909 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ = \
910 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ
911 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ = \
912 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ
913 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF = \
914 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF
915 HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS = \
916 _constants.HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS
918 HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO = _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO
919 HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER = \
920 _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER
921 HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS = \
922 _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS
924 HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS = \
925 _constants.HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS
927 HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF = \
928 _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF
929 HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL = \
930 _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL
931 HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER = \
932 _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER
933 HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS = \
934 _constants.HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS
936 HT_SM_NONE = _constants.HT_SM_NONE
937 HT_SM_USER = _constants.HT_SM_USER
938 HT_SM_POOL = _constants.HT_SM_POOL
939 HT_KVM_VALID_SM_TYPES = _constants.HT_KVM_VALID_SM_TYPES
941 HT_KVM_ENABLED = _constants.HT_KVM_ENABLED
942 HT_KVM_DISABLED = _constants.HT_KVM_DISABLED
943 HT_KVM_FLAG_VALUES = _constants.HT_KVM_FLAG_VALUES
946 HT_MIGRATION_LIVE = _constants.HT_MIGRATION_LIVE
947 HT_MIGRATION_NONLIVE = _constants.HT_MIGRATION_NONLIVE
948 HT_MIGRATION_MODES = _constants.HT_MIGRATION_MODES
950 # Cluster Verify steps
951 VERIFY_NPLUSONE_MEM = _constants.VERIFY_NPLUSONE_MEM
952 VERIFY_OPTIONAL_CHECKS = _constants.VERIFY_OPTIONAL_CHECKS
954 # Cluster Verify error classes
955 CV_TCLUSTER = _constants.CV_TCLUSTER
956 CV_TGROUP = _constants.CV_TGROUP
957 CV_TNODE = _constants.CV_TNODE
958 CV_TINSTANCE = _constants.CV_TINSTANCE
960 # Cluster Verify error codes and documentation
961 CV_ECLUSTERCFG = _constants.CV_ECLUSTERCFG
962 CV_ECLUSTERCERT = _constants.CV_ECLUSTERCERT
963 CV_ECLUSTERFILECHECK = _constants.CV_ECLUSTERFILECHECK
964 CV_ECLUSTERDANGLINGNODES = _constants.CV_ECLUSTERDANGLINGNODES
965 CV_ECLUSTERDANGLINGINST = _constants.CV_ECLUSTERDANGLINGINST
966 CV_EGROUPDIFFERENTPVSIZE = _constants.CV_EGROUPDIFFERENTPVSIZE
967 CV_EINSTANCEBADNODE = _constants.CV_EINSTANCEBADNODE
968 CV_EINSTANCEDOWN = _constants.CV_EINSTANCEDOWN
969 CV_EINSTANCELAYOUT = _constants.CV_EINSTANCELAYOUT
970 CV_EINSTANCEMISSINGDISK = _constants.CV_EINSTANCEMISSINGDISK
971 CV_EINSTANCEFAULTYDISK = _constants.CV_EINSTANCEFAULTYDISK
972 CV_EINSTANCEWRONGNODE = _constants.CV_EINSTANCEWRONGNODE
973 CV_EINSTANCESPLITGROUPS = _constants.CV_EINSTANCESPLITGROUPS
974 CV_EINSTANCEPOLICY = _constants.CV_EINSTANCEPOLICY
975 CV_EINSTANCEUNSUITABLENODE = _constants.CV_EINSTANCEUNSUITABLENODE
976 CV_EINSTANCEMISSINGCFGPARAMETER = _constants.CV_EINSTANCEMISSINGCFGPARAMETER
977 CV_ENODEDRBD = _constants.CV_ENODEDRBD
978 CV_ENODEDRBDVERSION = _constants.CV_ENODEDRBDVERSION
979 CV_ENODEDRBDHELPER = _constants.CV_ENODEDRBDHELPER
980 CV_ENODEFILECHECK = _constants.CV_ENODEFILECHECK
981 CV_ENODEHOOKS = _constants.CV_ENODEHOOKS
982 CV_ENODEHV = _constants.CV_ENODEHV
983 CV_ENODELVM = _constants.CV_ENODELVM
984 CV_ENODEN1 = _constants.CV_ENODEN1
985 CV_ENODENET = _constants.CV_ENODENET
986 CV_ENODEOS = _constants.CV_ENODEOS
987 CV_ENODEORPHANINSTANCE = _constants.CV_ENODEORPHANINSTANCE
988 CV_ENODEORPHANLV = _constants.CV_ENODEORPHANLV
989 CV_ENODERPC = _constants.CV_ENODERPC
990 CV_ENODESSH = _constants.CV_ENODESSH
991 CV_ENODEVERSION = _constants.CV_ENODEVERSION
992 CV_ENODESETUP = _constants.CV_ENODESETUP
993 CV_ENODETIME = _constants.CV_ENODETIME
994 CV_ENODEOOBPATH = _constants.CV_ENODEOOBPATH
995 CV_ENODEUSERSCRIPTS = _constants.CV_ENODEUSERSCRIPTS
996 CV_ENODEFILESTORAGEPATHS = _constants.CV_ENODEFILESTORAGEPATHS
997 CV_ENODEFILESTORAGEPATHUNUSABLE = _constants.CV_ENODEFILESTORAGEPATHUNUSABLE
998 CV_ENODESHAREDFILESTORAGEPATHUNUSABLE = \
999 _constants.CV_ENODESHAREDFILESTORAGEPATHUNUSABLE
1001 CV_ALL_ECODES = _constants.CV_ALL_ECODES
1002 CV_ALL_ECODES_STRINGS = _constants.CV_ALL_ECODES_STRINGS
1004 NV_BRIDGES = _constants.NV_BRIDGES
1005 NV_DRBDHELPER = _constants.NV_DRBDHELPER
1006 NV_DRBDVERSION = _constants.NV_DRBDVERSION
1007 NV_DRBDLIST = _constants.NV_DRBDLIST
1008 NV_EXCLUSIVEPVS = _constants.NV_EXCLUSIVEPVS
1009 NV_FILELIST = _constants.NV_FILELIST
1010 NV_ACCEPTED_STORAGE_PATHS = _constants.NV_ACCEPTED_STORAGE_PATHS
1011 NV_FILE_STORAGE_PATH = _constants.NV_FILE_STORAGE_PATH
1012 NV_SHARED_FILE_STORAGE_PATH = _constants.NV_SHARED_FILE_STORAGE_PATH
1013 NV_HVINFO = _constants.NV_HVINFO
1014 NV_HVPARAMS = _constants.NV_HVPARAMS
1015 NV_HYPERVISOR = _constants.NV_HYPERVISOR
1016 NV_INSTANCELIST = _constants.NV_INSTANCELIST
1017 NV_LVLIST = _constants.NV_LVLIST
1018 NV_MASTERIP = _constants.NV_MASTERIP
1019 NV_NODELIST = _constants.NV_NODELIST
1020 NV_NODENETTEST = _constants.NV_NODENETTEST
1021 NV_NODESETUP = _constants.NV_NODESETUP
1022 NV_OOB_PATHS = _constants.NV_OOB_PATHS
1023 NV_OSLIST = _constants.NV_OSLIST
1024 NV_PVLIST = _constants.NV_PVLIST
1025 NV_TIME = _constants.NV_TIME
1026 NV_USERSCRIPTS = _constants.NV_USERSCRIPTS
1027 NV_VERSION = _constants.NV_VERSION
1028 NV_VGLIST = _constants.NV_VGLIST
1029 NV_VMNODES = _constants.NV_VMNODES
1031 INSTST_RUNNING = _constants.INSTST_RUNNING
1032 INSTST_ADMINDOWN = _constants.INSTST_ADMINDOWN
1033 INSTST_ADMINOFFLINE = _constants.INSTST_ADMINOFFLINE
1034 INSTST_NODEOFFLINE = _constants.INSTST_NODEOFFLINE
1035 INSTST_NODEDOWN = _constants.INSTST_NODEDOWN
1036 INSTST_WRONGNODE = _constants.INSTST_WRONGNODE
1037 INSTST_ERRORUP = _constants.INSTST_ERRORUP
1038 INSTST_ERRORDOWN = _constants.INSTST_ERRORDOWN
1039 INSTST_ALL = _constants.INSTST_ALL
1042 ADMINST_UP = _constants.ADMINST_UP
1043 ADMINST_DOWN = _constants.ADMINST_DOWN
1044 ADMINST_OFFLINE = _constants.ADMINST_OFFLINE
1045 ADMINST_ALL = _constants.ADMINST_ALL
1048 NR_REGULAR = _constants.NR_REGULAR
1049 NR_MASTER = _constants.NR_MASTER
1050 NR_MCANDIDATE = _constants.NR_MCANDIDATE
1051 NR_DRAINED = _constants.NR_DRAINED
1052 NR_OFFLINE = _constants.NR_OFFLINE
1053 NR_ALL = _constants.NR_ALL
1055 SSL_CERT_EXPIRATION_WARN = _constants.SSL_CERT_EXPIRATION_WARN
1056 SSL_CERT_EXPIRATION_ERROR = _constants.SSL_CERT_EXPIRATION_ERROR
1058 # Allocator framework constants
1059 IALLOCATOR_VERSION = _constants.IALLOCATOR_VERSION
1060 IALLOCATOR_DIR_IN = _constants.IALLOCATOR_DIR_IN
1061 IALLOCATOR_DIR_OUT = _constants.IALLOCATOR_DIR_OUT
1062 VALID_IALLOCATOR_DIRECTIONS = _constants.VALID_IALLOCATOR_DIRECTIONS
1064 IALLOCATOR_MODE_ALLOC = _constants.IALLOCATOR_MODE_ALLOC
1065 IALLOCATOR_MODE_RELOC = _constants.IALLOCATOR_MODE_RELOC
1066 IALLOCATOR_MODE_CHG_GROUP = _constants.IALLOCATOR_MODE_CHG_GROUP
1067 IALLOCATOR_MODE_NODE_EVAC = _constants.IALLOCATOR_MODE_NODE_EVAC
1068 IALLOCATOR_MODE_MULTI_ALLOC = _constants.IALLOCATOR_MODE_MULTI_ALLOC
1069 VALID_IALLOCATOR_MODES = _constants.VALID_IALLOCATOR_MODES
1071 IALLOCATOR_SEARCH_PATH = _constants.IALLOCATOR_SEARCH_PATH
1072 DEFAULT_IALLOCATOR_SHORTCUT = _constants.DEFAULT_IALLOCATOR_SHORTCUT
1075 NODE_EVAC_PRI = _constants.NODE_EVAC_PRI
1076 NODE_EVAC_SEC = _constants.NODE_EVAC_SEC
1077 NODE_EVAC_ALL = _constants.NODE_EVAC_ALL
1078 NODE_EVAC_MODES = _constants.NODE_EVAC_MODES
1080 JOB_QUEUE_VERSION = _constants.JOB_QUEUE_VERSION
1081 JOB_QUEUE_SIZE_HARD_LIMIT = _constants.JOB_QUEUE_SIZE_HARD_LIMIT
1082 JOB_QUEUE_FILES_PERMS = _constants.JOB_QUEUE_FILES_PERMS
1084 JOB_ID_TEMPLATE = r"\d+"
1085 JOB_FILE_RE = re.compile(r"^job-(%s)$" % JOB_ID_TEMPLATE)
1087 JOB_NOTCHANGED = _constants.JOB_NOTCHANGED
1090 JOB_STATUS_QUEUED = _constants.JOB_STATUS_QUEUED
1091 JOB_STATUS_WAITING = _constants.JOB_STATUS_WAITING
1092 JOB_STATUS_CANCELING = _constants.JOB_STATUS_CANCELING
1093 JOB_STATUS_RUNNING = _constants.JOB_STATUS_RUNNING
1094 JOB_STATUS_CANCELED = _constants.JOB_STATUS_CANCELED
1095 JOB_STATUS_SUCCESS = _constants.JOB_STATUS_SUCCESS
1096 JOB_STATUS_ERROR = _constants.JOB_STATUS_ERROR
1097 JOBS_PENDING = _constants.JOBS_PENDING
1098 JOBS_FINALIZED = _constants.JOBS_FINALIZED
1099 JOB_STATUS_ALL = _constants.JOB_STATUS_ALL
1103 OP_STATUS_QUEUED = _constants.OP_STATUS_QUEUED
1104 OP_STATUS_WAITING = _constants.OP_STATUS_WAITING
1105 OP_STATUS_CANCELING = _constants.OP_STATUS_CANCELING
1106 OP_STATUS_RUNNING = _constants.OP_STATUS_RUNNING
1108 OP_STATUS_CANCELED = _constants.OP_STATUS_CANCELED
1109 OP_STATUS_SUCCESS = _constants.OP_STATUS_SUCCESS
1110 OP_STATUS_ERROR = _constants.OP_STATUS_ERROR
1111 OPS_FINALIZED = _constants.OPS_FINALIZED
1114 OP_PRIO_LOWEST = _constants.OP_PRIO_LOWEST
1115 OP_PRIO_HIGHEST = _constants.OP_PRIO_HIGHEST
1116 OP_PRIO_LOW = _constants.OP_PRIO_LOW
1117 OP_PRIO_NORMAL = _constants.OP_PRIO_NORMAL
1118 OP_PRIO_HIGH = _constants.OP_PRIO_HIGH
1119 OP_PRIO_SUBMIT_VALID = _constants.OP_PRIO_SUBMIT_VALID
1120 OP_PRIO_DEFAULT = _constants.OP_PRIO_DEFAULT
1122 LOCKS_REPLACE = _constants.LOCKS_REPLACE
1123 LOCKS_APPEND = _constants.LOCKS_APPEND
1125 LOCK_ATTEMPTS_TIMEOUT = _constants.LOCK_ATTEMPTS_TIMEOUT
1126 LOCK_ATTEMPTS_MAXWAIT = _constants.LOCK_ATTEMPTS_MAXWAIT
1127 LOCK_ATTEMPTS_MINWAIT = _constants.LOCK_ATTEMPTS_MINWAIT
1129 # Execution log types
1130 ELOG_MESSAGE = _constants.ELOG_MESSAGE
1131 ELOG_REMOTE_IMPORT = _constants.ELOG_REMOTE_IMPORT
1132 ELOG_JQUEUE_TEST = _constants.ELOG_JQUEUE_TEST
1134 ETC_HOSTS_ADD = _constants.ETC_HOSTS_ADD
1135 ETC_HOSTS_REMOVE = _constants.ETC_HOSTS_REMOVE
1137 JQT_MSGPREFIX = _constants.JQT_MSGPREFIX
1138 JQT_EXPANDNAMES = _constants.JQT_EXPANDNAMES
1139 JQT_EXEC = _constants.JQT_EXEC
1140 JQT_LOGMSG = _constants.JQT_LOGMSG
1141 JQT_STARTMSG = _constants.JQT_STARTMSG
1142 JQT_ALL = _constants.JQT_ALL
1144 QR_CLUSTER = _constants.QR_CLUSTER
1145 QR_INSTANCE = _constants.QR_INSTANCE
1146 QR_NODE = _constants.QR_NODE
1147 QR_LOCK = _constants.QR_LOCK
1148 QR_GROUP = _constants.QR_GROUP
1149 QR_OS = _constants.QR_OS
1150 QR_JOB = _constants.QR_JOB
1151 QR_EXPORT = _constants.QR_EXPORT
1152 QR_NETWORK = _constants.QR_NETWORK
1153 QR_EXTSTORAGE = _constants.QR_EXTSTORAGE
1154 QR_VIA_OP = _constants.QR_VIA_OP
1155 QR_VIA_LUXI = _constants.QR_VIA_LUXI
1156 QR_VIA_RAPI = _constants.QR_VIA_RAPI
1158 QFT_UNKNOWN = _constants.QFT_UNKNOWN
1159 QFT_TEXT = _constants.QFT_TEXT
1160 QFT_BOOL = _constants.QFT_BOOL
1161 QFT_NUMBER = _constants.QFT_NUMBER
1162 QFT_UNIT = _constants.QFT_UNIT
1163 QFT_TIMESTAMP = _constants.QFT_TIMESTAMP
1164 QFT_OTHER = _constants.QFT_OTHER
1165 QFT_ALL = _constants.QFT_ALL
1167 RS_NORMAL = _constants.RS_NORMAL
1168 RS_UNKNOWN = _constants.RS_UNKNOWN
1169 RS_NODATA = _constants.RS_NODATA
1170 RS_UNAVAIL = _constants.RS_UNAVAIL
1171 RS_OFFLINE = _constants.RS_OFFLINE
1172 RS_ALL = _constants.RS_ALL
1173 RSS_DESCRIPTION = _constants.RSS_DESCRIPTION
1175 MAX_NICS = _constants.MAX_NICS
1176 MAX_DISKS = _constants.MAX_DISKS
1178 SSCONF_FILEPREFIX = _constants.SSCONF_FILEPREFIX
1180 SS_CLUSTER_NAME = _constants.SS_CLUSTER_NAME
1181 SS_CLUSTER_TAGS = _constants.SS_CLUSTER_TAGS
1182 SS_FILE_STORAGE_DIR = _constants.SS_FILE_STORAGE_DIR
1183 SS_SHARED_FILE_STORAGE_DIR = _constants.SS_SHARED_FILE_STORAGE_DIR
1184 SS_MASTER_CANDIDATES = _constants.SS_MASTER_CANDIDATES
1185 SS_MASTER_CANDIDATES_IPS = _constants.SS_MASTER_CANDIDATES_IPS
1186 SS_MASTER_IP = _constants.SS_MASTER_IP
1187 SS_MASTER_NETDEV = _constants.SS_MASTER_NETDEV
1188 SS_MASTER_NETMASK = _constants.SS_MASTER_NETMASK
1189 SS_MASTER_NODE = _constants.SS_MASTER_NODE
1190 SS_NODE_LIST = _constants.SS_NODE_LIST
1191 SS_NODE_PRIMARY_IPS = _constants.SS_NODE_PRIMARY_IPS
1192 SS_NODE_SECONDARY_IPS = _constants.SS_NODE_SECONDARY_IPS
1193 SS_OFFLINE_NODES = _constants.SS_OFFLINE_NODES
1194 SS_ONLINE_NODES = _constants.SS_ONLINE_NODES
1195 SS_PRIMARY_IP_FAMILY = _constants.SS_PRIMARY_IP_FAMILY
1196 SS_INSTANCE_LIST = _constants.SS_INSTANCE_LIST
1197 SS_RELEASE_VERSION = _constants.SS_RELEASE_VERSION
1198 SS_HYPERVISOR_LIST = _constants.SS_HYPERVISOR_LIST
1199 SS_MAINTAIN_NODE_HEALTH = _constants.SS_MAINTAIN_NODE_HEALTH
1200 SS_UID_POOL = _constants.SS_UID_POOL
1201 SS_NODEGROUPS = _constants.SS_NODEGROUPS
1202 SS_NETWORKS = _constants.SS_NETWORKS
1204 SS_HVPARAMS_PREF = _constants.SS_HVPARAMS_PREF
1206 SS_HVPARAMS_XEN_PVM = _constants.SS_HVPARAMS_XEN_PVM
1207 SS_HVPARAMS_XEN_FAKE = _constants.SS_HVPARAMS_XEN_FAKE
1208 SS_HVPARAMS_XEN_HVM = _constants.SS_HVPARAMS_XEN_HVM
1209 SS_HVPARAMS_XEN_KVM = _constants.SS_HVPARAMS_XEN_KVM
1210 SS_HVPARAMS_XEN_CHROOT = _constants.SS_HVPARAMS_XEN_CHROOT
1211 SS_HVPARAMS_XEN_LXC = _constants.SS_HVPARAMS_XEN_LXC
1212 VALID_SS_HVPARAMS_KEYS = _constants.VALID_SS_HVPARAMS_KEYS
1214 SS_FILE_PERMS = _constants.SS_FILE_PERMS
1216 DEFAULT_ENABLED_HYPERVISOR = _constants.DEFAULT_ENABLED_HYPERVISOR
1220 HV_USE_BOOTLOADER: False,
1221 HV_BOOTLOADER_PATH: XEN_BOOTLOADER,
1222 HV_BOOTLOADER_ARGS: "",
1223 HV_KERNEL_PATH: XEN_KERNEL,
1225 HV_ROOT_PATH: "/dev/xvda1",
1226 HV_KERNEL_ARGS: "ro",
1227 HV_MIGRATION_PORT: 8002,
1228 HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
1229 HV_BLOCKDEV_PREFIX: "sd",
1230 HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
1231 HV_CPU_MASK: CPU_PINNING_ALL,
1235 HV_XEN_CMD: XEN_CMD_XM,
1240 HV_BOOT_ORDER: "cd",
1241 HV_CDROM_IMAGE_PATH: "",
1242 HV_NIC_TYPE: HT_NIC_RTL8139,
1243 HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
1244 HV_VNC_BIND_ADDRESS: IP4_ADDRESS_ANY,
1245 HV_VNC_PASSWORD_FILE: pathutils.VNC_PASSWORD_FILE,
1248 HV_KERNEL_PATH: "/usr/lib/xen/boot/hvmloader",
1249 HV_DEVICE_MODEL: "/usr/lib/xen/bin/qemu-dm",
1250 HV_MIGRATION_PORT: 8002,
1251 HV_MIGRATION_MODE: HT_MIGRATION_NONLIVE,
1252 HV_USE_LOCALTIME: False,
1253 HV_BLOCKDEV_PREFIX: "hd",
1255 HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
1256 HV_CPU_MASK: CPU_PINNING_ALL,
1259 HV_VIF_TYPE: HT_HVM_VIF_IOEMU,
1262 HV_XEN_CMD: XEN_CMD_XM,
1267 HV_KVM_PATH: KVM_PATH,
1268 HV_KERNEL_PATH: KVM_KERNEL,
1270 HV_KERNEL_ARGS: "ro",
1271 HV_ROOT_PATH: "/dev/vda1",
1273 HV_SERIAL_CONSOLE: True,
1274 HV_SERIAL_SPEED: 38400,
1275 HV_VNC_BIND_ADDRESS: "",
1278 HV_VNC_X509_VERIFY: False,
1279 HV_VNC_PASSWORD_FILE: "",
1280 HV_KVM_SPICE_BIND: "",
1281 HV_KVM_SPICE_IP_VERSION: IFACE_NO_IP_VERSION_SPECIFIED,
1282 HV_KVM_SPICE_PASSWORD_FILE: "",
1283 HV_KVM_SPICE_LOSSLESS_IMG_COMPR: "",
1284 HV_KVM_SPICE_JPEG_IMG_COMPR: "",
1285 HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR: "",
1286 HV_KVM_SPICE_STREAMING_VIDEO_DETECTION: "",
1287 HV_KVM_SPICE_AUDIO_COMPR: True,
1288 HV_KVM_SPICE_USE_TLS: False,
1289 HV_KVM_SPICE_TLS_CIPHERS: OPENSSL_CIPHERS,
1290 HV_KVM_SPICE_USE_VDAGENT: True,
1291 HV_KVM_FLOPPY_IMAGE_PATH: "",
1292 HV_CDROM_IMAGE_PATH: "",
1293 HV_KVM_CDROM2_IMAGE_PATH: "",
1294 HV_BOOT_ORDER: HT_BO_DISK,
1295 HV_NIC_TYPE: HT_NIC_PARAVIRTUAL,
1296 HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
1297 HV_KVM_CDROM_DISK_TYPE: "",
1300 HV_MIGRATION_PORT: 8102,
1301 HV_MIGRATION_BANDWIDTH: 32, # MiB/s
1302 HV_MIGRATION_DOWNTIME: 30, # ms
1303 HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
1304 HV_USE_LOCALTIME: False,
1305 HV_DISK_CACHE: HT_CACHE_DEFAULT,
1306 HV_SECURITY_MODEL: HT_SM_NONE,
1307 HV_SECURITY_DOMAIN: "",
1309 HV_VHOST_NET: False,
1310 HV_KVM_USE_CHROOT: False,
1312 HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
1313 HV_CPU_MASK: CPU_PINNING_ALL,
1322 HV_KVM_MACHINE_VERSION: "",
1326 HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
1329 HV_INIT_SCRIPT: "/ganeti-chroot",
1336 HVC_GLOBALS = _constants.HVC_GLOBALS
1342 BE_AUTO_BALANCE: True,
1343 BE_ALWAYS_FAILOVER: False,
1349 ND_SPINDLE_COUNT: 1,
1350 ND_EXCLUSIVE_STORAGE: False,
1352 ND_OVS_NAME: DEFAULT_OVS,
1356 NDC_GLOBALS = _constants.NDC_GLOBALS
1358 DISK_LD_DEFAULTS = {
1360 LDP_RESYNC_RATE: CLASSIC_DRBD_SYNC_SPEED,
1361 LDP_BARRIERS: _constants.DRBD_BARRIERS,
1362 LDP_NO_META_FLUSH: _constants.DRBD_NO_META_FLUSH,
1363 LDP_DEFAULT_METAVG: DEFAULT_VG,
1364 LDP_DISK_CUSTOM: "",
1366 LDP_PROTOCOL: DRBD_DEFAULT_NET_PROTOCOL,
1367 LDP_DYNAMIC_RESYNC: False,
1369 # The default values for the DRBD dynamic resync speed algorithm
1370 # are taken from the drbsetup 8.3.11 man page, except for
1371 # c-plan-ahead (that we don't need to set to 0, because we have a
1372 # separate option to enable it) and for c-max-rate, that we cap to
1373 # the default value for the static resync rate.
1374 LDP_PLAN_AHEAD: 20, # ds
1375 LDP_FILL_TARGET: 0, # sectors
1376 LDP_DELAY_TARGET: 1, # ds
1377 LDP_MAX_RATE: CLASSIC_DRBD_SYNC_SPEED, # KiB/s
1378 LDP_MIN_RATE: 4 * 1024, # KiB/s
1381 LDP_STRIPES: _constants.LVM_STRIPECOUNT
1388 LDP_ACCESS: DISK_KERNELSPACE,
1393 # readability shortcuts
1394 _LV_DEFAULTS = DISK_LD_DEFAULTS[DT_PLAIN]
1395 _DRBD_DEFAULTS = DISK_LD_DEFAULTS[DT_DRBD8]
1397 DISK_DT_DEFAULTS = {
1399 LV_STRIPES: DISK_LD_DEFAULTS[DT_PLAIN][LDP_STRIPES],
1402 DRBD_RESYNC_RATE: _DRBD_DEFAULTS[LDP_RESYNC_RATE],
1403 DRBD_DATA_STRIPES: _LV_DEFAULTS[LDP_STRIPES],
1404 DRBD_META_STRIPES: _LV_DEFAULTS[LDP_STRIPES],
1405 DRBD_DISK_BARRIERS: _DRBD_DEFAULTS[LDP_BARRIERS],
1406 DRBD_META_BARRIERS: _DRBD_DEFAULTS[LDP_NO_META_FLUSH],
1407 DRBD_DEFAULT_METAVG: _DRBD_DEFAULTS[LDP_DEFAULT_METAVG],
1408 DRBD_DISK_CUSTOM: _DRBD_DEFAULTS[LDP_DISK_CUSTOM],
1409 DRBD_NET_CUSTOM: _DRBD_DEFAULTS[LDP_NET_CUSTOM],
1410 DRBD_PROTOCOL: _DRBD_DEFAULTS[LDP_PROTOCOL],
1411 DRBD_DYNAMIC_RESYNC: _DRBD_DEFAULTS[LDP_DYNAMIC_RESYNC],
1412 DRBD_PLAN_AHEAD: _DRBD_DEFAULTS[LDP_PLAN_AHEAD],
1413 DRBD_FILL_TARGET: _DRBD_DEFAULTS[LDP_FILL_TARGET],
1414 DRBD_DELAY_TARGET: _DRBD_DEFAULTS[LDP_DELAY_TARGET],
1415 DRBD_MAX_RATE: _DRBD_DEFAULTS[LDP_MAX_RATE],
1416 DRBD_MIN_RATE: _DRBD_DEFAULTS[LDP_MIN_RATE],
1423 RBD_POOL: DISK_LD_DEFAULTS[DT_RBD][LDP_POOL],
1424 RBD_ACCESS: DISK_LD_DEFAULTS[DT_RBD][LDP_ACCESS],
1429 # we don't want to export the shortcuts
1430 del _LV_DEFAULTS, _DRBD_DEFAULTS
1433 NIC_MODE: NIC_MODE_BRIDGED,
1434 NIC_LINK: DEFAULT_BRIDGE,
1435 NIC_VLAN: VALUE_HS_NOTHING,
1438 ISPECS_MINMAX_DEFAULTS = _constants.ISPECS_MINMAX_DEFAULTS
1440 IPOLICY_DEFAULTS = {
1441 ISPECS_MINMAX: [ISPECS_MINMAX_DEFAULTS],
1443 ISPEC_MEM_SIZE: 128,
1445 ISPEC_DISK_COUNT: 1,
1446 ISPEC_DISK_SIZE: 1024,
1448 ISPEC_SPINDLE_USE: 1,
1450 IPOLICY_DTS: list(DISK_TEMPLATES),
1451 IPOLICY_VCPU_RATIO: 4.0,
1452 IPOLICY_SPINDLE_RATIO: 32.0,
1455 MASTER_POOL_SIZE_DEFAULT = 10
1457 # Exclusive storage:
1458 # Error margin used to compare physical disks
1460 # Space reserved when creating instance disks
1463 CONFD_PROTOCOL_VERSION = _constants.CONFD_PROTOCOL_VERSION
1465 CONFD_REQ_PING = _constants.CONFD_REQ_PING
1466 CONFD_REQ_NODE_ROLE_BYNAME = _constants.CONFD_REQ_NODE_ROLE_BYNAME
1467 CONFD_REQ_NODE_PIP_BY_INSTANCE_IP = _constants.CONFD_REQ_NODE_PIP_BY_INSTANCE_IP
1468 CONFD_REQ_CLUSTER_MASTER = _constants.CONFD_REQ_CLUSTER_MASTER
1469 CONFD_REQ_NODE_PIP_LIST = _constants.CONFD_REQ_NODE_PIP_LIST
1470 CONFD_REQ_MC_PIP_LIST = _constants.CONFD_REQ_MC_PIP_LIST
1471 CONFD_REQ_INSTANCES_IPS_LIST = _constants.CONFD_REQ_INSTANCES_IPS_LIST
1472 CONFD_REQ_NODE_DRBD = _constants.CONFD_REQ_NODE_DRBD
1473 CONFD_REQ_NODE_INSTANCES = _constants.CONFD_REQ_NODE_INSTANCES
1474 CONFD_REQS = _constants.CONFD_REQS
1476 # Confd request query fields. These are used to narrow down queries.
1477 # These must be strings rather than integers, because json-encoding
1478 # converts them to strings anyway, as they're used as dict-keys.
1479 CONFD_REQQ_LINK = _constants.CONFD_REQQ_LINK
1480 CONFD_REQQ_IP = _constants.CONFD_REQQ_IP
1481 CONFD_REQQ_IPLIST = _constants.CONFD_REQQ_IPLIST
1482 CONFD_REQQ_FIELDS = _constants.CONFD_REQQ_FIELDS
1484 # FIXME: perhaps update code that uses these constants to deal with
1485 # integers instead of strings
1486 CONFD_REQFIELD_NAME = str(_constants.CONFD_REQFIELD_NAME)
1487 CONFD_REQFIELD_IP = str(_constants.CONFD_REQFIELD_IP)
1488 CONFD_REQFIELD_MNODE_PIP = str(_constants.CONFD_REQFIELD_MNODE_PIP)
1490 CONFD_REPL_STATUS_OK = _constants.CONFD_REPL_STATUS_OK
1491 CONFD_REPL_STATUS_ERROR = _constants.CONFD_REPL_STATUS_ERROR
1492 CONFD_REPL_STATUS_NOTIMPLEMENTED = _constants.CONFD_REPL_STATUS_NOTIMPLEMENTED
1493 CONFD_REPL_STATUSES = _constants.CONFD_REPL_STATUSES
1495 CONFD_NODE_ROLE_MASTER = _constants.CONFD_NODE_ROLE_MASTER
1496 CONFD_NODE_ROLE_CANDIDATE = _constants.CONFD_NODE_ROLE_CANDIDATE
1497 CONFD_NODE_ROLE_OFFLINE = _constants.CONFD_NODE_ROLE_OFFLINE
1498 CONFD_NODE_ROLE_DRAINED = _constants.CONFD_NODE_ROLE_DRAINED
1499 CONFD_NODE_ROLE_REGULAR = _constants.CONFD_NODE_ROLE_REGULAR
1501 CONFD_ERROR_UNKNOWN_ENTRY = _constants.CONFD_ERROR_UNKNOWN_ENTRY
1502 CONFD_ERROR_INTERNAL = _constants.CONFD_ERROR_INTERNAL
1503 CONFD_ERROR_ARGUMENT = _constants.CONFD_ERROR_ARGUMENT
1505 # Each request is "salted" by the current timestamp.
1506 # This constants decides how many seconds of skew to accept.
1507 # TODO: make this a default and allow the value to be more configurable
1508 CONFD_MAX_CLOCK_SKEW = _constants.CONFD_MAX_CLOCK_SKEW
1510 # When we haven't reloaded the config for more than this amount of
1511 # seconds, we force a test to see if inotify is betraying us. Using a
1512 # prime number to ensure we get less chance of 'same wakeup' with
1514 CONFD_CONFIG_RELOAD_TIMEOUT = _constants.CONFD_CONFIG_RELOAD_TIMEOUT
1516 # If we receive more than one update in this amount of microseconds,
1517 # we move to polling every RATELIMIT seconds, rather than relying on
1518 # inotify, to be able to serve more requests.
1519 CONFD_CONFIG_RELOAD_RATELIMIT = _constants.CONFD_CONFIG_RELOAD_RATELIMIT
1521 # Magic number prepended to all confd queries.
1522 # This allows us to distinguish different types of confd protocols and handle
1523 # them. For example by changing this we can move the whole payload to be
1524 # compressed, or move away from json.
1525 CONFD_MAGIC_FOURCC = _constants.CONFD_MAGIC_FOURCC
1527 # By default a confd request is sent to the minimum between this number and all
1528 # MCs. 6 was chosen because even in the case of a disastrous 50% response rate,
1529 # we should have enough answers to be able to compare more than one.
1530 CONFD_DEFAULT_REQ_COVERAGE = _constants.CONFD_DEFAULT_REQ_COVERAGE
1532 # Timeout in seconds to expire pending query request in the confd client
1533 # library. We don't actually expect any answer more than 10 seconds after we
1535 CONFD_CLIENT_EXPIRE_TIMEOUT = _constants.CONFD_CLIENT_EXPIRE_TIMEOUT
1537 # Maximum UDP datagram size.
1538 # On IPv4: 64K - 20 (ip header size) - 8 (udp header size) = 65507
1539 # On IPv6: 64K - 40 (ip6 header size) - 8 (udp header size) = 65487
1540 # (assuming we can't use jumbo frames)
1541 # We just set this to 60K, which should be enough
1542 MAX_UDP_DATA_SIZE = 61440
1544 # User-id pool minimum/maximum acceptable user-ids.
1546 UIDPOOL_UID_MAX = 2 ** 32 - 1 # Assuming 32 bit user-ids
1548 # Name or path of the pgrep command
1551 # Name of the node group that gets created at cluster init or upgrade
1552 INITIAL_NODE_GROUP_NAME = "default"
1554 # Possible values for NodeGroup.alloc_policy
1555 ALLOC_POLICY_PREFERRED = _constants.ALLOC_POLICY_PREFERRED
1556 ALLOC_POLICY_LAST_RESORT = _constants.ALLOC_POLICY_LAST_RESORT
1557 ALLOC_POLICY_UNALLOCABLE = _constants.ALLOC_POLICY_UNALLOCABLE
1558 VALID_ALLOC_POLICIES = _constants.VALID_ALLOC_POLICIES
1560 # Temporary external/shared storage parameters
1561 BLOCKDEV_DRIVER_MANUAL = _constants.BLOCKDEV_DRIVER_MANUAL
1563 # qemu-img path, required for ovfconverter
1564 QEMUIMG_PATH = _constants.QEMUIMG_PATH
1566 # Whether htools was enabled at compilation time
1567 HTOOLS = _constants.HTOOLS
1568 # The hail iallocator
1569 IALLOC_HAIL = "hail"
1571 # Fake opcodes for functions that have hooks attached to them via
1572 # backend.RunLocalHooks
1573 FAKE_OP_MASTER_TURNUP = "OP_CLUSTER_IP_TURNUP"
1574 FAKE_OP_MASTER_TURNDOWN = "OP_CLUSTER_IP_TURNDOWN"
1579 SSHK_ALL = compat.UniqueFrozenset([SSHK_RSA, SSHK_DSA])
1581 # SSH authorized key types
1582 SSHAK_RSA = "ssh-rsa"
1583 SSHAK_DSS = "ssh-dss"
1584 SSHAK_ALL = compat.UniqueFrozenset([SSHAK_RSA, SSHAK_DSS])
1587 SSHS_CLUSTER_NAME = "cluster_name"
1588 SSHS_SSH_HOST_KEY = "ssh_host_key"
1589 SSHS_SSH_ROOT_KEY = "ssh_root_key"
1590 SSHS_NODE_DAEMON_CERTIFICATE = "node_daemon_certificate"
1592 #: Key files for SSH daemon
1593 SSH_DAEMON_KEYFILES = {
1594 SSHK_RSA: (pathutils.SSH_HOST_RSA_PRIV, pathutils.SSH_HOST_RSA_PUB),
1595 SSHK_DSA: (pathutils.SSH_HOST_DSA_PRIV, pathutils.SSH_HOST_DSA_PUB),
1599 NDS_CLUSTER_NAME = "cluster_name"
1600 NDS_NODE_DAEMON_CERTIFICATE = "node_daemon_certificate"
1601 NDS_SSCONF = "ssconf"
1602 NDS_START_NODE_DAEMON = "start_node_daemon"
1604 # Path generating random UUID
1605 RANDOM_UUID_FILE = _constants.RANDOM_UUID_FILE
1607 # Regex string for verifying a UUID
1608 UUID_REGEX = "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
1610 # Auto-repair tag prefixes
1611 AUTO_REPAIR_TAG_PREFIX = _constants.AUTO_REPAIR_TAG_PREFIX
1612 AUTO_REPAIR_TAG_ENABLED = _constants.AUTO_REPAIR_TAG_ENABLED
1613 AUTO_REPAIR_TAG_SUSPENDED = _constants.AUTO_REPAIR_TAG_SUSPENDED
1614 AUTO_REPAIR_TAG_PENDING = _constants.AUTO_REPAIR_TAG_PENDING
1615 AUTO_REPAIR_TAG_RESULT = _constants.AUTO_REPAIR_TAG_RESULT
1617 # Auto-repair levels
1618 AUTO_REPAIR_FIX_STORAGE = _constants.AUTO_REPAIR_FIX_STORAGE
1619 AUTO_REPAIR_MIGRATE = _constants.AUTO_REPAIR_MIGRATE
1620 AUTO_REPAIR_FAILOVER = _constants.AUTO_REPAIR_FAILOVER
1621 AUTO_REPAIR_REINSTALL = _constants.AUTO_REPAIR_REINSTALL
1622 AUTO_REPAIR_ALL_TYPES = _constants.AUTO_REPAIR_ALL_TYPES
1624 # Auto-repair results
1625 AUTO_REPAIR_SUCCESS = _constants.AUTO_REPAIR_SUCCESS
1626 AUTO_REPAIR_FAILURE = _constants.AUTO_REPAIR_FAILURE
1627 AUTO_REPAIR_ENOPERM = _constants.AUTO_REPAIR_ENOPERM
1628 AUTO_REPAIR_ALL_RESULTS = _constants.AUTO_REPAIR_ALL_RESULTS
1630 # The version identifier for builtin data collectors
1631 BUILTIN_DATA_COLLECTOR_VERSION = _constants.BUILTIN_DATA_COLLECTOR_VERSION
1633 # The reason trail opcode parameter name
1634 OPCODE_REASON = _constants.OPCODE_REASON
1636 # The source reasons for the execution of an OpCode
1637 OPCODE_REASON_SRC_CLIENT = "gnt:client"
1638 OPCODE_REASON_SRC_NODED = "gnt:daemon:noded"
1639 OPCODE_REASON_SRC_OPCODE = "gnt:opcode"
1640 OPCODE_REASON_SRC_RLIB2 = "gnt:library:rlib2"
1641 OPCODE_REASON_SRC_USER = "gnt:user"
1643 OPCODE_REASON_SOURCES = compat.UniqueFrozenset([
1644 OPCODE_REASON_SRC_CLIENT,
1645 OPCODE_REASON_SRC_NODED,
1646 OPCODE_REASON_SRC_OPCODE,
1647 OPCODE_REASON_SRC_RLIB2,
1648 OPCODE_REASON_SRC_USER,
1651 DISKSTATS_FILE = _constants.DISKSTATS_FILE
1653 # CPU load collector variables
1654 STAT_FILE = _constants.STAT_FILE
1655 CPUAVGLOAD_BUFFER_SIZE = _constants.CPUAVGLOAD_BUFFER_SIZE
1656 CPUAVGLOAD_WINDOW_SIZE = _constants.CPUAVGLOAD_WINDOW_SIZE
1658 # Mond's variable for periodical data collection
1659 MOND_TIME_INTERVAL = _constants.MOND_TIME_INTERVAL
1661 # MonD's latest API version
1662 MOND_LATEST_API_VERSION = 1
1664 # Timeouts for upgrades
1666 UPGRADE_QUEUE_DRAIN_TIMEOUT = _constants.UPGRADE_QUEUE_DRAIN_TIMEOUT
1667 UPGRADE_QUEUE_POLL_INTERVAL = _constants.UPGRADE_QUEUE_POLL_INTERVAL
1669 # Do not re-export imported modules
1670 del re, _vcsversion, _constants, socket, pathutils, compat
1673 ALLOCATABLE_KEY = "allocatable"
1674 FAILED_KEY = "failed"