From ea205dbcca1039d91271cdd3aea0cffb9248707e Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Mon, 7 Sep 2009 18:40:53 +0200 Subject: [PATCH] locking: Add level name dict Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Olivier Tharan <olive@google.com> --- lib/locking.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/locking.py b/lib/locking.py index d24abdf4d..56d2d93ed 100644 --- a/lib/locking.py +++ b/lib/locking.py @@ -682,6 +682,12 @@ LEVELS = [LEVEL_CLUSTER, # Lock levels which are modifiable LEVELS_MOD = [LEVEL_NODE, LEVEL_INSTANCE] +LEVEL_NAMES = { + LEVEL_CLUSTER: "cluster", + LEVEL_INSTANCE: "instance", + LEVEL_NODE: "node", + } + # Constant for the big ganeti lock BGL = 'BGL' -- GitLab