From 62779dd082bc92cb84376d67ab9cab183b710195 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Fri, 3 Aug 2007 11:03:56 +0000
Subject: [PATCH] Implement a standard way of getting the cluster object from
 the configuration.

Reviewed-by: imsnah
---
 lib/config.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/config.py b/lib/config.py
index b3a25f488..e4d948f4b 100644
--- a/lib/config.py
+++ b/lib/config.py
@@ -603,3 +603,15 @@ class ConfigWriter:
     self._OpenConfig()
     self._ReleaseLock()
     return self._config_data.cluster.mac_prefix
+
+  def GetClusterInfo(self):
+    """Returns informations about the cluster
+
+    Returns:
+      the cluster object
+
+    """
+    self._OpenConfig()
+    self._ReleaseLock()
+
+    return self._config_data.cluster
-- 
GitLab