From 546b1111b3dc0192dcd85dd17fd32ad1b405cc27 Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Thu, 16 Sep 2010 16:34:15 +0200 Subject: [PATCH] Add two new cluster settings The new variables are: - a list of hidden OSes, that should not be displayed to the users in interactive selection (e.g. reinstall); however, if they are selected, they can be used - a list of OSes that should be hidden and blocked from install-time selection The filtering will apply at pure OS name level, not OS+variant level. Signed-off-by: Iustin Pop <iustin@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- lib/objects.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/objects.py b/lib/objects.py index 4509754cd..34be3dbd4 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -957,6 +957,8 @@ class Cluster(TaggableObject): "maintain_node_health", "uid_pool", "default_iallocator", + "hidden_oss", + "blacklisted_oss", ] + _TIMESTAMPS + _UUID def UpgradeConfig(self): @@ -1022,6 +1024,13 @@ class Cluster(TaggableObject): if self.reserved_lvs is None: self.reserved_lvs = [] + # hidden and blacklisted operating systems added before 2.2.1 + if self.hidden_oss is None: + self.hidden_oss = [] + + if self.blacklisted_oss is None: + self.blacklisted_oss = [] + def ToDict(self): """Custom function for cluster. -- GitLab