# various versions
CONFIG_VERSION = 3
-PROTOCOL_VERSION = 4
+PROTOCOL_VERSION = 10
RELEASE_VERSION = _autoconf.PACKAGE_VERSION
OS_API_VERSION = 5
EXPORT_VERSION = 0
# file paths
DATA_DIR = _autoconf.LOCALSTATEDIR + "/lib/ganeti"
+RUN_DIR = _autoconf.LOCALSTATEDIR + "/run"
+BDEV_CACHE_DIR = RUN_DIR + "/ganeti"
+LOCK_DIR = _autoconf.LOCALSTATEDIR + "/lock"
CLUSTER_CONF_FILE = DATA_DIR + "/config.data"
SSL_CERT_FILE = DATA_DIR + "/server.pem"
WATCHER_STATEFILE = DATA_DIR + "/watcher.data"
SSH_KNOWN_HOSTS_FILE = DATA_DIR + "/known_hosts"
+ETC_HOSTS = "/etc/hosts"
NODE_INITD_SCRIPT = _autoconf.SYSCONFDIR + "/init.d/ganeti"
DEFAULT_NODED_PORT = 1811
XEN_KERNEL = _autoconf.XEN_KERNEL
XEN_INITRD = _autoconf.XEN_INITRD
+VALUE_DEFAULT = "default"
+VALUE_NONE = "none"
+
# hooks-related constants
HOOKS_BASE_DIR = _autoconf.SYSCONFDIR + "/ganeti/hooks"
HOOKS_PHASE_PRE = "pre"
TCP_PING_TIMEOUT = 10
GANETI_RUNAS = "root"
+# valid os status
+OS_VALID_STATUS = "VALID"
+
# ssh constants
SSH_INITD_SCRIPT = _autoconf.SSH_INITD_SCRIPT
SSH_CONFIG_DIR = "/etc/ssh/"
INSTANCE_REBOOT_SOFT = "soft"
INSTANCE_REBOOT_HARD = "hard"
INSTANCE_REBOOT_FULL = "full"
+
+# Hypervisor constants
+HT_XEN_PVM30 = "xen-3.0"
+HT_FAKE = "fake"
+HT_XEN_HVM31 = "xen-hvm-3.1"
+HYPER_TYPES = frozenset([HT_XEN_PVM30, HT_FAKE, HT_XEN_HVM31])
+HTS_REQ_PORT = frozenset([HT_XEN_HVM31])
+
+HT_HVM_VNC_BASE_PORT = 5900
+HT_HVM_DEFAULT_BOOT_ORDER = 'dc'
+VNC_PASSWORD_FILE = _autoconf.SYSCONFDIR + "/ganeti/vnc-cluster-password"