def _do_names(names, fun, path=None):
 ret = {}
 hosts = find_guests(names, path=path)
 if (not hosts):
  return False
 client = salt.client.get_local_client(__opts__['conf_file'])
 for (host, sub_names) in six.iteritems(hosts):
  cmds = []
  for name in sub_names:
   cmds.append(client.cmd_iter(host, 'lxc.{0}'.format(fun), [name], kwarg={'path': path}, timeout=60))
  for cmd in cmds:
   data = next(cmd)
   data = data.get(host, {}).get('ret', None)
   if data:
    ret.update({host: data})
 return ret

def _do_names ( names , fun , path = None ) : ret = { } hosts = find_guests ( names , path = path ) if ( not hosts ) : return False client = salt . client . get_local_client ( __opts__ [ 'conf_file' ] ) for ( host , sub_names ) in six . iteritems ( hosts ) : cmds = [ ] for name in sub_names : cmds . append ( client . cmd_iter ( host , 'lxc.{0}' . format ( fun ) , [ name ] , kwarg = { 'path' : path } , timeout = 60 ) ) for cmd in cmds : data = next ( cmd ) data = data . get ( host , { } ) . get ( 'ret' , None ) if data : ret . update ( { host : data } ) return ret
invoke a function in the lxc module with no args path path to the container parent default: /var/lib/lxc .