From dfb34028575cf73abbd1e73e71595b5be8632aa7 Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Thu, 13 May 2010 16:57:38 +0200 Subject: [PATCH] Add function to read cluster domain secret Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- lib/cmdlib.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index a67710f6f..8eeb47182 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -599,6 +599,13 @@ def _CheckStorageType(storage_type): _RequireFileStorage() +def _GetClusterDomainSecret(): + """Reads the cluster domain secret. + + """ + return utils.ReadOneLineFile(constants.CLUSTER_DOMAIN_SECRET_FILE, + strict=True) + def _CheckInstanceDown(lu, instance, reason): """Ensure that an instance is not running.""" -- GitLab