def agent_join(consul_url=None, address=None, **kwargs):
 ret = {}
 query_params = {}
 if (not consul_url):
  consul_url = _get_config()
  if (not consul_url):
   log.error('No Consul URL found.')
   ret['message'] = 'No Consul URL found.'
   ret['res'] = False
   return ret
 if (not address):
  raise SaltInvocationError('Required argument "address" is missing.')
 if ('wan' in kwargs):
  query_params['wan'] = kwargs['wan']
 function = 'agent/join/{0}'.format(address)
 res = _query(consul_url=consul_url, function=function, method='GET', query_params=query_params)
 if res['res']:
  ret['res'] = True
  ret['message'] = 'Agent joined the cluster'
 else:
  ret['res'] = False
  ret['message'] = 'Unable to join the cluster.'
 return ret

def agent_join ( consul_url = None , address = None , ** kwargs ) : ret = { } query_params = { } if ( not consul_url ) : consul_url = _get_config ( ) if ( not consul_url ) : log . error ( 'No Consul URL found.' ) ret [ 'message' ] = 'No Consul URL found.' ret [ 'res' ] = False return ret if ( not address ) : raise SaltInvocationError ( 'Required argument "address" is missing.' ) if ( 'wan' in kwargs ) : query_params [ 'wan' ] = kwargs [ 'wan' ] function = 'agent/join/{0}' . format ( address ) res = _query ( consul_url = consul_url , function = function , method = 'GET' , query_params = query_params ) if res [ 'res' ] : ret [ 'res' ] = True ret [ 'message' ] = 'Agent joined the cluster' else : ret [ 'res' ] = False ret [ 'message' ] = 'Unable to join the cluster.' return ret
triggers the local agent to join a node .