Add a generic write file function
[ganeti-local] / lib / constants.py
index 6e63cf0..8bb1655 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#
 #
 
 # Copyright (C) 2006, 2007 Google Inc.
@@ -55,10 +55,14 @@ EXPORT_DIR = _autoconf.EXPORT_DIR
 
 EXPORT_CONF_FILE = "config.ini"
 
+XEN_KERNEL = _autoconf.XEN_KERNEL
+XEN_INITRD = _autoconf.XEN_INITRD
+
 # hooks-related constants
 HOOKS_BASE_DIR = _autoconf.SYSCONFDIR + "/ganeti/hooks"
 HOOKS_PHASE_PRE = "pre"
 HOOKS_PHASE_POST = "post"
+HOOKS_NAME_CFGUPDATE = "config-update"
 HOOKS_VERSION = 1
 
 # hooks subject type (what object type does the LU deal with)
@@ -88,8 +92,10 @@ INISECT_EXP = "export"
 INISECT_INS = "instance"
 
 # common exit codes
+EXIT_SUCCESS = 0
 EXIT_NOTMASTER = 11
 EXIT_NODESETUP_ERROR = 12
+EXIT_CONFIRMATION = 13 # need user confirmation
 
 # tags
 TAG_CLUSTER = "cluster"
@@ -101,3 +107,5 @@ MAX_TAGS_PER_OBJ = 4096
 # others
 DEFAULT_BRIDGE = "xen-br0"
 SYNC_SPEED = 30 * 1024
+LOCALHOST_IP_ADDRESS="127.0.0.1"
+TCP_PING_TIMEOUT = 10