master daemon: allow skipping the voting process
[ganeti-local] / qa / qa_config.py
index 5f0a8ac..4afe253 100644 (file)
@@ -1,3 +1,6 @@
+#
+#
+
 # Copyright (C) 2007 Google Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -21,7 +24,7 @@
 """
 
 
-import yaml
+import simplejson
 
 import qa_error
 
@@ -38,7 +41,7 @@ def Load(path):
 
   f = open(path, 'r')
   try:
-    cfg = yaml.load(f.read())
+    cfg = simplejson.load(f)
   finally:
     f.close()
 
@@ -50,6 +53,9 @@ def Validate():
     raise qa_error.Error("Need at least one node")
   if len(cfg['instances']) < 1:
     raise qa_error.Error("Need at least one instance")
+  if len(cfg["disk"]) != len(cfg["disk-growth"]):
+    raise qa_error.Error("Config options 'disk' and 'disk-growth' must have"
+                         " the same number of items")
 
 
 def get(name, default=None):