From d63e148a4cc859300fb71f37e7f2fcf087bc12e6 Mon Sep 17 00:00:00 2001
From: Manuel Franceschini <manuel.franceschini@gmail.com>
Date: Mon, 31 Mar 2008 10:57:21 +0000
Subject: [PATCH] Add DEFAULT_VG and DTS_NOT_LVM to constants.py

DTS_NOT_LVM:
This constant is needed when checking if an instance can be created with
the given disk template if no lvm-storage is available, i.e. the ganeti
cluster does not have a volume group

DEFAULT_VG:
'xenvg' has been hardcoded before.

Reviewed-by: iustinp
---
 lib/constants.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/constants.py b/lib/constants.py
index 70c95961d..4e04a18fe 100644
--- a/lib/constants.py
+++ b/lib/constants.py
@@ -92,6 +92,9 @@ DT_FILE = "file"
 # the set of network-mirrored disk templates
 DTS_NET_MIRROR = frozenset([DT_REMOTE_RAID1, DT_DRBD8])
 
+# the set of non-lvm-based disk templates
+DTS_NOT_LVM = frozenset([DT_DISKLESS, DT_FILE])
+
 # logical disk types
 LD_LV = "lvm"
 LD_MD_R1 = "md_raid1"
@@ -144,6 +147,7 @@ SYNC_SPEED = 30 * 1024
 LOCALHOST_IP_ADDRESS = "127.0.0.1"
 TCP_PING_TIMEOUT = 10
 GANETI_RUNAS = "root"
+DEFAULT_VG = "xenvg"
 
 # valid os status
 OS_VALID_STATUS = "VALID"
-- 
GitLab