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 PROTOCOL_VERSION = _constants.PROTOCOL_VERSION
56 DAEMONS_GROUP = _constants.DAEMONS_GROUP
57 ADMIN_GROUP = _constants.ADMIN_GROUP
58 MASTERD_USER = _constants.MASTERD_USER
59 MASTERD_GROUP = _constants.MASTERD_GROUP
60 RAPI_USER = _constants.RAPI_USER
61 RAPI_GROUP = _constants.RAPI_GROUP
62 CONFD_USER = _constants.CONFD_USER
63 CONFD_GROUP = _constants.CONFD_GROUP
64 LUXID_USER = _constants.LUXID_USER
65 LUXID_GROUP = _constants.LUXID_GROUP
66 NODED_USER = _constants.NODED_USER
67 NODED_GROUP = _constants.NODED_GROUP
68 MOND_USER = _constants.MOND_USER
69 MOND_GROUP = _constants.MOND_GROUP
70 SSH_LOGIN_USER = _constants.SSH_LOGIN_USER
71 SSH_CONSOLE_USER = _constants.SSH_CONSOLE_USER
73 CPU_PINNING_SEP = _constants.CPU_PINNING_SEP
74 CPU_PINNING_ALL = _constants.CPU_PINNING_ALL
75 CPU_PINNING_ALL_VAL = _constants.CPU_PINNING_ALL_VAL
76 CPU_PINNING_OFF = _constants.CPU_PINNING_OFF
78 CPU_PINNING_ALL_XEN = _constants.CPU_PINNING_ALL_XEN
80 CPU_PINNING_ALL_KVM = _constants.CPU_PINNING_ALL_KVM
82 DD_CMD = _constants.DD_CMD
83 MAX_WIPE_CHUNK = _constants.MAX_WIPE_CHUNK
84 MIN_WIPE_CHUNK_PERCENT = _constants.MIN_WIPE_CHUNK_PERCENT
86 RUN_DIRS_MODE = _constants.RUN_DIRS_MODE
87 SECURE_DIR_MODE = _constants.SECURE_DIR_MODE
88 SECURE_FILE_MODE = _constants.SECURE_FILE_MODE
89 ADOPTABLE_BLOCKDEV_ROOT = _constants.ADOPTABLE_BLOCKDEV_ROOT
90 ENABLE_CONFD = _constants.ENABLE_CONFD
91 ENABLE_MOND = _constants.ENABLE_MOND
92 ENABLE_SPLIT_QUERY = _constants.ENABLE_SPLIT_QUERY
93 ENABLE_RESTRICTED_COMMANDS = _constants.ENABLE_RESTRICTED_COMMANDS
98 NODED = _constants.NODED
99 CONFD = _constants.CONFD
100 LUXID = _constants.LUXID
101 RAPI = _constants.RAPI
102 MASTERD = _constants.MASTERD
103 MOND = _constants.MOND
105 DAEMONS = _constants.DAEMONS
107 DAEMONS_PORTS = _constants.DAEMONS_PORTS
109 DEFAULT_NODED_PORT = _constants.DEFAULT_NODED_PORT
110 DEFAULT_CONFD_PORT = _constants.DEFAULT_CONFD_PORT
111 DEFAULT_MOND_PORT = _constants.DEFAULT_MOND_PORT
112 DEFAULT_RAPI_PORT = _constants.DEFAULT_RAPI_PORT
114 FIRST_DRBD_PORT = _constants.FIRST_DRBD_PORT
115 LAST_DRBD_PORT = _constants.LAST_DRBD_PORT
117 DAEMONS_LOGBASE = _constants.DAEMONS_LOGBASE
120 dict((daemon, pathutils.GetLogFilename(DAEMONS_LOGBASE[daemon]))
121 for daemon in DAEMONS_LOGBASE)
123 # Some daemons might require more than one logfile.
124 # Specifically, right now only the Haskell http library "snap", used by the
125 # monitoring daemon, requires multiple log files.
127 # These are the only valid reasons for having an extra logfile
128 EXTRA_LOGREASON_ACCESS = "access"
129 EXTRA_LOGREASON_ERROR = "error"
131 VALID_EXTRA_LOGREASONS = compat.UniqueFrozenset([
132 EXTRA_LOGREASON_ACCESS,
133 EXTRA_LOGREASON_ERROR,
136 # These are the extra logfiles, grouped by daemon
137 DAEMONS_EXTRA_LOGBASE = {
139 EXTRA_LOGREASON_ACCESS: _constants.EXTRA_LOGREASON_ACCESS,
140 EXTRA_LOGREASON_ERROR: _constants.EXTRA_LOGREASON_ERROR,
144 DAEMONS_EXTRA_LOGFILES = \
145 dict((daemon, dict((extra,
146 pathutils.GetLogFilename(DAEMONS_EXTRA_LOGBASE[daemon][extra]))
147 for extra in DAEMONS_EXTRA_LOGBASE[daemon]))
148 for daemon in DAEMONS_EXTRA_LOGBASE)
150 DEV_CONSOLE = _constants.DEV_CONSOLE
152 PROC_MOUNTS = _constants.PROC_MOUNTS
154 LUXI_EOM = _constants.LUXI_EOM
155 LUXI_VERSION = _constants.LUXI_VERSION
156 LUXI_OVERRIDE = _constants.LUXI_OVERRIDE
157 LUXI_OVERRIDE_MASTER = _constants.LUXI_OVERRIDE_MASTER
158 LUXI_OVERRIDE_QUERY = _constants.LUXI_OVERRIDE_QUERY
160 SYSLOG_USAGE = _constants.SYSLOG_USAGE
161 SYSLOG_NO = _constants.SYSLOG_NO
162 SYSLOG_YES = _constants.SYSLOG_YES
163 SYSLOG_ONLY = _constants.SYSLOG_ONLY
164 SYSLOG_SOCKET = _constants.SYSLOG_SOCKET
166 EXPORT_CONF_FILE = _constants.EXPORT_CONF_FILE
168 XEN_BOOTLOADER = _constants.XEN_BOOTLOADER
169 XEN_KERNEL = _constants.XEN_KERNEL
170 XEN_INITRD = _constants.XEN_INITRD
171 XEN_CMD_XM = _constants.XEN_CMD_XM
172 XEN_CMD_XL = _constants.XEN_CMD_XL
173 KNOWN_XEN_COMMANDS = _constants.KNOWN_XEN_COMMANDS
175 # When the Xen toolstack used is "xl", live migration requires the source host
176 # to connect to the target host via ssh (xl runs this command). We need to pass
177 # the command xl runs some extra info so that it can use Ganeti's key
178 # verification and not fail. Note that this string is incomplete: it must be
179 # filled with the cluster name before being used.
180 XL_SSH_CMD = ("ssh -l %s -oGlobalKnownHostsFile=%s"
181 " -oUserKnownHostsFile=/dev/null"
182 " -oCheckHostIp=no -oStrictHostKeyChecking=yes"
183 " -oHostKeyAlias=%%s") % (SSH_LOGIN_USER,
184 pathutils.SSH_KNOWN_HOSTS_FILE)
186 KVM_PATH = _constants.KVM_PATH
187 KVM_KERNEL = _constants.KVM_KERNEL
188 SOCAT_PATH = _constants.SOCAT_PATH
189 SOCAT_USE_ESCAPE = _constants.SOCAT_USE_ESCAPE
190 SOCAT_USE_COMPRESS = _constants.SOCAT_USE_COMPRESS
191 SOCAT_ESCAPE_CODE = _constants.SOCAT_ESCAPE_CODE
194 CONS_SSH = _constants.CONS_SSH
195 CONS_VNC = _constants.CONS_VNC
196 CONS_SPICE = _constants.CONS_SPICE
197 CONS_MESSAGE = _constants.CONS_MESSAGE
198 CONS_ALL = _constants.CONS_ALL
200 RSA_KEY_BITS = _constants.RSA_KEY_BITS
201 OPENSSL_CIPHERS = _constants.OPENSSL_CIPHERS
203 X509_CERT_SIGN_DIGEST = _constants.X509_CERT_SIGN_DIGEST
204 X509_CERT_DEFAULT_VALIDITY = _constants.X509_CERT_DEFAULT_VALIDITY
205 X509_CERT_CN = _constants.X509_CERT_CN
206 X509_CERT_SIGNATURE_HEADER = _constants.X509_CERT_SIGNATURE_HEADER
208 # Import/export daemon mode
209 IEM_IMPORT = _constants.IEM_IMPORT
210 IEM_EXPORT = _constants.IEM_EXPORT
212 # Import/export transport compression
213 IEC_NONE = _constants.IEC_NONE
214 IEC_GZIP = _constants.IEC_GZIP
215 IEC_ALL = _constants.IEC_ALL
217 IE_CUSTOM_SIZE = _constants.IE_CUSTOM_SIZE
219 IE_MAGIC_RE = re.compile(r"^[-_.a-zA-Z0-9]{5,100}$")
221 IEIO_FILE = _constants.IEIO_FILE
222 IEIO_RAW_DISK = _constants.IEIO_RAW_DISK
223 IEIO_SCRIPT = _constants.IEIO_SCRIPT
225 VALUE_DEFAULT = "default"
227 VALUE_GENERATE = "generate"
230 VALUE_FALSE = "false"
231 VALUE_HS_NOTHING = {"Nothing": None}
234 # External script validation mask
235 EXT_PLUGIN_MASK = re.compile("^[a-zA-Z0-9_-]+$")
237 HOOKS_PHASE_PRE = _constants.HOOKS_PHASE_PRE
238 HOOKS_PHASE_POST = _constants.HOOKS_PHASE_POST
239 HOOKS_NAME_CFGUPDATE = _constants.HOOKS_NAME_CFGUPDATE
240 HOOKS_NAME_WATCHER = _constants.HOOKS_NAME_WATCHER
241 HOOKS_VERSION = _constants.HOOKS_VERSION
242 HOOKS_PATH = _constants.HOOKS_PATH
244 HTYPE_CLUSTER = _constants.HTYPE_CLUSTER
245 HTYPE_NODE = _constants.HTYPE_NODE
246 HTYPE_GROUP = _constants.HTYPE_GROUP
247 HTYPE_INSTANCE = _constants.HTYPE_INSTANCE
248 HTYPE_NETWORK = _constants.HTYPE_NETWORK
250 HKR_SKIP = _constants.HKR_SKIP
251 HKR_FAIL = _constants.HKR_FAIL
252 HKR_SUCCESS = _constants.HKR_SUCCESS
254 ST_BLOCK = _constants.ST_BLOCK
255 ST_DISKLESS = _constants.ST_DISKLESS
256 ST_EXT = _constants.ST_EXT
257 ST_FILE = _constants.ST_FILE
258 ST_LVM_PV = _constants.ST_LVM_PV
259 ST_LVM_VG = _constants.ST_LVM_VG
260 ST_RADOS = _constants.ST_RADOS
261 STORAGE_TYPES = _constants.STORAGE_TYPES
262 STS_REPORT = _constants.STS_REPORT
265 # first two are valid in LU context only, not passed to backend
266 SF_NODE = _constants.SF_NODE
267 SF_TYPE = _constants.SF_TYPE
268 # and the rest are valid in backend
269 SF_NAME = _constants.SF_NAME
270 SF_SIZE = _constants.SF_SIZE
271 SF_FREE = _constants.SF_FREE
272 SF_USED = _constants.SF_USED
273 SF_ALLOCATABLE = _constants.SF_ALLOCATABLE
274 VALID_STORAGE_FIELDS = _constants.VALID_STORAGE_FIELDS
275 MODIFIABLE_STORAGE_FIELDS = _constants.MODIFIABLE_STORAGE_FIELDS
277 SO_FIX_CONSISTENCY = _constants.SO_FIX_CONSISTENCY
278 VALID_STORAGE_OPERATIONS = _constants.VALID_STORAGE_OPERATIONS
280 VF_DEV = _constants.VF_DEV
281 VF_INSTANCE = _constants.VF_INSTANCE
282 VF_NAME = _constants.VF_NAME
283 VF_NODE = _constants.VF_NODE
284 VF_PHYS = _constants.VF_PHYS
285 VF_SIZE = _constants.VF_SIZE
286 VF_VG = _constants.VF_VG
288 LDS_OKAY = _constants.LDS_OKAY
289 LDS_UNKNOWN = _constants.LDS_UNKNOWN
290 LDS_FAULTY = _constants.LDS_FAULTY
291 LDS_NAMES = _constants.LDS_NAMES
293 DT_BLOCK = _constants.DT_BLOCK
294 DT_DISKLESS = _constants.DT_DISKLESS
295 DT_DRBD8 = _constants.DT_DRBD8
296 DT_EXT = _constants.DT_EXT
297 DT_FILE = _constants.DT_FILE
298 DT_PLAIN = _constants.DT_PLAIN
299 DT_RBD = _constants.DT_RBD
300 DT_SHARED_FILE = _constants.DT_SHARED_FILE
301 DISK_TEMPLATE_PREFERENCE = _constants.DISK_TEMPLATE_PREFERENCE
302 DISK_TEMPLATES = _constants.DISK_TEMPLATES
303 DEFAULT_ENABLED_DISK_TEMPLATES = _constants.DEFAULT_ENABLED_DISK_TEMPLATES
305 MAP_DISK_TEMPLATE_STORAGE_TYPE = _constants.MAP_DISK_TEMPLATE_STORAGE_TYPE
307 DTS_INT_MIRROR = _constants.DTS_INT_MIRROR
308 DTS_EXT_MIRROR = _constants.DTS_EXT_MIRROR
309 DTS_NOT_LVM = _constants.DTS_NOT_LVM
310 DTS_GROWABLE = _constants.DTS_GROWABLE
311 DTS_MAY_ADOPT = _constants.DTS_MAY_ADOPT
312 DTS_MUST_ADOPT = _constants.DTS_MUST_ADOPT
313 DTS_MIRRORED = _constants.DTS_MIRRORED
314 DTS_FILEBASED = _constants.DTS_FILEBASED
315 DTS_COPYABLE = _constants.DTS_COPYABLE
316 DTS_EXCL_STORAGE = _constants.DTS_EXCL_STORAGE
317 DTS_NO_FREE_SPACE_CHECK = _constants.DTS_NO_FREE_SPACE_CHECK
318 DTS_BLOCK = _constants.DTS_BLOCK
320 DRBD_HMAC_ALG = _constants.DRBD_HMAC_ALG
321 DRBD_DEFAULT_NET_PROTOCOL = _constants.DRBD_DEFAULT_NET_PROTOCOL
322 DRBD_MIGRATION_NET_PROTOCOL = _constants.DRBD_MIGRATION_NET_PROTOCOL
323 DRBD_STATUS_FILE = _constants.DRBD_STATUS_FILE
324 DRBD_META_SIZE = _constants.DRBD_META_SIZE
326 DRBD_B_NONE = _constants.DRBD_B_NONE
327 DRBD_B_DISK_BARRIERS = _constants.DRBD_B_DISK_BARRIERS
328 DRBD_B_DISK_DRAIN = _constants.DRBD_B_DISK_DRAIN
329 DRBD_B_DISK_FLUSH = _constants.DRBD_B_DISK_FLUSH
331 # Valid barrier combinations: "n" or any non-null subset of "bfd"
332 DRBD_VALID_BARRIER_OPT = compat.UniqueFrozenset([
333 frozenset([DRBD_B_NONE]),
334 frozenset([DRBD_B_DISK_BARRIERS]),
335 frozenset([DRBD_B_DISK_DRAIN]),
336 frozenset([DRBD_B_DISK_FLUSH]),
337 frozenset([DRBD_B_DISK_DRAIN, DRBD_B_DISK_FLUSH]),
338 frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_DRAIN]),
339 frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_FLUSH]),
340 frozenset([DRBD_B_DISK_BARRIERS, DRBD_B_DISK_FLUSH, DRBD_B_DISK_DRAIN]),
343 RBD_CMD = _constants.RBD_CMD
345 FD_BLKTAP = _constants.FD_BLKTAP
346 FD_LOOP = _constants.FD_LOOP
347 FILE_DRIVER = _constants.FILE_DRIVER
349 LDS_DRBD = _constants.LDS_DRBD
351 DISK_RDONLY = _constants.DISK_RDONLY
352 DISK_RDWR = _constants.DISK_RDWR
353 DISK_ACCESS_SET = _constants.DISK_ACCESS_SET
354 DISK_USERSPACE = _constants.DISK_USERSPACE
355 DISK_KERNELSPACE = _constants.DISK_KERNELSPACE
356 DISK_VALID_ACCESS_MODES = _constants.DISK_VALID_ACCESS_MODES
358 REPLACE_DISK_PRI = _constants.REPLACE_DISK_PRI
359 REPLACE_DISK_SEC = _constants.REPLACE_DISK_SEC
360 REPLACE_DISK_CHG = _constants.REPLACE_DISK_CHG
361 REPLACE_DISK_AUTO = _constants.REPLACE_DISK_AUTO
362 REPLACE_MODES = _constants.REPLACE_MODES
364 EXPORT_MODE_LOCAL = _constants.EXPORT_MODE_LOCAL
365 EXPORT_MODE_REMOTE = _constants.EXPORT_MODE_REMOTE
366 EXPORT_MODES = _constants.EXPORT_MODES
368 INSTANCE_CREATE = _constants.INSTANCE_CREATE
369 INSTANCE_IMPORT = _constants.INSTANCE_IMPORT
370 INSTANCE_REMOTE_IMPORT = _constants.INSTANCE_REMOTE_IMPORT
371 INSTANCE_CREATE_MODES = _constants.INSTANCE_CREATE_MODES
373 RIE_VERSION = _constants.RIE_VERSION
374 RIE_HANDSHAKE = _constants.RIE_HANDSHAKE
375 RIE_CERT_VALIDITY = _constants.RIE_CERT_VALIDITY
376 RIE_CONNECT_TIMEOUT = _constants.RIE_CONNECT_TIMEOUT
377 RIE_CONNECT_ATTEMPT_TIMEOUT = _constants.RIE_CONNECT_ATTEMPT_TIMEOUT
378 RIE_CONNECT_RETRIES = _constants.RIE_CONNECT_RETRIES
379 CHILD_LINGER_TIMEOUT = _constants.CHILD_LINGER_TIMEOUT
381 INISECT_EXP = _constants.INISECT_EXP
382 INISECT_INS = _constants.INISECT_INS
383 INISECT_HYP = _constants.INISECT_HYP
384 INISECT_BEP = _constants.INISECT_BEP
385 INISECT_OSP = _constants.INISECT_OSP
387 DDM_ADD = _constants.DDM_ADD
388 DDM_MODIFY = _constants.DDM_MODIFY
389 DDM_REMOVE = _constants.DDM_REMOVE
390 DDMS_VALUES = _constants.DDMS_VALUES
391 DDMS_VALUES_WITH_MODIFY = _constants.DDMS_VALUES_WITH_MODIFY
393 EXIT_SUCCESS = _constants.EXIT_SUCCESS
394 EXIT_FAILURE = _constants.EXIT_FAILURE
395 EXIT_NOTCLUSTER = _constants.EXIT_NOTCLUSTER
396 EXIT_NOTMASTER = _constants.EXIT_NOTMASTER
397 EXIT_NODESETUP_ERROR = _constants.EXIT_NODESETUP_ERROR
398 EXIT_CONFIRMATION = _constants.EXIT_CONFIRMATION
399 EXIT_UNKNOWN_FIELD = _constants.EXIT_UNKNOWN_FIELD
401 TAG_CLUSTER = _constants.TAG_CLUSTER
402 TAG_NODEGROUP = _constants.TAG_NODEGROUP
403 TAG_NODE = _constants.TAG_NODE
404 TAG_INSTANCE = _constants.TAG_INSTANCE
405 TAG_NETWORK = _constants.TAG_NETWORK
406 VALID_TAG_TYPES = _constants.VALID_TAG_TYPES
408 MAX_TAG_LEN = _constants.MAX_TAG_LEN
409 MAX_TAGS_PER_OBJ = _constants.MAX_TAGS_PER_OBJ
412 DEFAULT_BRIDGE = _constants.DEFAULT_BRIDGE
413 DEFAULT_OVS = _constants.DEFAULT_OVS
414 CLASSIC_DRBD_SYNC_SPEED = _constants.CLASSIC_DRBD_SYNC_SPEED
415 IP4_ADDRESS_LOCALHOST = _constants.IP4_ADDRESS_LOCALHOST
416 IP4_ADDRESS_ANY = _constants.IP4_ADDRESS_ANY
417 IP6_ADDRESS_LOCALHOST = _constants.IP6_ADDRESS_LOCALHOST
418 IP6_ADDRESS_ANY = _constants.IP6_ADDRESS_ANY
419 IP4_VERSION = _constants.IP4_VERSION
420 IP6_VERSION = _constants.IP6_VERSION
421 VALID_IP_VERSIONS = _constants.VALID_IP_VERSIONS
422 # for export to htools
423 IP4_FAMILY = socket.AF_INET
424 IP6_FAMILY = socket.AF_INET6
426 TCP_PING_TIMEOUT = _constants.TCP_PING_TIMEOUT
427 DEFAULT_VG = _constants.DEFAULT_VG
428 DEFAULT_DRBD_HELPER = _constants.DEFAULT_DRBD_HELPER
429 MIN_VG_SIZE = _constants.MIN_VG_SIZE
430 DEFAULT_MAC_PREFIX = _constants.DEFAULT_MAC_PREFIX
431 DEFAULT_SHUTDOWN_TIMEOUT = _constants.DEFAULT_SHUTDOWN_TIMEOUT
432 NODE_MAX_CLOCK_SKEW = _constants.NODE_MAX_CLOCK_SKEW
433 DISK_TRANSFER_CONNECT_TIMEOUT = _constants.DISK_TRANSFER_CONNECT_TIMEOUT
434 DISK_SEPARATOR = _constants.DISK_SEPARATOR
435 IP_COMMAND_PATH = _constants.IP_COMMAND_PATH
436 JOB_IDS_KEY = _constants.JOB_IDS_KEY
438 RUNPARTS_SKIP = _constants.RUNPARTS_SKIP
439 RUNPARTS_RUN = _constants.RUNPARTS_RUN
440 RUNPARTS_ERR = _constants.RUNPARTS_ERR
441 RUNPARTS_STATUS = _constants.RUNPARTS_STATUS
443 RPC_ENCODING_NONE = _constants.RPC_ENCODING_NONE
444 RPC_ENCODING_ZLIB_BASE64 = _constants.RPC_ENCODING_ZLIB_BASE64
446 RPC_TMO_URGENT = _constants.RPC_TMO_URGENT
447 RPC_TMO_FAST = _constants.RPC_TMO_FAST
448 RPC_TMO_NORMAL = _constants.RPC_TMO_NORMAL
449 RPC_TMO_SLOW = _constants.RPC_TMO_SLOW
450 RPC_TMO_4HRS = _constants.RPC_TMO_4HRS
451 RPC_TMO_1DAY = _constants.RPC_TMO_1DAY
452 RPC_CONNECT_TIMEOUT = _constants.RPC_CONNECT_TIMEOUT
454 OS_SCRIPT_CREATE = _constants.OS_SCRIPT_CREATE
455 OS_SCRIPT_IMPORT = _constants.OS_SCRIPT_IMPORT
456 OS_SCRIPT_EXPORT = _constants.OS_SCRIPT_EXPORT
457 OS_SCRIPT_RENAME = _constants.OS_SCRIPT_RENAME
458 OS_SCRIPT_VERIFY = _constants.OS_SCRIPT_VERIFY
459 OS_SCRIPTS = _constants.OS_SCRIPTS
461 OS_API_FILE = _constants.OS_API_FILE
462 OS_VARIANTS_FILE = _constants.OS_VARIANTS_FILE
463 OS_PARAMETERS_FILE = _constants.OS_PARAMETERS_FILE
465 OS_VALIDATE_PARAMETERS = _constants.OS_VALIDATE_PARAMETERS
466 OS_VALIDATE_CALLS = _constants.OS_VALIDATE_CALLS
468 ES_ACTION_CREATE = _constants.ES_ACTION_CREATE
469 ES_ACTION_REMOVE = _constants.ES_ACTION_REMOVE
470 ES_ACTION_GROW = _constants.ES_ACTION_GROW
471 ES_ACTION_ATTACH = _constants.ES_ACTION_ATTACH
472 ES_ACTION_DETACH = _constants.ES_ACTION_DETACH
473 ES_ACTION_SETINFO = _constants.ES_ACTION_SETINFO
474 ES_ACTION_VERIFY = _constants.ES_ACTION_VERIFY
476 ES_SCRIPT_CREATE = _constants.ES_SCRIPT_CREATE
477 ES_SCRIPT_REMOVE = _constants.ES_SCRIPT_REMOVE
478 ES_SCRIPT_GROW = _constants.ES_SCRIPT_GROW
479 ES_SCRIPT_ATTACH = _constants.ES_SCRIPT_ATTACH
480 ES_SCRIPT_DETACH = _constants.ES_SCRIPT_DETACH
481 ES_SCRIPT_SETINFO = _constants.ES_SCRIPT_SETINFO
482 ES_SCRIPT_VERIFY = _constants.ES_SCRIPT_VERIFY
483 ES_SCRIPTS = _constants.ES_SCRIPTS
485 ES_PARAMETERS_FILE = _constants.ES_PARAMETERS_FILE
487 INSTANCE_REBOOT_SOFT = _constants.INSTANCE_REBOOT_SOFT
488 INSTANCE_REBOOT_HARD = _constants.INSTANCE_REBOOT_HARD
489 INSTANCE_REBOOT_FULL = _constants.INSTANCE_REBOOT_FULL
490 REBOOT_TYPES = _constants.REBOOT_TYPES
492 INSTANCE_REBOOT_ALLOWED = _constants.INSTANCE_REBOOT_ALLOWED
493 INSTANCE_REBOOT_EXIT = _constants.INSTANCE_REBOOT_EXIT
494 REBOOT_BEHAVIORS = _constants.REBOOT_BEHAVIORS
496 VTYPE_STRING = _constants.VTYPE_STRING
497 VTYPE_MAYBE_STRING = _constants.VTYPE_MAYBE_STRING
498 VTYPE_BOOL = _constants.VTYPE_BOOL
499 VTYPE_SIZE = _constants.VTYPE_SIZE
500 VTYPE_INT = _constants.VTYPE_INT
501 ENFORCEABLE_TYPES = _constants.ENFORCEABLE_TYPES
503 IFACE_NO_IP_VERSION_SPECIFIED = _constants.IFACE_NO_IP_VERSION_SPECIFIED
505 VALID_SERIAL_SPEEDS = _constants.VALID_SERIAL_SPEEDS
507 HV_BOOT_ORDER = _constants.HV_BOOT_ORDER
508 HV_CDROM_IMAGE_PATH = _constants.HV_CDROM_IMAGE_PATH
509 HV_KVM_CDROM2_IMAGE_PATH = _constants.HV_KVM_CDROM2_IMAGE_PATH
510 HV_KVM_FLOPPY_IMAGE_PATH = _constants.HV_KVM_FLOPPY_IMAGE_PATH
511 HV_NIC_TYPE = _constants.HV_NIC_TYPE
512 HV_DISK_TYPE = _constants.HV_DISK_TYPE
513 HV_KVM_CDROM_DISK_TYPE = _constants.HV_KVM_CDROM_DISK_TYPE
514 HV_VNC_BIND_ADDRESS = _constants.HV_VNC_BIND_ADDRESS
515 HV_VNC_PASSWORD_FILE = _constants.HV_VNC_PASSWORD_FILE
516 HV_VNC_TLS = _constants.HV_VNC_TLS
517 HV_VNC_X509 = _constants.HV_VNC_X509
518 HV_VNC_X509_VERIFY = _constants.HV_VNC_X509_VERIFY
519 HV_KVM_SPICE_BIND = _constants.HV_KVM_SPICE_BIND
520 HV_KVM_SPICE_IP_VERSION = _constants.HV_KVM_SPICE_IP_VERSION
521 HV_KVM_SPICE_PASSWORD_FILE = _constants.HV_KVM_SPICE_PASSWORD_FILE
522 HV_KVM_SPICE_LOSSLESS_IMG_COMPR = _constants.HV_KVM_SPICE_LOSSLESS_IMG_COMPR
523 HV_KVM_SPICE_JPEG_IMG_COMPR = _constants.HV_KVM_SPICE_JPEG_IMG_COMPR
524 HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR = _constants.HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR
525 HV_KVM_SPICE_STREAMING_VIDEO_DETECTION = \
526 _constants.HV_KVM_SPICE_STREAMING_VIDEO_DETECTION
527 HV_KVM_SPICE_AUDIO_COMPR = _constants.HV_KVM_SPICE_AUDIO_COMPR
528 HV_KVM_SPICE_USE_TLS = _constants.HV_KVM_SPICE_USE_TLS
529 HV_KVM_SPICE_TLS_CIPHERS = _constants.HV_KVM_SPICE_TLS_CIPHERS
530 HV_KVM_SPICE_USE_VDAGENT = _constants.HV_KVM_SPICE_USE_VDAGENT
531 HV_ACPI = _constants.HV_ACPI
532 HV_PAE = _constants.HV_PAE
533 HV_USE_BOOTLOADER = _constants.HV_USE_BOOTLOADER
534 HV_BOOTLOADER_ARGS = _constants.HV_BOOTLOADER_ARGS
535 HV_BOOTLOADER_PATH = _constants.HV_BOOTLOADER_PATH
536 HV_KERNEL_ARGS = _constants.HV_KERNEL_ARGS
537 HV_KERNEL_PATH = _constants.HV_KERNEL_PATH
538 HV_INITRD_PATH = _constants.HV_INITRD_PATH
539 HV_ROOT_PATH = _constants.HV_ROOT_PATH
540 HV_SERIAL_CONSOLE = _constants.HV_SERIAL_CONSOLE
541 HV_SERIAL_SPEED = _constants.HV_SERIAL_SPEED
542 HV_USB_MOUSE = _constants.HV_USB_MOUSE
543 HV_KEYMAP = _constants.HV_KEYMAP
544 HV_DEVICE_MODEL = _constants.HV_DEVICE_MODEL
545 HV_INIT_SCRIPT = _constants.HV_INIT_SCRIPT
546 HV_MIGRATION_PORT = _constants.HV_MIGRATION_PORT
547 HV_MIGRATION_BANDWIDTH = _constants.HV_MIGRATION_BANDWIDTH
548 HV_MIGRATION_DOWNTIME = _constants.HV_MIGRATION_DOWNTIME
549 HV_MIGRATION_MODE = _constants.HV_MIGRATION_MODE
550 HV_USE_LOCALTIME = _constants.HV_USE_LOCALTIME
551 HV_DISK_CACHE = _constants.HV_DISK_CACHE
552 HV_SECURITY_MODEL = _constants.HV_SECURITY_MODEL
553 HV_SECURITY_DOMAIN = _constants.HV_SECURITY_DOMAIN
554 HV_KVM_FLAG = _constants.HV_KVM_FLAG
555 HV_VHOST_NET = _constants.HV_VHOST_NET
556 HV_KVM_USE_CHROOT = _constants.HV_KVM_USE_CHROOT
557 HV_CPU_MASK = _constants.HV_CPU_MASK
558 HV_MEM_PATH = _constants.HV_MEM_PATH
559 HV_PASSTHROUGH = _constants.HV_PASSTHROUGH
560 HV_BLOCKDEV_PREFIX = _constants.HV_BLOCKDEV_PREFIX
561 HV_REBOOT_BEHAVIOR = _constants.HV_REBOOT_BEHAVIOR
562 HV_CPU_TYPE = _constants.HV_CPU_TYPE
563 HV_CPU_CAP = _constants.HV_CPU_CAP
564 HV_CPU_WEIGHT = _constants.HV_CPU_WEIGHT
565 HV_CPU_CORES = _constants.HV_CPU_CORES
566 HV_CPU_THREADS = _constants.HV_CPU_THREADS
567 HV_CPU_SOCKETS = _constants.HV_CPU_SOCKETS
568 HV_SOUNDHW = _constants.HV_SOUNDHW
569 HV_USB_DEVICES = _constants.HV_USB_DEVICES
570 HV_VGA = _constants.HV_VGA
571 HV_KVM_EXTRA = _constants.HV_KVM_EXTRA
572 HV_KVM_MACHINE_VERSION = _constants.HV_KVM_MACHINE_VERSION
573 HV_KVM_PATH = _constants.HV_KVM_PATH
574 HV_VIF_TYPE = _constants.HV_VIF_TYPE
575 HV_VIF_SCRIPT = _constants.HV_VIF_SCRIPT
576 HV_XEN_CMD = _constants.HV_XEN_CMD
577 HV_XEN_CPUID = _constants.HV_XEN_CPUID
578 HV_VNET_HDR = _constants.HV_VNET_HDR
579 HV_VIRIDIAN = _constants.HV_VIRIDIAN
581 HVS_PARAMETER_TYPES = {
582 HV_KVM_PATH: VTYPE_STRING,
583 HV_BOOT_ORDER: VTYPE_STRING,
584 HV_KVM_FLOPPY_IMAGE_PATH: VTYPE_STRING,
585 HV_CDROM_IMAGE_PATH: VTYPE_STRING,
586 HV_KVM_CDROM2_IMAGE_PATH: VTYPE_STRING,
587 HV_NIC_TYPE: VTYPE_STRING,
588 HV_DISK_TYPE: VTYPE_STRING,
589 HV_KVM_CDROM_DISK_TYPE: VTYPE_STRING,
590 HV_VNC_PASSWORD_FILE: VTYPE_STRING,
591 HV_VNC_BIND_ADDRESS: VTYPE_STRING,
592 HV_VNC_TLS: VTYPE_BOOL,
593 HV_VNC_X509: VTYPE_STRING,
594 HV_VNC_X509_VERIFY: VTYPE_BOOL,
595 HV_KVM_SPICE_BIND: VTYPE_STRING,
596 HV_KVM_SPICE_IP_VERSION: VTYPE_INT,
597 HV_KVM_SPICE_PASSWORD_FILE: VTYPE_STRING,
598 HV_KVM_SPICE_LOSSLESS_IMG_COMPR: VTYPE_STRING,
599 HV_KVM_SPICE_JPEG_IMG_COMPR: VTYPE_STRING,
600 HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR: VTYPE_STRING,
601 HV_KVM_SPICE_STREAMING_VIDEO_DETECTION: VTYPE_STRING,
602 HV_KVM_SPICE_AUDIO_COMPR: VTYPE_BOOL,
603 HV_KVM_SPICE_USE_TLS: VTYPE_BOOL,
604 HV_KVM_SPICE_TLS_CIPHERS: VTYPE_STRING,
605 HV_KVM_SPICE_USE_VDAGENT: VTYPE_BOOL,
608 HV_USE_BOOTLOADER: VTYPE_BOOL,
609 HV_BOOTLOADER_PATH: VTYPE_STRING,
610 HV_BOOTLOADER_ARGS: VTYPE_STRING,
611 HV_KERNEL_PATH: VTYPE_STRING,
612 HV_KERNEL_ARGS: VTYPE_STRING,
613 HV_INITRD_PATH: VTYPE_STRING,
614 HV_ROOT_PATH: VTYPE_MAYBE_STRING,
615 HV_SERIAL_CONSOLE: VTYPE_BOOL,
616 HV_SERIAL_SPEED: VTYPE_INT,
617 HV_USB_MOUSE: VTYPE_STRING,
618 HV_KEYMAP: VTYPE_STRING,
619 HV_DEVICE_MODEL: VTYPE_STRING,
620 HV_INIT_SCRIPT: VTYPE_STRING,
621 HV_MIGRATION_PORT: VTYPE_INT,
622 HV_MIGRATION_BANDWIDTH: VTYPE_INT,
623 HV_MIGRATION_DOWNTIME: VTYPE_INT,
624 HV_MIGRATION_MODE: VTYPE_STRING,
625 HV_USE_LOCALTIME: VTYPE_BOOL,
626 HV_DISK_CACHE: VTYPE_STRING,
627 HV_SECURITY_MODEL: VTYPE_STRING,
628 HV_SECURITY_DOMAIN: VTYPE_STRING,
629 HV_KVM_FLAG: VTYPE_STRING,
630 HV_VHOST_NET: VTYPE_BOOL,
631 HV_KVM_USE_CHROOT: VTYPE_BOOL,
632 HV_CPU_MASK: VTYPE_STRING,
633 HV_MEM_PATH: VTYPE_STRING,
634 HV_PASSTHROUGH: VTYPE_STRING,
635 HV_BLOCKDEV_PREFIX: VTYPE_STRING,
636 HV_REBOOT_BEHAVIOR: VTYPE_STRING,
637 HV_CPU_TYPE: VTYPE_STRING,
638 HV_CPU_CAP: VTYPE_INT,
639 HV_CPU_WEIGHT: VTYPE_INT,
640 HV_CPU_CORES: VTYPE_INT,
641 HV_CPU_THREADS: VTYPE_INT,
642 HV_CPU_SOCKETS: VTYPE_INT,
643 HV_SOUNDHW: VTYPE_STRING,
644 HV_USB_DEVICES: VTYPE_STRING,
645 HV_VGA: VTYPE_STRING,
646 HV_KVM_EXTRA: VTYPE_STRING,
647 HV_KVM_MACHINE_VERSION: VTYPE_STRING,
648 HV_VIF_TYPE: VTYPE_STRING,
649 HV_VIF_SCRIPT: VTYPE_STRING,
650 HV_XEN_CMD: VTYPE_STRING,
651 HV_XEN_CPUID: VTYPE_STRING,
652 HV_VNET_HDR: VTYPE_BOOL,
653 HV_VIRIDIAN: VTYPE_BOOL,
656 HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
658 HVS_PARAMETER_TITLES = _constants.HVS_PARAMETER_TITLES
660 HV_MIGRATION_COMPLETED = _constants.HV_MIGRATION_COMPLETED
661 HV_MIGRATION_ACTIVE = _constants.HV_MIGRATION_ACTIVE
662 HV_MIGRATION_FAILED = _constants.HV_MIGRATION_FAILED
663 HV_MIGRATION_CANCELLED = _constants.HV_MIGRATION_CANCELLED
664 HV_MIGRATION_VALID_STATUSES = _constants.HV_MIGRATION_VALID_STATUSES
665 HV_MIGRATION_FAILED_STATUSES = _constants.HV_MIGRATION_FAILED_STATUSES
666 HV_KVM_MIGRATION_VALID_STATUSES = _constants.HV_KVM_MIGRATION_VALID_STATUSES
668 HV_NODEINFO_KEY_VERSION = _constants.HV_NODEINFO_KEY_VERSION
670 HVST_MEMORY_TOTAL = _constants.HVST_MEMORY_TOTAL
671 HVST_MEMORY_NODE = _constants.HVST_MEMORY_NODE
672 HVST_MEMORY_HV = _constants.HVST_MEMORY_HV
673 HVST_CPU_TOTAL = _constants.HVST_CPU_TOTAL
674 HVST_CPU_NODE = _constants.HVST_CPU_NODE
675 HVSTS_PARAMETERS = _constants.HVSTS_PARAMETERS
676 HVST_DEFAULTS = _constants.HVST_DEFAULTS
677 HVSTS_PARAMETER_TYPES = _constants.HVSTS_PARAMETER_TYPES
679 DS_DISK_TOTAL = _constants.DS_DISK_TOTAL
680 DS_DISK_RESERVED = _constants.DS_DISK_RESERVED
681 DS_DISK_OVERHEAD = _constants.DS_DISK_OVERHEAD
682 DS_DEFAULTS = _constants.DS_DEFAULTS
683 DSS_PARAMETER_TYPES = _constants.DSS_PARAMETER_TYPES
684 DSS_PARAMETERS = _constants.DSS_PARAMETERS
685 DS_VALID_TYPES = _constants.DS_VALID_TYPES
687 BE_MEMORY = _constants.BE_MEMORY
688 BE_MAXMEM = _constants.BE_MAXMEM
689 BE_MINMEM = _constants.BE_MINMEM
690 BE_VCPUS = _constants.BE_VCPUS
691 BE_AUTO_BALANCE = _constants.BE_AUTO_BALANCE
692 BE_ALWAYS_FAILOVER = _constants.BE_ALWAYS_FAILOVER
693 BE_SPINDLE_USE = _constants.BE_SPINDLE_USE
694 BES_PARAMETER_TYPES = _constants.BES_PARAMETER_TYPES
695 BES_PARAMETER_TITLES = _constants.BES_PARAMETER_TITLES
696 BES_PARAMETER_COMPAT = _constants.BES_PARAMETER_COMPAT
697 BES_PARAMETERS = _constants.BES_PARAMETERS
699 ISPEC_MEM_SIZE = _constants.ISPEC_MEM_SIZE
700 ISPEC_CPU_COUNT = _constants.ISPEC_CPU_COUNT
701 ISPEC_DISK_COUNT = _constants.ISPEC_DISK_COUNT
702 ISPEC_DISK_SIZE = _constants.ISPEC_DISK_SIZE
703 ISPEC_NIC_COUNT = _constants.ISPEC_NIC_COUNT
704 ISPEC_SPINDLE_USE = _constants.ISPEC_SPINDLE_USE
705 ISPECS_PARAMETER_TYPES = _constants.ISPECS_PARAMETER_TYPES
706 ISPECS_PARAMETERS = _constants.ISPECS_PARAMETERS
708 ISPECS_MINMAX = _constants.ISPECS_MINMAX
709 ISPECS_MIN = _constants.ISPECS_MIN
710 ISPECS_MAX = _constants.ISPECS_MAX
711 ISPECS_STD = _constants.ISPECS_STD
712 IPOLICY_DTS = _constants.IPOLICY_DTS
713 IPOLICY_VCPU_RATIO = _constants.IPOLICY_VCPU_RATIO
714 IPOLICY_SPINDLE_RATIO = _constants.IPOLICY_SPINDLE_RATIO
715 ISPECS_MINMAX_KEYS = _constants.ISPECS_MINMAX_KEYS
716 IPOLICY_PARAMETERS = _constants.IPOLICY_PARAMETERS
717 IPOLICY_ALL_KEYS = _constants.IPOLICY_ALL_KEYS
719 ND_OOB_PROGRAM = _constants.ND_OOB_PROGRAM
720 ND_SPINDLE_COUNT = _constants.ND_SPINDLE_COUNT
721 ND_EXCLUSIVE_STORAGE = _constants.ND_EXCLUSIVE_STORAGE
722 ND_OVS = _constants.ND_OVS
723 ND_OVS_NAME = _constants.ND_OVS_NAME
724 ND_OVS_LINK = _constants.ND_OVS_LINK
726 NDS_PARAMETER_TYPES = _constants.NDS_PARAMETER_TYPES
727 NDS_PARAMETERS = _constants.NDS_PARAMETERS
728 NDS_PARAMETER_TITLES = _constants.NDS_PARAMETER_TITLES
730 LDP_RESYNC_RATE = _constants.LDP_RESYNC_RATE
731 LDP_STRIPES = _constants.LDP_STRIPES
732 LDP_BARRIERS = _constants.LDP_BARRIERS
733 LDP_NO_META_FLUSH = _constants.LDP_NO_META_FLUSH
734 LDP_DEFAULT_METAVG = _constants.LDP_DEFAULT_METAVG
735 LDP_DISK_CUSTOM = _constants.LDP_DISK_CUSTOM
736 LDP_NET_CUSTOM = _constants.LDP_NET_CUSTOM
737 LDP_PROTOCOL = _constants.LDP_PROTOCOL
738 LDP_DYNAMIC_RESYNC = _constants.LDP_DYNAMIC_RESYNC
739 LDP_PLAN_AHEAD = _constants.LDP_PLAN_AHEAD
740 LDP_FILL_TARGET = _constants.LDP_FILL_TARGET
741 LDP_DELAY_TARGET = _constants.LDP_DELAY_TARGET
742 LDP_MAX_RATE = _constants.LDP_MAX_RATE
743 LDP_MIN_RATE = _constants.LDP_MIN_RATE
744 LDP_POOL = _constants.LDP_POOL
745 LDP_ACCESS = _constants.LDP_ACCESS
746 DISK_LD_TYPES = _constants.DISK_LD_TYPES
747 DISK_LD_PARAMETERS = _constants.DISK_LD_PARAMETERS
749 DRBD_RESYNC_RATE = _constants.DRBD_RESYNC_RATE
750 DRBD_DATA_STRIPES = _constants.DRBD_DATA_STRIPES
751 DRBD_META_STRIPES = _constants.DRBD_META_STRIPES
752 DRBD_DISK_BARRIERS = _constants.DRBD_DISK_BARRIERS
753 DRBD_META_BARRIERS = _constants.DRBD_META_BARRIERS
754 DRBD_DEFAULT_METAVG = _constants.DRBD_DEFAULT_METAVG
755 DRBD_DISK_CUSTOM = _constants.DRBD_DISK_CUSTOM
756 DRBD_NET_CUSTOM = _constants.DRBD_NET_CUSTOM
757 DRBD_PROTOCOL = _constants.DRBD_PROTOCOL
758 DRBD_DYNAMIC_RESYNC = _constants.DRBD_DYNAMIC_RESYNC
759 DRBD_PLAN_AHEAD = _constants.DRBD_PLAN_AHEAD
760 DRBD_FILL_TARGET = _constants.DRBD_FILL_TARGET
761 DRBD_DELAY_TARGET = _constants.DRBD_DELAY_TARGET
762 DRBD_MAX_RATE = _constants.DRBD_MAX_RATE
763 DRBD_MIN_RATE = _constants.DRBD_MIN_RATE
764 LV_STRIPES = _constants.LV_STRIPES
765 RBD_ACCESS = _constants.RBD_ACCESS
766 RBD_POOL = _constants.RBD_POOL
767 DISK_DT_TYPES = _constants.DISK_DT_TYPES
768 DISK_DT_PARAMETERS = _constants.DISK_DT_PARAMETERS
770 DDP_LOCAL_IP = _constants.DDP_LOCAL_IP
771 DDP_REMOTE_IP = _constants.DDP_REMOTE_IP
772 DDP_PORT = _constants.DDP_PORT
773 DDP_LOCAL_MINOR = _constants.DDP_LOCAL_MINOR
774 DDP_REMOTE_MINOR = _constants.DDP_REMOTE_MINOR
776 OOB_POWER_ON = _constants.OOB_POWER_ON
777 OOB_POWER_OFF = _constants.OOB_POWER_OFF
778 OOB_POWER_CYCLE = _constants.OOB_POWER_CYCLE
779 OOB_POWER_STATUS = _constants.OOB_POWER_STATUS
780 OOB_HEALTH = _constants.OOB_HEALTH
781 OOB_COMMANDS = _constants.OOB_COMMANDS
783 OOB_POWER_STATUS_POWERED = _constants.OOB_POWER_STATUS_POWERED
785 OOB_TIMEOUT = _constants.OOB_TIMEOUT
786 OOB_POWER_DELAY = _constants.OOB_POWER_DELAY
788 OOB_STATUS_OK = _constants.OOB_STATUS_OK
789 OOB_STATUS_WARNING = _constants.OOB_STATUS_WARNING
790 OOB_STATUS_CRITICAL = _constants.OOB_STATUS_CRITICAL
791 OOB_STATUS_UNKNOWN = _constants.OOB_STATUS_UNKNOWN
792 OOB_STATUSES = _constants.OOB_STATUSES
794 PP_DEFAULT = _constants.PP_DEFAULT
796 NIC_MODE = _constants.NIC_MODE
797 NIC_LINK = _constants.NIC_LINK
798 NIC_VLAN = _constants.NIC_VLAN
799 NICS_PARAMETER_TYPES = _constants.NICS_PARAMETER_TYPES
800 NICS_PARAMETERS = _constants.NICS_PARAMETERS
802 NIC_MODE_BRIDGED = _constants.NIC_MODE_BRIDGED
803 NIC_MODE_ROUTED = _constants.NIC_MODE_ROUTED
804 NIC_MODE_OVS = _constants.NIC_MODE_OVS
805 NIC_IP_POOL = _constants.NIC_IP_POOL
806 NIC_VALID_MODES = _constants.NIC_VALID_MODES
808 RESERVE_ACTION = _constants.RESERVE_ACTION
809 RELEASE_ACTION = _constants.RELEASE_ACTION
811 IDISK_SIZE = _constants.IDISK_SIZE
812 IDISK_SPINDLES = _constants.IDISK_SPINDLES
813 IDISK_MODE = _constants.IDISK_MODE
814 IDISK_ADOPT = _constants.IDISK_ADOPT
815 IDISK_VG = _constants.IDISK_VG
816 IDISK_METAVG = _constants.IDISK_METAVG
817 IDISK_PROVIDER = _constants.IDISK_PROVIDER
818 IDISK_NAME = _constants.IDISK_NAME
819 IDISK_PARAMS_TYPES = _constants.IDISK_PARAMS_TYPES
820 IDISK_PARAMS = _constants.IDISK_PARAMS
822 INIC_MAC = _constants.INIC_MAC
823 INIC_IP = _constants.INIC_IP
824 INIC_MODE = _constants.INIC_MODE
825 INIC_LINK = _constants.INIC_LINK
826 INIC_NETWORK = _constants.INIC_NETWORK
827 INIC_NAME = _constants.INIC_NAME
828 INIC_VLAN = _constants.INIC_VLAN
829 INIC_BRIDGE = _constants.INIC_BRIDGE
830 INIC_PARAMS_TYPES = _constants.INIC_PARAMS_TYPES
831 INIC_PARAMS = _constants.INIC_PARAMS
833 HT_XEN_PVM = _constants.HT_XEN_PVM
834 HT_FAKE = _constants.HT_FAKE
835 HT_XEN_HVM = _constants.HT_XEN_HVM
836 HT_KVM = _constants.HT_KVM
837 HT_CHROOT = _constants.HT_CHROOT
838 HT_LXC = _constants.HT_LXC
839 HYPER_TYPES = _constants.HYPER_TYPES
840 HTS_REQ_PORT = _constants.HTS_REQ_PORT
842 VNC_BASE_PORT = _constants.VNC_BASE_PORT
843 VNC_DEFAULT_BIND_ADDRESS = _constants.VNC_DEFAULT_BIND_ADDRESS
845 HT_NIC_RTL8139 = _constants.HT_NIC_RTL8139
846 HT_NIC_NE2K_PCI = _constants.HT_NIC_NE2K_PCI
847 HT_NIC_NE2K_ISA = _constants.HT_NIC_NE2K_ISA
848 HT_NIC_I82551 = _constants.HT_NIC_I82551
849 HT_NIC_I85557B = _constants.HT_NIC_I85557B
850 HT_NIC_I8259ER = _constants.HT_NIC_I8259ER
851 HT_NIC_PCNET = _constants.HT_NIC_PCNET
852 HT_NIC_E1000 = _constants.HT_NIC_E1000
853 HT_NIC_PARAVIRTUAL = _constants.HT_NIC_PARAVIRTUAL
854 HT_HVM_VALID_NIC_TYPES = _constants.HT_HVM_VALID_NIC_TYPES
855 HT_KVM_VALID_NIC_TYPES = _constants.HT_KVM_VALID_NIC_TYPES
857 HT_HVM_VIF_IOEMU = _constants.HT_HVM_VIF_IOEMU
858 HT_HVM_VIF_VIF = _constants.HT_HVM_VIF_VIF
859 HT_HVM_VALID_VIF_TYPES = _constants.HT_HVM_VALID_VIF_TYPES
861 HT_DISK_IOEMU = _constants.HT_DISK_IOEMU
862 HT_DISK_IDE = _constants.HT_DISK_IDE
863 HT_DISK_SCSI = _constants.HT_DISK_SCSI
864 HT_DISK_SD = _constants.HT_DISK_SD
865 HT_DISK_MTD = _constants.HT_DISK_MTD
866 HT_DISK_PFLASH = _constants.HT_DISK_PFLASH
867 HT_DISK_PARAVIRTUAL = _constants.HT_DISK_PARAVIRTUAL
868 HT_HVM_VALID_DISK_TYPES = _constants.HT_HVM_VALID_DISK_TYPES
869 HT_KVM_VALID_DISK_TYPES = _constants.HT_KVM_VALID_DISK_TYPES
871 HT_CACHE_DEFAULT = _constants.HT_CACHE_DEFAULT
872 HT_CACHE_NONE = _constants.HT_CACHE_NONE
873 HT_CACHE_WTHROUGH = _constants.HT_CACHE_WTHROUGH
874 HT_CACHE_WBACK = _constants.HT_CACHE_WBACK
875 HT_VALID_CACHE_TYPES = _constants.HT_VALID_CACHE_TYPES
877 HT_MOUSE_MOUSE = _constants.HT_MOUSE_MOUSE
878 HT_MOUSE_TABLET = _constants.HT_MOUSE_TABLET
879 HT_KVM_VALID_MOUSE_TYPES = _constants.HT_KVM_VALID_MOUSE_TYPES
881 HT_BO_FLOPPY = _constants.HT_BO_FLOPPY
882 HT_BO_CDROM = _constants.HT_BO_CDROM
883 HT_BO_DISK = _constants.HT_BO_DISK
884 HT_BO_NETWORK = _constants.HT_BO_NETWORK
885 HT_KVM_VALID_BO_TYPES = _constants.HT_KVM_VALID_BO_TYPES
887 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ = \
888 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ
889 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ = \
890 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ
891 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC = \
892 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC
893 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ = \
894 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ
895 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ = \
896 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ
897 HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF = \
898 _constants.HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF
899 HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS = \
900 _constants.HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS
902 HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO = _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO
903 HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER = \
904 _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER
905 HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS = \
906 _constants.HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS
908 HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS = \
909 _constants.HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS
911 HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF = \
912 _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF
913 HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL = \
914 _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL
915 HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER = \
916 _constants.HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER
917 HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS = \
918 _constants.HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS
920 HT_SM_NONE = _constants.HT_SM_NONE
921 HT_SM_USER = _constants.HT_SM_USER
922 HT_SM_POOL = _constants.HT_SM_POOL
923 HT_KVM_VALID_SM_TYPES = _constants.HT_KVM_VALID_SM_TYPES
925 HT_KVM_ENABLED = _constants.HT_KVM_ENABLED
926 HT_KVM_DISABLED = _constants.HT_KVM_DISABLED
927 HT_KVM_FLAG_VALUES = _constants.HT_KVM_FLAG_VALUES
929 HT_MIGRATION_LIVE = _constants.HT_MIGRATION_LIVE
930 HT_MIGRATION_NONLIVE = _constants.HT_MIGRATION_NONLIVE
931 HT_MIGRATION_MODES = _constants.HT_MIGRATION_MODES
933 VERIFY_NPLUSONE_MEM = _constants.VERIFY_NPLUSONE_MEM
934 VERIFY_OPTIONAL_CHECKS = _constants.VERIFY_OPTIONAL_CHECKS
936 CV_TCLUSTER = _constants.CV_TCLUSTER
937 CV_TGROUP = _constants.CV_TGROUP
938 CV_TNODE = _constants.CV_TNODE
939 CV_TINSTANCE = _constants.CV_TINSTANCE
941 CV_ECLUSTERCFG = _constants.CV_ECLUSTERCFG
942 CV_ECLUSTERCERT = _constants.CV_ECLUSTERCERT
943 CV_ECLUSTERFILECHECK = _constants.CV_ECLUSTERFILECHECK
944 CV_ECLUSTERDANGLINGNODES = _constants.CV_ECLUSTERDANGLINGNODES
945 CV_ECLUSTERDANGLINGINST = _constants.CV_ECLUSTERDANGLINGINST
946 CV_EGROUPDIFFERENTPVSIZE = _constants.CV_EGROUPDIFFERENTPVSIZE
947 CV_EINSTANCEBADNODE = _constants.CV_EINSTANCEBADNODE
948 CV_EINSTANCEDOWN = _constants.CV_EINSTANCEDOWN
949 CV_EINSTANCELAYOUT = _constants.CV_EINSTANCELAYOUT
950 CV_EINSTANCEMISSINGDISK = _constants.CV_EINSTANCEMISSINGDISK
951 CV_EINSTANCEFAULTYDISK = _constants.CV_EINSTANCEFAULTYDISK
952 CV_EINSTANCEWRONGNODE = _constants.CV_EINSTANCEWRONGNODE
953 CV_EINSTANCESPLITGROUPS = _constants.CV_EINSTANCESPLITGROUPS
954 CV_EINSTANCEPOLICY = _constants.CV_EINSTANCEPOLICY
955 CV_EINSTANCEUNSUITABLENODE = _constants.CV_EINSTANCEUNSUITABLENODE
956 CV_EINSTANCEMISSINGCFGPARAMETER = _constants.CV_EINSTANCEMISSINGCFGPARAMETER
957 CV_ENODEDRBD = _constants.CV_ENODEDRBD
958 CV_ENODEDRBDVERSION = _constants.CV_ENODEDRBDVERSION
959 CV_ENODEDRBDHELPER = _constants.CV_ENODEDRBDHELPER
960 CV_ENODEFILECHECK = _constants.CV_ENODEFILECHECK
961 CV_ENODEHOOKS = _constants.CV_ENODEHOOKS
962 CV_ENODEHV = _constants.CV_ENODEHV
963 CV_ENODELVM = _constants.CV_ENODELVM
964 CV_ENODEN1 = _constants.CV_ENODEN1
965 CV_ENODENET = _constants.CV_ENODENET
966 CV_ENODEOS = _constants.CV_ENODEOS
967 CV_ENODEORPHANINSTANCE = _constants.CV_ENODEORPHANINSTANCE
968 CV_ENODEORPHANLV = _constants.CV_ENODEORPHANLV
969 CV_ENODERPC = _constants.CV_ENODERPC
970 CV_ENODESSH = _constants.CV_ENODESSH
971 CV_ENODEVERSION = _constants.CV_ENODEVERSION
972 CV_ENODESETUP = _constants.CV_ENODESETUP
973 CV_ENODETIME = _constants.CV_ENODETIME
974 CV_ENODEOOBPATH = _constants.CV_ENODEOOBPATH
975 CV_ENODEUSERSCRIPTS = _constants.CV_ENODEUSERSCRIPTS
976 CV_ENODEFILESTORAGEPATHS = _constants.CV_ENODEFILESTORAGEPATHS
977 CV_ENODEFILESTORAGEPATHUNUSABLE = _constants.CV_ENODEFILESTORAGEPATHUNUSABLE
978 CV_ENODESHAREDFILESTORAGEPATHUNUSABLE = \
979 _constants.CV_ENODESHAREDFILESTORAGEPATHUNUSABLE
981 CV_ALL_ECODES = _constants.CV_ALL_ECODES
982 CV_ALL_ECODES_STRINGS = _constants.CV_ALL_ECODES_STRINGS
984 NV_BRIDGES = _constants.NV_BRIDGES
985 NV_DRBDHELPER = _constants.NV_DRBDHELPER
986 NV_DRBDVERSION = _constants.NV_DRBDVERSION
987 NV_DRBDLIST = _constants.NV_DRBDLIST
988 NV_EXCLUSIVEPVS = _constants.NV_EXCLUSIVEPVS
989 NV_FILELIST = _constants.NV_FILELIST
990 NV_ACCEPTED_STORAGE_PATHS = _constants.NV_ACCEPTED_STORAGE_PATHS
991 NV_FILE_STORAGE_PATH = _constants.NV_FILE_STORAGE_PATH
992 NV_SHARED_FILE_STORAGE_PATH = _constants.NV_SHARED_FILE_STORAGE_PATH
993 NV_HVINFO = _constants.NV_HVINFO
994 NV_HVPARAMS = _constants.NV_HVPARAMS
995 NV_HYPERVISOR = _constants.NV_HYPERVISOR
996 NV_INSTANCELIST = _constants.NV_INSTANCELIST
997 NV_LVLIST = _constants.NV_LVLIST
998 NV_MASTERIP = _constants.NV_MASTERIP
999 NV_NODELIST = _constants.NV_NODELIST
1000 NV_NODENETTEST = _constants.NV_NODENETTEST
1001 NV_NODESETUP = _constants.NV_NODESETUP
1002 NV_OOB_PATHS = _constants.NV_OOB_PATHS
1003 NV_OSLIST = _constants.NV_OSLIST
1004 NV_PVLIST = _constants.NV_PVLIST
1005 NV_TIME = _constants.NV_TIME
1006 NV_USERSCRIPTS = _constants.NV_USERSCRIPTS
1007 NV_VERSION = _constants.NV_VERSION
1008 NV_VGLIST = _constants.NV_VGLIST
1009 NV_VMNODES = _constants.NV_VMNODES
1011 INSTST_RUNNING = _constants.INSTST_RUNNING
1012 INSTST_ADMINDOWN = _constants.INSTST_ADMINDOWN
1013 INSTST_ADMINOFFLINE = _constants.INSTST_ADMINOFFLINE
1014 INSTST_NODEOFFLINE = _constants.INSTST_NODEOFFLINE
1015 INSTST_NODEDOWN = _constants.INSTST_NODEDOWN
1016 INSTST_WRONGNODE = _constants.INSTST_WRONGNODE
1017 INSTST_ERRORUP = _constants.INSTST_ERRORUP
1018 INSTST_ERRORDOWN = _constants.INSTST_ERRORDOWN
1019 INSTST_ALL = _constants.INSTST_ALL
1021 ADMINST_UP = _constants.ADMINST_UP
1022 ADMINST_DOWN = _constants.ADMINST_DOWN
1023 ADMINST_OFFLINE = _constants.ADMINST_OFFLINE
1024 ADMINST_ALL = _constants.ADMINST_ALL
1026 NR_REGULAR = _constants.NR_REGULAR
1027 NR_MASTER = _constants.NR_MASTER
1028 NR_MCANDIDATE = _constants.NR_MCANDIDATE
1029 NR_DRAINED = _constants.NR_DRAINED
1030 NR_OFFLINE = _constants.NR_OFFLINE
1031 NR_ALL = _constants.NR_ALL
1033 SSL_CERT_EXPIRATION_WARN = _constants.SSL_CERT_EXPIRATION_WARN
1034 SSL_CERT_EXPIRATION_ERROR = _constants.SSL_CERT_EXPIRATION_ERROR
1036 IALLOCATOR_VERSION = _constants.IALLOCATOR_VERSION
1037 IALLOCATOR_DIR_IN = _constants.IALLOCATOR_DIR_IN
1038 IALLOCATOR_DIR_OUT = _constants.IALLOCATOR_DIR_OUT
1039 VALID_IALLOCATOR_DIRECTIONS = _constants.VALID_IALLOCATOR_DIRECTIONS
1041 IALLOCATOR_MODE_ALLOC = _constants.IALLOCATOR_MODE_ALLOC
1042 IALLOCATOR_MODE_RELOC = _constants.IALLOCATOR_MODE_RELOC
1043 IALLOCATOR_MODE_CHG_GROUP = _constants.IALLOCATOR_MODE_CHG_GROUP
1044 IALLOCATOR_MODE_NODE_EVAC = _constants.IALLOCATOR_MODE_NODE_EVAC
1045 IALLOCATOR_MODE_MULTI_ALLOC = _constants.IALLOCATOR_MODE_MULTI_ALLOC
1046 VALID_IALLOCATOR_MODES = _constants.VALID_IALLOCATOR_MODES
1048 IALLOCATOR_SEARCH_PATH = _constants.IALLOCATOR_SEARCH_PATH
1049 DEFAULT_IALLOCATOR_SHORTCUT = _constants.DEFAULT_IALLOCATOR_SHORTCUT
1051 NODE_EVAC_PRI = _constants.NODE_EVAC_PRI
1052 NODE_EVAC_SEC = _constants.NODE_EVAC_SEC
1053 NODE_EVAC_ALL = _constants.NODE_EVAC_ALL
1054 NODE_EVAC_MODES = _constants.NODE_EVAC_MODES
1056 JOB_QUEUE_VERSION = _constants.JOB_QUEUE_VERSION
1057 JOB_QUEUE_SIZE_HARD_LIMIT = _constants.JOB_QUEUE_SIZE_HARD_LIMIT
1058 JOB_QUEUE_FILES_PERMS = _constants.JOB_QUEUE_FILES_PERMS
1060 JOB_ID_TEMPLATE = r"\d+"
1061 JOB_FILE_RE = re.compile(r"^job-(%s)$" % JOB_ID_TEMPLATE)
1063 JOB_NOTCHANGED = _constants.JOB_NOTCHANGED
1065 JOB_STATUS_QUEUED = _constants.JOB_STATUS_QUEUED
1066 JOB_STATUS_WAITING = _constants.JOB_STATUS_WAITING
1067 JOB_STATUS_CANCELING = _constants.JOB_STATUS_CANCELING
1068 JOB_STATUS_RUNNING = _constants.JOB_STATUS_RUNNING
1069 JOB_STATUS_CANCELED = _constants.JOB_STATUS_CANCELED
1070 JOB_STATUS_SUCCESS = _constants.JOB_STATUS_SUCCESS
1071 JOB_STATUS_ERROR = _constants.JOB_STATUS_ERROR
1072 JOBS_PENDING = _constants.JOBS_PENDING
1073 JOBS_FINALIZED = _constants.JOBS_FINALIZED
1074 JOB_STATUS_ALL = _constants.JOB_STATUS_ALL
1076 OP_STATUS_QUEUED = _constants.OP_STATUS_QUEUED
1077 OP_STATUS_WAITING = _constants.OP_STATUS_WAITING
1078 OP_STATUS_CANCELING = _constants.OP_STATUS_CANCELING
1079 OP_STATUS_RUNNING = _constants.OP_STATUS_RUNNING
1080 OP_STATUS_CANCELED = _constants.OP_STATUS_CANCELED
1081 OP_STATUS_SUCCESS = _constants.OP_STATUS_SUCCESS
1082 OP_STATUS_ERROR = _constants.OP_STATUS_ERROR
1083 OPS_FINALIZED = _constants.OPS_FINALIZED
1085 OP_PRIO_LOWEST = _constants.OP_PRIO_LOWEST
1086 OP_PRIO_HIGHEST = _constants.OP_PRIO_HIGHEST
1087 OP_PRIO_LOW = _constants.OP_PRIO_LOW
1088 OP_PRIO_NORMAL = _constants.OP_PRIO_NORMAL
1089 OP_PRIO_HIGH = _constants.OP_PRIO_HIGH
1090 OP_PRIO_SUBMIT_VALID = _constants.OP_PRIO_SUBMIT_VALID
1091 OP_PRIO_DEFAULT = _constants.OP_PRIO_DEFAULT
1093 LOCKS_REPLACE = _constants.LOCKS_REPLACE
1094 LOCKS_APPEND = _constants.LOCKS_APPEND
1096 LOCK_ATTEMPTS_TIMEOUT = _constants.LOCK_ATTEMPTS_TIMEOUT
1097 LOCK_ATTEMPTS_MAXWAIT = _constants.LOCK_ATTEMPTS_MAXWAIT
1098 LOCK_ATTEMPTS_MINWAIT = _constants.LOCK_ATTEMPTS_MINWAIT
1100 ELOG_MESSAGE = _constants.ELOG_MESSAGE
1101 ELOG_REMOTE_IMPORT = _constants.ELOG_REMOTE_IMPORT
1102 ELOG_JQUEUE_TEST = _constants.ELOG_JQUEUE_TEST
1104 ETC_HOSTS_ADD = _constants.ETC_HOSTS_ADD
1105 ETC_HOSTS_REMOVE = _constants.ETC_HOSTS_REMOVE
1107 JQT_MSGPREFIX = _constants.JQT_MSGPREFIX
1108 JQT_EXPANDNAMES = _constants.JQT_EXPANDNAMES
1109 JQT_EXEC = _constants.JQT_EXEC
1110 JQT_LOGMSG = _constants.JQT_LOGMSG
1111 JQT_STARTMSG = _constants.JQT_STARTMSG
1112 JQT_ALL = _constants.JQT_ALL
1114 QR_CLUSTER = _constants.QR_CLUSTER
1115 QR_INSTANCE = _constants.QR_INSTANCE
1116 QR_NODE = _constants.QR_NODE
1117 QR_LOCK = _constants.QR_LOCK
1118 QR_GROUP = _constants.QR_GROUP
1119 QR_OS = _constants.QR_OS
1120 QR_JOB = _constants.QR_JOB
1121 QR_EXPORT = _constants.QR_EXPORT
1122 QR_NETWORK = _constants.QR_NETWORK
1123 QR_EXTSTORAGE = _constants.QR_EXTSTORAGE
1124 QR_VIA_OP = _constants.QR_VIA_OP
1125 QR_VIA_LUXI = _constants.QR_VIA_LUXI
1126 QR_VIA_RAPI = _constants.QR_VIA_RAPI
1128 QFT_UNKNOWN = _constants.QFT_UNKNOWN
1129 QFT_TEXT = _constants.QFT_TEXT
1130 QFT_BOOL = _constants.QFT_BOOL
1131 QFT_NUMBER = _constants.QFT_NUMBER
1132 QFT_UNIT = _constants.QFT_UNIT
1133 QFT_TIMESTAMP = _constants.QFT_TIMESTAMP
1134 QFT_OTHER = _constants.QFT_OTHER
1135 QFT_ALL = _constants.QFT_ALL
1137 RS_NORMAL = _constants.RS_NORMAL
1138 RS_UNKNOWN = _constants.RS_UNKNOWN
1139 RS_NODATA = _constants.RS_NODATA
1140 RS_UNAVAIL = _constants.RS_UNAVAIL
1141 RS_OFFLINE = _constants.RS_OFFLINE
1142 RS_ALL = _constants.RS_ALL
1143 RSS_DESCRIPTION = _constants.RSS_DESCRIPTION
1145 MAX_NICS = _constants.MAX_NICS
1146 MAX_DISKS = _constants.MAX_DISKS
1148 SSCONF_FILEPREFIX = _constants.SSCONF_FILEPREFIX
1150 SS_CLUSTER_NAME = _constants.SS_CLUSTER_NAME
1151 SS_CLUSTER_TAGS = _constants.SS_CLUSTER_TAGS
1152 SS_FILE_STORAGE_DIR = _constants.SS_FILE_STORAGE_DIR
1153 SS_SHARED_FILE_STORAGE_DIR = _constants.SS_SHARED_FILE_STORAGE_DIR
1154 SS_MASTER_CANDIDATES = _constants.SS_MASTER_CANDIDATES
1155 SS_MASTER_CANDIDATES_IPS = _constants.SS_MASTER_CANDIDATES_IPS
1156 SS_MASTER_IP = _constants.SS_MASTER_IP
1157 SS_MASTER_NETDEV = _constants.SS_MASTER_NETDEV
1158 SS_MASTER_NETMASK = _constants.SS_MASTER_NETMASK
1159 SS_MASTER_NODE = _constants.SS_MASTER_NODE
1160 SS_NODE_LIST = _constants.SS_NODE_LIST
1161 SS_NODE_PRIMARY_IPS = _constants.SS_NODE_PRIMARY_IPS
1162 SS_NODE_SECONDARY_IPS = _constants.SS_NODE_SECONDARY_IPS
1163 SS_OFFLINE_NODES = _constants.SS_OFFLINE_NODES
1164 SS_ONLINE_NODES = _constants.SS_ONLINE_NODES
1165 SS_PRIMARY_IP_FAMILY = _constants.SS_PRIMARY_IP_FAMILY
1166 SS_INSTANCE_LIST = _constants.SS_INSTANCE_LIST
1167 SS_RELEASE_VERSION = _constants.SS_RELEASE_VERSION
1168 SS_HYPERVISOR_LIST = _constants.SS_HYPERVISOR_LIST
1169 SS_MAINTAIN_NODE_HEALTH = _constants.SS_MAINTAIN_NODE_HEALTH
1170 SS_UID_POOL = _constants.SS_UID_POOL
1171 SS_NODEGROUPS = _constants.SS_NODEGROUPS
1172 SS_NETWORKS = _constants.SS_NETWORKS
1174 SS_HVPARAMS_PREF = _constants.SS_HVPARAMS_PREF
1176 SS_HVPARAMS_XEN_PVM = _constants.SS_HVPARAMS_XEN_PVM
1177 SS_HVPARAMS_XEN_FAKE = _constants.SS_HVPARAMS_XEN_FAKE
1178 SS_HVPARAMS_XEN_HVM = _constants.SS_HVPARAMS_XEN_HVM
1179 SS_HVPARAMS_XEN_KVM = _constants.SS_HVPARAMS_XEN_KVM
1180 SS_HVPARAMS_XEN_CHROOT = _constants.SS_HVPARAMS_XEN_CHROOT
1181 SS_HVPARAMS_XEN_LXC = _constants.SS_HVPARAMS_XEN_LXC
1182 VALID_SS_HVPARAMS_KEYS = _constants.VALID_SS_HVPARAMS_KEYS
1184 SS_FILE_PERMS = _constants.SS_FILE_PERMS
1186 DEFAULT_ENABLED_HYPERVISOR = _constants.DEFAULT_ENABLED_HYPERVISOR
1190 HV_USE_BOOTLOADER: False,
1191 HV_BOOTLOADER_PATH: XEN_BOOTLOADER,
1192 HV_BOOTLOADER_ARGS: "",
1193 HV_KERNEL_PATH: XEN_KERNEL,
1195 HV_ROOT_PATH: "/dev/xvda1",
1196 HV_KERNEL_ARGS: "ro",
1197 HV_MIGRATION_PORT: 8002,
1198 HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
1199 HV_BLOCKDEV_PREFIX: "sd",
1200 HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
1201 HV_CPU_MASK: CPU_PINNING_ALL,
1205 HV_XEN_CMD: XEN_CMD_XM,
1210 HV_BOOT_ORDER: "cd",
1211 HV_CDROM_IMAGE_PATH: "",
1212 HV_NIC_TYPE: HT_NIC_RTL8139,
1213 HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
1214 HV_VNC_BIND_ADDRESS: IP4_ADDRESS_ANY,
1215 HV_VNC_PASSWORD_FILE: pathutils.VNC_PASSWORD_FILE,
1218 HV_KERNEL_PATH: "/usr/lib/xen/boot/hvmloader",
1219 HV_DEVICE_MODEL: "/usr/lib/xen/bin/qemu-dm",
1220 HV_MIGRATION_PORT: 8002,
1221 HV_MIGRATION_MODE: HT_MIGRATION_NONLIVE,
1222 HV_USE_LOCALTIME: False,
1223 HV_BLOCKDEV_PREFIX: "hd",
1225 HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
1226 HV_CPU_MASK: CPU_PINNING_ALL,
1229 HV_VIF_TYPE: HT_HVM_VIF_IOEMU,
1232 HV_XEN_CMD: XEN_CMD_XM,
1237 HV_KVM_PATH: KVM_PATH,
1238 HV_KERNEL_PATH: KVM_KERNEL,
1240 HV_KERNEL_ARGS: "ro",
1241 HV_ROOT_PATH: "/dev/vda1",
1243 HV_SERIAL_CONSOLE: True,
1244 HV_SERIAL_SPEED: 38400,
1245 HV_VNC_BIND_ADDRESS: "",
1248 HV_VNC_X509_VERIFY: False,
1249 HV_VNC_PASSWORD_FILE: "",
1250 HV_KVM_SPICE_BIND: "",
1251 HV_KVM_SPICE_IP_VERSION: IFACE_NO_IP_VERSION_SPECIFIED,
1252 HV_KVM_SPICE_PASSWORD_FILE: "",
1253 HV_KVM_SPICE_LOSSLESS_IMG_COMPR: "",
1254 HV_KVM_SPICE_JPEG_IMG_COMPR: "",
1255 HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR: "",
1256 HV_KVM_SPICE_STREAMING_VIDEO_DETECTION: "",
1257 HV_KVM_SPICE_AUDIO_COMPR: True,
1258 HV_KVM_SPICE_USE_TLS: False,
1259 HV_KVM_SPICE_TLS_CIPHERS: OPENSSL_CIPHERS,
1260 HV_KVM_SPICE_USE_VDAGENT: True,
1261 HV_KVM_FLOPPY_IMAGE_PATH: "",
1262 HV_CDROM_IMAGE_PATH: "",
1263 HV_KVM_CDROM2_IMAGE_PATH: "",
1264 HV_BOOT_ORDER: HT_BO_DISK,
1265 HV_NIC_TYPE: HT_NIC_PARAVIRTUAL,
1266 HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
1267 HV_KVM_CDROM_DISK_TYPE: "",
1270 HV_MIGRATION_PORT: 8102,
1271 HV_MIGRATION_BANDWIDTH: 32, # MiB/s
1272 HV_MIGRATION_DOWNTIME: 30, # ms
1273 HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
1274 HV_USE_LOCALTIME: False,
1275 HV_DISK_CACHE: HT_CACHE_DEFAULT,
1276 HV_SECURITY_MODEL: HT_SM_NONE,
1277 HV_SECURITY_DOMAIN: "",
1279 HV_VHOST_NET: False,
1280 HV_KVM_USE_CHROOT: False,
1282 HV_REBOOT_BEHAVIOR: INSTANCE_REBOOT_ALLOWED,
1283 HV_CPU_MASK: CPU_PINNING_ALL,
1292 HV_KVM_MACHINE_VERSION: "",
1296 HV_MIGRATION_MODE: HT_MIGRATION_LIVE,
1299 HV_INIT_SCRIPT: "/ganeti-chroot",
1306 HVC_GLOBALS = _constants.HVC_GLOBALS
1312 BE_AUTO_BALANCE: True,
1313 BE_ALWAYS_FAILOVER: False,
1319 ND_SPINDLE_COUNT: 1,
1320 ND_EXCLUSIVE_STORAGE: False,
1322 ND_OVS_NAME: DEFAULT_OVS,
1326 NDC_GLOBALS = _constants.NDC_GLOBALS
1328 DISK_LD_DEFAULTS = {
1330 LDP_RESYNC_RATE: CLASSIC_DRBD_SYNC_SPEED,
1331 LDP_BARRIERS: _constants.DRBD_BARRIERS,
1332 LDP_NO_META_FLUSH: _constants.DRBD_NO_META_FLUSH,
1333 LDP_DEFAULT_METAVG: DEFAULT_VG,
1334 LDP_DISK_CUSTOM: "",
1336 LDP_PROTOCOL: DRBD_DEFAULT_NET_PROTOCOL,
1337 LDP_DYNAMIC_RESYNC: False,
1339 # The default values for the DRBD dynamic resync speed algorithm
1340 # are taken from the drbsetup 8.3.11 man page, except for
1341 # c-plan-ahead (that we don't need to set to 0, because we have a
1342 # separate option to enable it) and for c-max-rate, that we cap to
1343 # the default value for the static resync rate.
1344 LDP_PLAN_AHEAD: 20, # ds
1345 LDP_FILL_TARGET: 0, # sectors
1346 LDP_DELAY_TARGET: 1, # ds
1347 LDP_MAX_RATE: CLASSIC_DRBD_SYNC_SPEED, # KiB/s
1348 LDP_MIN_RATE: 4 * 1024, # KiB/s
1351 LDP_STRIPES: _constants.LVM_STRIPECOUNT
1358 LDP_ACCESS: DISK_KERNELSPACE,
1363 # readability shortcuts
1364 _LV_DEFAULTS = DISK_LD_DEFAULTS[DT_PLAIN]
1365 _DRBD_DEFAULTS = DISK_LD_DEFAULTS[DT_DRBD8]
1367 DISK_DT_DEFAULTS = {
1369 LV_STRIPES: DISK_LD_DEFAULTS[DT_PLAIN][LDP_STRIPES],
1372 DRBD_RESYNC_RATE: _DRBD_DEFAULTS[LDP_RESYNC_RATE],
1373 DRBD_DATA_STRIPES: _LV_DEFAULTS[LDP_STRIPES],
1374 DRBD_META_STRIPES: _LV_DEFAULTS[LDP_STRIPES],
1375 DRBD_DISK_BARRIERS: _DRBD_DEFAULTS[LDP_BARRIERS],
1376 DRBD_META_BARRIERS: _DRBD_DEFAULTS[LDP_NO_META_FLUSH],
1377 DRBD_DEFAULT_METAVG: _DRBD_DEFAULTS[LDP_DEFAULT_METAVG],
1378 DRBD_DISK_CUSTOM: _DRBD_DEFAULTS[LDP_DISK_CUSTOM],
1379 DRBD_NET_CUSTOM: _DRBD_DEFAULTS[LDP_NET_CUSTOM],
1380 DRBD_PROTOCOL: _DRBD_DEFAULTS[LDP_PROTOCOL],
1381 DRBD_DYNAMIC_RESYNC: _DRBD_DEFAULTS[LDP_DYNAMIC_RESYNC],
1382 DRBD_PLAN_AHEAD: _DRBD_DEFAULTS[LDP_PLAN_AHEAD],
1383 DRBD_FILL_TARGET: _DRBD_DEFAULTS[LDP_FILL_TARGET],
1384 DRBD_DELAY_TARGET: _DRBD_DEFAULTS[LDP_DELAY_TARGET],
1385 DRBD_MAX_RATE: _DRBD_DEFAULTS[LDP_MAX_RATE],
1386 DRBD_MIN_RATE: _DRBD_DEFAULTS[LDP_MIN_RATE],
1393 RBD_POOL: DISK_LD_DEFAULTS[DT_RBD][LDP_POOL],
1394 RBD_ACCESS: DISK_LD_DEFAULTS[DT_RBD][LDP_ACCESS],
1399 # we don't want to export the shortcuts
1400 del _LV_DEFAULTS, _DRBD_DEFAULTS
1403 NIC_MODE: NIC_MODE_BRIDGED,
1404 NIC_LINK: DEFAULT_BRIDGE,
1405 NIC_VLAN: VALUE_HS_NOTHING,
1408 ISPECS_MINMAX_DEFAULTS = _constants.ISPECS_MINMAX_DEFAULTS
1410 IPOLICY_DEFAULTS = {
1411 ISPECS_MINMAX: [ISPECS_MINMAX_DEFAULTS],
1413 ISPEC_MEM_SIZE: 128,
1415 ISPEC_DISK_COUNT: 1,
1416 ISPEC_DISK_SIZE: 1024,
1418 ISPEC_SPINDLE_USE: 1,
1420 IPOLICY_DTS: list(DISK_TEMPLATES),
1421 IPOLICY_VCPU_RATIO: 4.0,
1422 IPOLICY_SPINDLE_RATIO: 32.0,
1425 MASTER_POOL_SIZE_DEFAULT = _constants.MASTER_POOL_SIZE_DEFAULT
1427 PART_MARGIN = _constants.PART_MARGIN
1428 PART_RESERVED = _constants.PART_RESERVED
1430 CONFD_PROTOCOL_VERSION = _constants.CONFD_PROTOCOL_VERSION
1432 CONFD_REQ_PING = _constants.CONFD_REQ_PING
1433 CONFD_REQ_NODE_ROLE_BYNAME = _constants.CONFD_REQ_NODE_ROLE_BYNAME
1434 CONFD_REQ_NODE_PIP_BY_INSTANCE_IP = _constants.CONFD_REQ_NODE_PIP_BY_INSTANCE_IP
1435 CONFD_REQ_CLUSTER_MASTER = _constants.CONFD_REQ_CLUSTER_MASTER
1436 CONFD_REQ_NODE_PIP_LIST = _constants.CONFD_REQ_NODE_PIP_LIST
1437 CONFD_REQ_MC_PIP_LIST = _constants.CONFD_REQ_MC_PIP_LIST
1438 CONFD_REQ_INSTANCES_IPS_LIST = _constants.CONFD_REQ_INSTANCES_IPS_LIST
1439 CONFD_REQ_NODE_DRBD = _constants.CONFD_REQ_NODE_DRBD
1440 CONFD_REQ_NODE_INSTANCES = _constants.CONFD_REQ_NODE_INSTANCES
1441 CONFD_REQS = _constants.CONFD_REQS
1443 CONFD_REQQ_LINK = _constants.CONFD_REQQ_LINK
1444 CONFD_REQQ_IP = _constants.CONFD_REQQ_IP
1445 CONFD_REQQ_IPLIST = _constants.CONFD_REQQ_IPLIST
1446 CONFD_REQQ_FIELDS = _constants.CONFD_REQQ_FIELDS
1448 # FIXME: perhaps update code that uses these constants to deal with
1449 # integers instead of strings
1450 CONFD_REQFIELD_NAME = str(_constants.CONFD_REQFIELD_NAME)
1451 CONFD_REQFIELD_IP = str(_constants.CONFD_REQFIELD_IP)
1452 CONFD_REQFIELD_MNODE_PIP = str(_constants.CONFD_REQFIELD_MNODE_PIP)
1454 CONFD_REPL_STATUS_OK = _constants.CONFD_REPL_STATUS_OK
1455 CONFD_REPL_STATUS_ERROR = _constants.CONFD_REPL_STATUS_ERROR
1456 CONFD_REPL_STATUS_NOTIMPLEMENTED = _constants.CONFD_REPL_STATUS_NOTIMPLEMENTED
1457 CONFD_REPL_STATUSES = _constants.CONFD_REPL_STATUSES
1459 CONFD_NODE_ROLE_MASTER = _constants.CONFD_NODE_ROLE_MASTER
1460 CONFD_NODE_ROLE_CANDIDATE = _constants.CONFD_NODE_ROLE_CANDIDATE
1461 CONFD_NODE_ROLE_OFFLINE = _constants.CONFD_NODE_ROLE_OFFLINE
1462 CONFD_NODE_ROLE_DRAINED = _constants.CONFD_NODE_ROLE_DRAINED
1463 CONFD_NODE_ROLE_REGULAR = _constants.CONFD_NODE_ROLE_REGULAR
1465 CONFD_ERROR_UNKNOWN_ENTRY = _constants.CONFD_ERROR_UNKNOWN_ENTRY
1466 CONFD_ERROR_INTERNAL = _constants.CONFD_ERROR_INTERNAL
1467 CONFD_ERROR_ARGUMENT = _constants.CONFD_ERROR_ARGUMENT
1469 CONFD_MAX_CLOCK_SKEW = _constants.CONFD_MAX_CLOCK_SKEW
1471 CONFD_CONFIG_RELOAD_TIMEOUT = _constants.CONFD_CONFIG_RELOAD_TIMEOUT
1472 CONFD_CONFIG_RELOAD_RATELIMIT = _constants.CONFD_CONFIG_RELOAD_RATELIMIT
1474 CONFD_MAGIC_FOURCC = _constants.CONFD_MAGIC_FOURCC
1476 CONFD_DEFAULT_REQ_COVERAGE = _constants.CONFD_DEFAULT_REQ_COVERAGE
1478 CONFD_CLIENT_EXPIRE_TIMEOUT = _constants.CONFD_CLIENT_EXPIRE_TIMEOUT
1480 MAX_UDP_DATA_SIZE = _constants.MAX_UDP_DATA_SIZE
1482 UIDPOOL_UID_MIN = _constants.UIDPOOL_UID_MIN
1483 UIDPOOL_UID_MAX = _constants.UIDPOOL_UID_MAX
1485 # Name or path of the pgrep command
1488 # Name of the node group that gets created at cluster init or upgrade
1489 INITIAL_NODE_GROUP_NAME = "default"
1491 ALLOC_POLICY_PREFERRED = _constants.ALLOC_POLICY_PREFERRED
1492 ALLOC_POLICY_LAST_RESORT = _constants.ALLOC_POLICY_LAST_RESORT
1493 ALLOC_POLICY_UNALLOCABLE = _constants.ALLOC_POLICY_UNALLOCABLE
1494 VALID_ALLOC_POLICIES = _constants.VALID_ALLOC_POLICIES
1496 BLOCKDEV_DRIVER_MANUAL = _constants.BLOCKDEV_DRIVER_MANUAL
1498 QEMUIMG_PATH = _constants.QEMUIMG_PATH
1500 HTOOLS = _constants.HTOOLS
1501 # The hail iallocator
1502 IALLOC_HAIL = "hail"
1504 # Fake opcodes for functions that have hooks attached to them via
1505 # backend.RunLocalHooks
1506 FAKE_OP_MASTER_TURNUP = "OP_CLUSTER_IP_TURNUP"
1507 FAKE_OP_MASTER_TURNDOWN = "OP_CLUSTER_IP_TURNDOWN"
1512 SSHK_ALL = compat.UniqueFrozenset([SSHK_RSA, SSHK_DSA])
1514 # SSH authorized key types
1515 SSHAK_RSA = "ssh-rsa"
1516 SSHAK_DSS = "ssh-dss"
1517 SSHAK_ALL = compat.UniqueFrozenset([SSHAK_RSA, SSHAK_DSS])
1520 SSHS_CLUSTER_NAME = "cluster_name"
1521 SSHS_SSH_HOST_KEY = "ssh_host_key"
1522 SSHS_SSH_ROOT_KEY = "ssh_root_key"
1523 SSHS_NODE_DAEMON_CERTIFICATE = "node_daemon_certificate"
1525 #: Key files for SSH daemon
1526 SSH_DAEMON_KEYFILES = {
1527 SSHK_RSA: (pathutils.SSH_HOST_RSA_PRIV, pathutils.SSH_HOST_RSA_PUB),
1528 SSHK_DSA: (pathutils.SSH_HOST_DSA_PRIV, pathutils.SSH_HOST_DSA_PUB),
1532 NDS_CLUSTER_NAME = "cluster_name"
1533 NDS_NODE_DAEMON_CERTIFICATE = "node_daemon_certificate"
1534 NDS_SSCONF = "ssconf"
1535 NDS_START_NODE_DAEMON = "start_node_daemon"
1537 RANDOM_UUID_FILE = _constants.RANDOM_UUID_FILE
1539 # Regex string for verifying a UUID
1540 UUID_REGEX = "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$"
1542 AUTO_REPAIR_TAG_PREFIX = _constants.AUTO_REPAIR_TAG_PREFIX
1543 AUTO_REPAIR_TAG_ENABLED = _constants.AUTO_REPAIR_TAG_ENABLED
1544 AUTO_REPAIR_TAG_SUSPENDED = _constants.AUTO_REPAIR_TAG_SUSPENDED
1545 AUTO_REPAIR_TAG_PENDING = _constants.AUTO_REPAIR_TAG_PENDING
1546 AUTO_REPAIR_TAG_RESULT = _constants.AUTO_REPAIR_TAG_RESULT
1548 AUTO_REPAIR_FIX_STORAGE = _constants.AUTO_REPAIR_FIX_STORAGE
1549 AUTO_REPAIR_MIGRATE = _constants.AUTO_REPAIR_MIGRATE
1550 AUTO_REPAIR_FAILOVER = _constants.AUTO_REPAIR_FAILOVER
1551 AUTO_REPAIR_REINSTALL = _constants.AUTO_REPAIR_REINSTALL
1552 AUTO_REPAIR_ALL_TYPES = _constants.AUTO_REPAIR_ALL_TYPES
1554 AUTO_REPAIR_SUCCESS = _constants.AUTO_REPAIR_SUCCESS
1555 AUTO_REPAIR_FAILURE = _constants.AUTO_REPAIR_FAILURE
1556 AUTO_REPAIR_ENOPERM = _constants.AUTO_REPAIR_ENOPERM
1557 AUTO_REPAIR_ALL_RESULTS = _constants.AUTO_REPAIR_ALL_RESULTS
1559 BUILTIN_DATA_COLLECTOR_VERSION = _constants.BUILTIN_DATA_COLLECTOR_VERSION
1561 OPCODE_REASON = _constants.OPCODE_REASON
1563 # The source reasons for the execution of an OpCode
1564 OPCODE_REASON_SRC_CLIENT = "gnt:client"
1565 OPCODE_REASON_SRC_NODED = "gnt:daemon:noded"
1566 OPCODE_REASON_SRC_OPCODE = "gnt:opcode"
1567 OPCODE_REASON_SRC_RLIB2 = "gnt:library:rlib2"
1568 OPCODE_REASON_SRC_USER = "gnt:user"
1570 OPCODE_REASON_SOURCES = compat.UniqueFrozenset([
1571 OPCODE_REASON_SRC_CLIENT,
1572 OPCODE_REASON_SRC_NODED,
1573 OPCODE_REASON_SRC_OPCODE,
1574 OPCODE_REASON_SRC_RLIB2,
1575 OPCODE_REASON_SRC_USER,
1578 DISKSTATS_FILE = _constants.DISKSTATS_FILE
1580 STAT_FILE = _constants.STAT_FILE
1581 CPUAVGLOAD_BUFFER_SIZE = _constants.CPUAVGLOAD_BUFFER_SIZE
1582 CPUAVGLOAD_WINDOW_SIZE = _constants.CPUAVGLOAD_WINDOW_SIZE
1584 MOND_TIME_INTERVAL = _constants.MOND_TIME_INTERVAL
1586 # MonD's latest API version
1587 MOND_LATEST_API_VERSION = 1
1589 # Timeouts for upgrades
1591 UPGRADE_QUEUE_DRAIN_TIMEOUT = _constants.UPGRADE_QUEUE_DRAIN_TIMEOUT
1592 UPGRADE_QUEUE_POLL_INTERVAL = _constants.UPGRADE_QUEUE_POLL_INTERVAL
1594 # Do not re-export imported modules
1595 del re, _vcsversion, _constants, socket, pathutils, compat
1598 ALLOCATABLE_KEY = "allocatable"
1599 FAILED_KEY = "failed"