+HT_XEN_HVM = "xen-hvm"
+HT_KVM = "kvm"
+HYPER_TYPES = frozenset([HT_XEN_PVM, HT_FAKE, HT_XEN_HVM, HT_KVM])
+HTS_REQ_PORT = frozenset([HT_XEN_HVM])
+
+HT_HVM_VNC_BASE_PORT = 5900
+HT_HVM_DEFAULT_BOOT_ORDER = 'dc'
+VNC_PASSWORD_FILE = _autoconf.SYSCONFDIR + "/ganeti/vnc-cluster-password"
+VNC_DEFAULT_BIND_ADDRESS = '0.0.0.0'
+
+# HVM NIC types
+HT_HVM_NIC_RTL8139 = "rtl8139"
+HT_HVM_NIC_NE2K_PCI = "ne2k_pci"
+HT_HVM_NIC_NE2K_ISA = "ne2k_isa"
+HT_HVM_DEV_PARAVIRTUAL = "paravirtual"
+HT_HVM_DEV_IOEMU = "ioemu"
+HT_HVM_VALID_NIC_TYPES = frozenset([HT_HVM_NIC_RTL8139, HT_HVM_NIC_NE2K_PCI,
+ HT_HVM_NIC_NE2K_ISA,
+ HT_HVM_DEV_PARAVIRTUAL])
+HT_HVM_VALID_DISK_TYPES = frozenset([HT_HVM_DEV_PARAVIRTUAL, HT_HVM_DEV_IOEMU])
+
+# Cluster Verify steps
+VERIFY_NPLUSONE_MEM = 'nplusone_mem'
+VERIFY_OPTIONAL_CHECKS = frozenset([VERIFY_NPLUSONE_MEM])
+
+# Node verify constants
+NV_FILELIST = "filelist"
+NV_HVINFO = "hvinfo"
+NV_HYPERVISOR = "hypervisor"
+NV_INSTANCELIST = "instancelist"
+NV_LVLIST = "lvlist"
+NV_NODELIST = "nodelist"
+NV_NODENETTEST = "node-net-test"
+NV_VERSION = "version"
+NV_VGLIST = "vglist"
+
+# Allocator framework constants
+IALLOCATOR_DIR_IN = "in"
+IALLOCATOR_DIR_OUT = "out"
+IALLOCATOR_MODE_ALLOC = "allocate"
+IALLOCATOR_MODE_RELOC = "relocate"
+IALLOCATOR_SEARCH_PATH = _autoconf.IALLOCATOR_SEARCH_PATH
+IARUN_NOTFOUND = 1
+IARUN_FAILURE = 2
+IARUN_SUCCESS = 3
+
+# Job queue
+JOB_QUEUE_VERSION = 1
+JOB_QUEUE_LOCK_FILE = QUEUE_DIR + "/lock"
+JOB_QUEUE_VERSION_FILE = QUEUE_DIR + "/version"
+JOB_QUEUE_SERIAL_FILE = QUEUE_DIR + "/serial"
+JOB_QUEUE_ARCHIVE_DIR = QUEUE_DIR + "/archive"
+JOB_QUEUE_DRAIN_FILE = QUEUE_DIR + "/drain"
+
+JOB_ID_TEMPLATE = r"\d+"
+
+# unchanged job return
+JOB_NOTCHANGED = "nochange"
+
+# Job status
+JOB_STATUS_QUEUED = "queued"
+JOB_STATUS_WAITLOCK = "waiting"
+JOB_STATUS_CANCELING = "canceling"
+JOB_STATUS_RUNNING = "running"
+JOB_STATUS_CANCELED = "canceled"
+JOB_STATUS_SUCCESS = "success"
+JOB_STATUS_ERROR = "error"
+
+OP_STATUS_QUEUED = "queued"
+OP_STATUS_WAITLOCK = "waiting"
+OP_STATUS_CANCELING = "canceling"
+OP_STATUS_RUNNING = "running"
+OP_STATUS_CANCELED = "canceled"
+OP_STATUS_SUCCESS = "success"
+OP_STATUS_ERROR = "error"
+
+# Execution log types
+ELOG_MESSAGE = "message"
+ELOG_PROGRESS = "progress"
+
+# Temporary RAPI constants until we have cluster parameters
+RAPI_ENABLE = True
+RAPI_PORT = 5080
+
+# max dynamnic devices
+MAX_NICS = 8
+MAX_DISKS = 16
+
+# SSCONF keys
+SS_CLUSTER_NAME = "cluster_name"
+SS_FILE_STORAGE_DIR = "file_storage_dir"
+SS_MASTER_CANDIDATES = "master_candidates"
+SS_MASTER_IP = "master_ip"
+SS_MASTER_NETDEV = "master_netdev"
+SS_MASTER_NODE = "master_node"
+SS_NODE_LIST = "node_list"
+
+# cluster wide default parameters
+DEFAULT_ENABLED_HYPERVISOR = HT_XEN_PVM
+
+HVC_DEFAULTS = {
+ HT_XEN_PVM: {
+ HV_KERNEL_PATH: "/boot/vmlinuz-2.6-xenU",
+ HV_INITRD_PATH: None,
+ },
+ HT_XEN_HVM: {
+ HV_BOOT_ORDER: "cd",
+ HV_CDROM_IMAGE_PATH: None,
+ HV_NIC_TYPE: HT_HVM_NIC_RTL8139,
+ HV_DISK_TYPE: HT_HVM_DEV_PARAVIRTUAL,
+ HV_VNC_BIND_ADDRESS: '0.0.0.0',
+ HV_ACPI: True,
+ HV_PAE: True,
+ },
+ HT_KVM: {
+ HV_KERNEL_PATH: "/boot/vmlinuz-2.6-xenU",
+ HV_INITRD_PATH: None,
+ HV_ACPI: True,
+ },
+ HT_FAKE: {
+ },
+ }
+
+BEC_DEFAULTS = {
+ BE_MEMORY: 128,
+ BE_VCPUS: 1,
+ BE_AUTO_BALANCE: True,
+ }