+VNC_DEFAULT_BIND_ADDRESS = '0.0.0.0'
+
+# NIC types
+HT_NIC_RTL8139 = "rtl8139"
+HT_NIC_NE2K_PCI = "ne2k_pci"
+HT_NIC_NE2K_ISA = "ne2k_isa"
+HT_NIC_I82551 = "i82551"
+HT_NIC_I85557B = "i82557b"
+HT_NIC_I8259ER = "i82559er"
+HT_NIC_PCNET = "pcnet"
+HT_NIC_E1000 = "e1000"
+HT_NIC_PARAVIRTUAL = HT_DISK_PARAVIRTUAL = "paravirtual"
+
+HT_HVM_VALID_NIC_TYPES = frozenset([HT_NIC_RTL8139, HT_NIC_NE2K_PCI,
+ HT_NIC_NE2K_ISA, HT_NIC_PARAVIRTUAL])
+HT_KVM_VALID_NIC_TYPES = frozenset([HT_NIC_RTL8139, HT_NIC_NE2K_PCI,
+ HT_NIC_NE2K_ISA, HT_NIC_I82551,
+ HT_NIC_I85557B, HT_NIC_I8259ER,
+ HT_NIC_PCNET, HT_NIC_E1000,
+ HT_NIC_PARAVIRTUAL])
+# Disk types
+HT_DISK_IOEMU = "ioemu"
+HT_DISK_IDE = "ide"
+HT_DISK_SCSI = "scsi"
+HT_DISK_SD = "sd"
+HT_DISK_MTD = "mtd"
+HT_DISK_PFLASH = "pflash"
+
+HT_HVM_VALID_DISK_TYPES = frozenset([HT_DISK_PARAVIRTUAL, HT_DISK_IOEMU])
+HT_KVM_VALID_DISK_TYPES = frozenset([HT_DISK_PARAVIRTUAL, HT_DISK_IDE,
+ HT_DISK_SCSI, HT_DISK_SD, HT_DISK_MTD,
+ HT_DISK_PFLASH])
+
+# Mouse types:
+HT_MOUSE_MOUSE = "mouse"
+HT_MOUSE_TABLET = "tablet"
+
+HT_KVM_VALID_MOUSE_TYPES = frozenset([HT_MOUSE_MOUSE, HT_MOUSE_TABLET])
+
+# Boot order
+HT_BO_CDROM = "cdrom"
+HT_BO_DISK = "disk"
+HT_BO_NETWORK = "network"
+
+HT_KVM_VALID_BO_TYPES = frozenset([HT_BO_CDROM, HT_BO_DISK, HT_BO_NETWORK])
+
+# 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"
+NV_DRBDLIST = "drbd-list"
+
+# Allocator framework constants
+IALLOCATOR_VERSION = 2
+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_QUEUE_SIZE_HARD_LIMIT = 5000
+JOB_QUEUE_SIZE_SOFT_LIMIT = JOB_QUEUE_SIZE_HARD_LIMIT * 0.8
+
+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 dynamic devices
+MAX_NICS = 8
+MAX_DISKS = 16
+
+# SSCONF keys
+SS_CLUSTER_NAME = "cluster_name"
+SS_CLUSTER_TAGS = "cluster_tags"
+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"
+SS_OFFLINE_NODES = "offline_nodes"
+SS_ONLINE_NODES = "online_nodes"
+SS_INSTANCE_LIST = "instance_list"
+SS_RELEASE_VERSION = "release_version"
+
+# 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: '',
+ HV_ROOT_PATH: '/dev/sda1',
+ HV_KERNEL_ARGS: 'ro',
+ },
+ HT_XEN_HVM: {
+ HV_BOOT_ORDER: "cd",
+ HV_CDROM_IMAGE_PATH: '',
+ HV_NIC_TYPE: HT_NIC_RTL8139,
+ HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
+ HV_VNC_BIND_ADDRESS: '0.0.0.0',
+ HV_ACPI: True,
+ HV_PAE: True,
+ },
+ HT_KVM: {
+ HV_KERNEL_PATH: "/boot/vmlinuz-2.6-kvmU",
+ HV_INITRD_PATH: '',
+ HV_KERNEL_ARGS: 'ro',
+ HV_ROOT_PATH: '/dev/vda1',
+ HV_ACPI: True,
+ HV_SERIAL_CONSOLE: True,
+ HV_VNC_BIND_ADDRESS: '',
+ HV_VNC_TLS: False,
+ HV_VNC_X509: '',
+ HV_VNC_X509_VERIFY: False,
+ HV_CDROM_IMAGE_PATH: '',
+ HV_BOOT_ORDER: HT_BO_DISK,
+ HV_NIC_TYPE: HT_NIC_PARAVIRTUAL,
+ HV_DISK_TYPE: HT_DISK_PARAVIRTUAL,
+ HV_USB_MOUSE: '',
+ },
+ HT_FAKE: {
+ },
+ }
+
+BEC_DEFAULTS = {
+ BE_MEMORY: 128,
+ BE_VCPUS: 1,
+ BE_AUTO_BALANCE: True,
+ }
+
+MASTER_POOL_SIZE_DEFAULT = 10