def _do(name, fun, path=None):
 host = find_guest(name, quiet=True, path=path)
 if (not host):
  return False
 client = salt.client.get_local_client(__opts__['conf_file'])
 cmd_ret = client.cmd_iter(host, 'lxc.{0}'.format(fun), [name], kwarg={'path': path}, timeout=60)
 data = next(cmd_ret)
 data = data.get(host, {}).get('ret', None)
 if data:
  data = {host: data}
 return data

def _do ( name , fun , path = None ) : host = find_guest ( name , quiet = True , path = path ) if ( not host ) : return False client = salt . client . get_local_client ( __opts__ [ 'conf_file' ] ) cmd_ret = client . cmd_iter ( host , 'lxc.{0}' . format ( fun ) , [ name ] , kwarg = { 'path' : path } , timeout = 60 ) data = next ( cmd_ret ) data = data . get ( host , { } ) . get ( 'ret' , None ) if data : data = { host : data } return data
worker function for the others to use this handles all the gsetting magic .