From a0c26bdbfdd97075ae2c7581938d4d3f5249bbbb Mon Sep 17 00:00:00 2001
From: Guido Trotter <ultrotter@google.com>
Date: Thu, 6 Aug 2009 18:38:08 +0100
Subject: [PATCH] SimpleConfigReader: add serial numbers reading

GetConfigSerialNo and GetClusterSerialNo return respectively the serial
number for the config and for the cluster object.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/ssconf.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/ssconf.py b/lib/ssconf.py
index 630a3f64b..c3d37824a 100644
--- a/lib/ssconf.py
+++ b/lib/ssconf.py
@@ -91,6 +91,12 @@ class SimpleConfigReader(object):
   def GetNodeList(self):
     return self._config_data["nodes"].keys()
 
+  def GetConfigSerialNo(self):
+    return self._config_data["serial_no"]
+
+  def GetClusterSerialNo(self):
+    return self._config_data["cluster"]["serial_no"]
+
 
 class SimpleStore(object):
   """Interface to static cluster data.
-- 
GitLab