# various versions
PROTOCOL_VERSION = 13
RELEASE_VERSION = _autoconf.PACKAGE_VERSION
-OS_API_VERSION = 5
+OS_API_VERSION = 10
EXPORT_VERSION = 0
RAPI_VERSION = 2
LOG_WATCHER = LOG_DIR + "watcher.log"
LOG_MASTERDAEMON = LOG_DIR + "master-daemon.log"
LOG_RAPISERVER = LOG_DIR + "rapi-daemon.log"
-LOG_RAPIACCESS = LOG_DIR + "rapi-access.log"
LOG_COMMANDS = LOG_DIR + "commands.log"
LOG_BURNIN = LOG_DIR + "burnin.log"
KVM_PATH = _autoconf.KVM_PATH
VALUE_DEFAULT = "default"
+VALUE_AUTO = "auto"
+VALUE_GENERATE = "generate"
VALUE_NONE = "none"
# hooks-related constants
LD_LV = "lvm"
LD_DRBD8 = "drbd8"
LD_FILE = "file"
+LDS_BLOCK = frozenset([LD_LV, LD_DRBD8])
# drbd constants
DRBD_HMAC_ALG = "md5"
BIND_ADDRESS_GLOBAL = "0.0.0.0"
MIN_VG_SIZE = 20480
-# valid os status
+# os related constants
OS_VALID_STATUS = "VALID"
+OS_SCRIPT_CREATE = 'create'
+OS_SCRIPT_IMPORT = 'import'
+OS_SCRIPT_EXPORT = 'export'
+OS_SCRIPT_RENAME = 'rename'
+OS_SCRIPTS = frozenset([OS_SCRIPT_CREATE, OS_SCRIPT_IMPORT,
+ OS_SCRIPT_EXPORT, OS_SCRIPT_RENAME])
# ssh constants
SSH_INITD_SCRIPT = _autoconf.SSH_INITD_SCRIPT
])
# BE parameter names
-BE_MEMSIZE = "memory"
+BE_MEMORY = "memory"
BE_VCPUS = "vcpus"
-BE_AUTOBALANCE = "auto_balance"
+BE_AUTO_BALANCE = "auto_balance"
+
+BES_PARAMETERS = frozenset([
+ BE_MEMORY,
+ BE_VCPUS,
+ BE_AUTO_BALANCE,
+ ])
# BE GROUP
BEGR_DEFAULT = "default"
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+"
# Temporary RAPI constants until we have cluster parameters
RAPI_ENABLE = True
RAPI_PORT = 5080
+
+# 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,
+ }