def _proxy_process(proxyname, test):
 changes_old = []
 changes_new = []
 if (not _is_proxy_running(proxyname)):
  if (not test):
   __salt__['cmd.run_all']('salt-proxy --proxyid={0} -l info -d'.format(salt.ext.six.moves.shlex_quote(proxyname)), timeout=5)
   changes_new.append('Salt Proxy: Started proxy process for {0}'.format(proxyname))
  else:
   changes_new.append('Salt Proxy: process {0} will be started'.format(proxyname))
 else:
  changes_old.append('Salt Proxy: already running for {0}'.format(proxyname))
 return (True, changes_new, changes_old)

def _proxy_process ( proxyname , test ) : changes_old = [ ] changes_new = [ ] if ( not _is_proxy_running ( proxyname ) ) : if ( not test ) : __salt__ [ 'cmd.run_all' ] ( 'salt-proxy --proxyid={0} -l info -d' . format ( salt . ext . six . moves . shlex_quote ( proxyname ) ) , timeout = 5 ) changes_new . append ( 'Salt Proxy: Started proxy process for {0}' . format ( proxyname ) ) else : changes_new . append ( 'Salt Proxy: process {0} will be started' . format ( proxyname ) ) else : changes_old . append ( 'Salt Proxy: already running for {0}' . format ( proxyname ) ) return ( True , changes_new , changes_old )
check and execute proxy process .