On Thu, Jan 05, 2012 at 02:19:55PM +0100, René Nussbaumer wrote: > --- > qa/qa-sample.json | 4 ++++ > qa/qa_cluster.py | 10 ++++++++-- > 2 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/qa/qa-sample.json b/qa/qa-sample.json > index 534e332..43a4326 100644 > --- a/qa/qa-sample.json > +++ b/qa/qa-sample.json > @@ -16,6 +16,10 @@ > "maxmem": "1024M", > "minmem": "512M", > > + "# Instance policy specs": null, > + "ispec_mem_size_max": 1024, > + "ispec_disk_size_min": 512. > + > "# Lists of disk sizes": null, > "disk": ["1G", "512M"], > "disk-growth": ["2G", "768M"], > diff --git a/qa/qa_cluster.py b/qa/qa_cluster.py > index 7bc82b9..28b8aef 100644 > --- a/qa/qa_cluster.py > +++ b/qa/qa_cluster.py > @@ -89,8 +89,14 @@ def TestClusterInit(rapi_user, rapi_secret): > > cmd.append("--primary-ip-version=%d" % > qa_config.get("primary_ip_version", 4)) > - cmd.append("--specs-mem-size=max=1024") > - cmd.append("--specs-disk-size=min=512") > + > + for spec_type in ("mem-size", "disk-size", "disk-count", "cpu-count", > + "nic-count"): > + for spec_val in ("min", "max", "std"): > + spec = qa_config.get("ispec_%s_%s" % > + (spec_type.replace('-', '_'), spec_val), None) > + if spec: > + cmd.append("--specs-%s=%s=%d" % (spec_type, spec_val, spec))
Much nicer, thanks! LGTM. iustin