]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Merge branch 'master' into rh_new
authorrakeshgm <rakeshgm014@gmail.com>
Thu, 14 Nov 2019 06:11:40 +0000 (11:41 +0530)
committerrakeshgm <rakeshgm014@gmail.com>
Thu, 14 Nov 2019 06:11:40 +0000 (11:41 +0530)
Signed-off-by: rakeshgm <rakeshgm014@gmail.com>
1  2 
teuthology/misc.py

index aac97ed6d1bfabb675fd670cf91f64f55ded7b98,1246d704019749c6cb78caf71f6e961bef3a8096..c46d6f2d3ed1c6008c7c62dfb4757a250a075742
@@@ -1304,22 -1289,7 +1304,22 @@@ def is_in_dict(searchkey, searchval, d)
          return searchval == val
  
  
- def sh(command, log_limit=1024):
 +def reimage_fog(args):
 +    """
 +    Reimage FOG nodes with options specified
 +    """
 +    machines = args['--nodes']
 +    nodes = machines.rstrip(',').split(',')
 +    ctx = argparse.Namespace()
 +    ctx.os_type = args['--os-type']
 +    ctx.os_version = args['--os-version']
 +    from teuthology.provision import reimage
 +    with parallel() as p:
 +        for node in nodes:
 +            p.spawn(reimage, ctx, node)
 +
 +
+ def sh(command, log_limit=1024, cwd=None, env=None):
      """
      Run the shell command and return the output in ascii (stderr and
      stdout).  If the command fails, raise an exception. The command