XEN_BOOTLOADER = _autoconf.XEN_BOOTLOADER
XEN_KERNEL = _autoconf.XEN_KERNEL
XEN_INITRD = _autoconf.XEN_INITRD
+XEN_CMD = "xm"
KVM_PATH = _autoconf.KVM_PATH
SOCAT_PATH = _autoconf.SOCAT_PATH
#: Console as VNC server
CONS_VNC = "vnc"
+#: Console as SPICE server
+CONS_SPICE = "spice"
+
#: Display a message for console access
CONS_MESSAGE = "msg"
#: All console types
-CONS_ALL = frozenset([CONS_SSH, CONS_VNC, CONS_MESSAGE])
+CONS_ALL = frozenset([CONS_SSH, CONS_VNC, CONS_SPICE, CONS_MESSAGE])
# For RSA keys more bits are better, but they also make operations more
# expensive. NIST SP 800-131 recommends a minimum of 2048 bits from the year
HOOKS_NAME_CFGUPDATE = "config-update"
HOOKS_NAME_WATCHER = "watcher"
HOOKS_VERSION = 2
+HOOKS_PATH = "/sbin:/bin:/usr/sbin:/usr/bin"
# hooks subject type (what object type does the LU deal with)
HTYPE_CLUSTER = "CLUSTER"
HV_KVM_SPICE_BIND = "spice_bind"
HV_KVM_SPICE_IP_VERSION = "spice_ip_version"
HV_KVM_SPICE_PASSWORD_FILE = "spice_password_file"
+HV_KVM_SPICE_LOSSLESS_IMG_COMPR = "spice_image_compression"
+HV_KVM_SPICE_JPEG_IMG_COMPR = "spice_jpeg_wan_compression"
+HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR = "spice_zlib_glz_wan_compression"
+HV_KVM_SPICE_STREAMING_VIDEO_DETECTION = "spice_streaming_video"
+HV_KVM_SPICE_AUDIO_COMPR = "spice_playback_compression"
HV_ACPI = "acpi"
HV_PAE = "pae"
HV_USE_BOOTLOADER = "use_bootloader"
HV_KVM_SPICE_BIND: VTYPE_STRING,
HV_KVM_SPICE_IP_VERSION: VTYPE_INT,
HV_KVM_SPICE_PASSWORD_FILE: VTYPE_STRING,
+ HV_KVM_SPICE_LOSSLESS_IMG_COMPR: VTYPE_STRING,
+ HV_KVM_SPICE_JPEG_IMG_COMPR: VTYPE_STRING,
+ HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR: VTYPE_STRING,
+ HV_KVM_SPICE_STREAMING_VIDEO_DETECTION: VTYPE_STRING,
+ HV_KVM_SPICE_AUDIO_COMPR: VTYPE_BOOL,
HV_ACPI: VTYPE_BOOL,
HV_PAE: VTYPE_BOOL,
HV_USE_BOOTLOADER: VTYPE_BOOL,
HVS_PARAMETERS = frozenset(HVS_PARAMETER_TYPES.keys())
+# Node info keys
+HV_NODEINFO_KEY_VERSION = "hv_version"
+
# Backend parameter names
BE_MEMORY = "memory"
BE_VCPUS = "vcpus"
HT_BO_NETWORK
])
+# SPICE lossless image compression options
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ = "auto_glz"
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ = "auto_lz"
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC = "quic"
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ = "glz"
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ = "lz"
+HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF = "off"
+
+HT_KVM_SPICE_VALID_LOSSLESS_IMG_COMPR_OPTIONS = frozenset([
+ HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_GLZ,
+ HT_KVM_SPICE_LOSSLESS_IMG_COMPR_AUTO_LZ,
+ HT_KVM_SPICE_LOSSLESS_IMG_COMPR_QUIC,
+ HT_KVM_SPICE_LOSSLESS_IMG_COMPR_GLZ,
+ HT_KVM_SPICE_LOSSLESS_IMG_COMPR_LZ,
+ HT_KVM_SPICE_LOSSLESS_IMG_COMPR_OFF,
+ ])
+
+# SPICE lossy image compression options (valid for both jpeg and zlib-glz)
+HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO = "auto"
+HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER = "never"
+HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS = "always"
+
+HT_KVM_SPICE_VALID_LOSSY_IMG_COMPR_OPTIONS = frozenset([
+ HT_KVM_SPICE_LOSSY_IMG_COMPR_AUTO,
+ HT_KVM_SPICE_LOSSY_IMG_COMPR_NEVER,
+ HT_KVM_SPICE_LOSSY_IMG_COMPR_ALWAYS,
+ ])
+
+# SPICE video stream detection
+HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF = "off"
+HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL = "all"
+HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER = "filter"
+
+HT_KVM_SPICE_VALID_VIDEO_STREAM_DETECTION_OPTIONS = frozenset([
+ HT_KVM_SPICE_VIDEO_STREAM_DETECTION_OFF,
+ HT_KVM_SPICE_VIDEO_STREAM_DETECTION_ALL,
+ HT_KVM_SPICE_VIDEO_STREAM_DETECTION_FILTER,
+ ])
+
# Security models
HT_SM_NONE = "none"
HT_SM_USER = "user"
IALLOCATOR_NEVAC_ALL,
])
+# Node evacuation
+NODE_EVAC_PRI = "primary-only"
+NODE_EVAC_SEC = "secondary-only"
+NODE_EVAC_ALL = "all"
+NODE_EVAC_MODES = frozenset([
+ NODE_EVAC_PRI,
+ NODE_EVAC_SEC,
+ NODE_EVAC_ALL,
+ ])
+
# Job queue
JOB_QUEUE_VERSION = 1
JOB_QUEUE_LOCK_FILE = QUEUE_DIR + "/lock"
HV_KVM_SPICE_BIND: "",
HV_KVM_SPICE_IP_VERSION: IFACE_NO_IP_VERSION_SPECIFIED,
HV_KVM_SPICE_PASSWORD_FILE: "",
+ HV_KVM_SPICE_LOSSLESS_IMG_COMPR: "",
+ HV_KVM_SPICE_JPEG_IMG_COMPR: "",
+ HV_KVM_SPICE_ZLIB_GLZ_IMG_COMPR: "",
+ HV_KVM_SPICE_STREAMING_VIDEO_DETECTION: "",
+ HV_KVM_SPICE_AUDIO_COMPR: True,
HV_KVM_FLOPPY_IMAGE_PATH: "",
HV_CDROM_IMAGE_PATH: "",
HV_KVM_CDROM2_IMAGE_PATH: "",
HTOOLS = _autoconf.HTOOLS
# The hail iallocator
IALLOC_HAIL = "hail"
+
+# Fake opcodes for functions that have hooks attached to them via
+# backend.RunLocalHooks
+FAKE_OP_MASTER_TURNUP = "OP_CLUSTER_IP_TURNUP"
+FAKE_OP_MASTER_TURNDOWN = "OP_CLUSTER_IP_TURNDOWN"