From d0de443e6fd5838ad1b0cc6f3c2b1e0ef12598e6 Mon Sep 17 00:00:00 2001 From: Helga Velroyen Date: Wed, 13 Mar 2013 14:44:20 +0100 Subject: [PATCH] Add 'enabled_storage_types' to the cluster config This patch adds the cluster's new field 'enabled_storage_types' to the configuration objects in python and haskell. Signed-off-by: Helga Velroyen Reviewed-by: Guido Trotter --- lib/objects.py | 1 + src/Ganeti/Objects.hs | 1 + src/Ganeti/Types.hs | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/lib/objects.py b/lib/objects.py index 51e13f8..2fdf7bc 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -1474,6 +1474,7 @@ class Cluster(TaggableObject): "prealloc_wipe_disks", "hv_state_static", "disk_state_static", + "enabled_storage_types", ] + _TIMESTAMPS + _UUID def UpgradeConfig(self): diff --git a/src/Ganeti/Objects.hs b/src/Ganeti/Objects.hs index 6f2055c..7e85cf1 100644 --- a/src/Ganeti/Objects.hs +++ b/src/Ganeti/Objects.hs @@ -681,6 +681,7 @@ $(buildObject "Cluster" "cluster" $ , simpleField "primary_ip_family" [t| IpFamily |] , simpleField "prealloc_wipe_disks" [t| Bool |] , simpleField "ipolicy" [t| FilledIPolicy |] + , simpleField "enabled_storage_types" [t| [StorageType] |] ] ++ timeStampFields ++ uuidFields diff --git a/src/Ganeti/Types.hs b/src/Ganeti/Types.hs index 1753ce6..810049a 100644 --- a/src/Ganeti/Types.hs +++ b/src/Ganeti/Types.hs @@ -302,6 +302,11 @@ $(THH.declareSADT "StorageType" [ ("StorageFile", 'C.stFile) , ("StorageLvmPv", 'C.stLvmPv) , ("StorageLvmVg", 'C.stLvmVg) + , ("StorageDiskless", 'C.stDiskless) + , ("StorageSharedFile", 'C.stSharedFile) + , ("StorageBlock", 'C.stBlock) + , ("StorageRados", 'C.stRados) + , ("StorageExt", 'C.stExt) ]) $(THH.makeJSONInstance ''StorageType) -- 1.7.10.4