X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/2ff95e623b92210307b4b8146e1a928c4ae38a25..87e439883e8d2542596e71ec7d2fa5faafbc3dd2:/qa/qa_config.py diff --git a/qa/qa_config.py b/qa/qa_config.py index a180b32..4afe253 100644 --- a/qa/qa_config.py +++ b/qa/qa_config.py @@ -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,11 +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 (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):