+#
+#
+
# Copyright (C) 2007 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
"""
-import yaml
+import simplejson
import qa_error
f = open(path, 'r')
try:
- cfg = yaml.load(f.read())
+ cfg = simplejson.load(f)
finally:
f.close()
raise qa_error.Error("Need at least one node")
if len(cfg['instances']) < 1:
raise qa_error.Error("Need at least one instance")
-
- if (TestEnabled('instance-add-remote-raid-disk') and
- TestEnabled('instance-add-drbd-disk')):
- raise qa_error.Error('Tests for disk templates remote_raid1 and drbd'
- ' cannot be enabled at the same time.')
+ 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):