]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
workunit: allow overrides
authorSage Weil <sage@inktank.com>
Fri, 13 Jul 2012 18:13:31 +0000 (11:13 -0700)
committerSage Weil <sage@inktank.com>
Fri, 13 Jul 2012 18:13:41 +0000 (11:13 -0700)
Pull top-level overrides into our config.  This lets you do:

overrides:
  workunit:
    branch: foo
tasks:
...
- workunit:
  clients:
    all:
    - foo
...

teuthology/task/workunit.py

index 3f27ee0ff1dc1ff70db8a14042da24e7620f0a5a..9ec81c6a8bd0711a979e0cce34cbcdbffa32fc10 100644 (file)
@@ -53,6 +53,9 @@ def task(ctx, config):
     assert isinstance(config.get('clients'), dict), \
         'configuration must contain a dictionary of clients'
 
+    overrides = ctx.config.get('overrides', {})
+    teuthology.deep_merge(config, overrides.get('workunit', {}))
+
     refspec = config.get('branch')
     if refspec is None:
         refspec = config.get('sha1')