%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/modules/consul.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	Zddl
mZddlm
Z
mZeje�ZddlmZidd6Zd	Zd
�Zd�Zddd
ddd�Zdddd�Zdddeeed�Zddddd�Zdddd�Zddd�Zddd�Z ddd�Z!ddd�Z"ddd�Z#dddd�Z$dddd�Z%ddd�Z&dddd�Z'dddd�Z(dddd�Z)dddd�Z*ddd�Z+dddd �Z,dddd!�Z-ddd"�Z.dded#�Z/dddd$�Z0dddd%�Z1ddd&�Z2ddd'�Z3ddd(�Z4ddd)�Z5ddd*�Z6dddd+�Z7dddd,�Z8dddd-�Z9dddd.�Z:dddd/�Z;dddd0�Z<ddd1�Z=dd2�Z>ddd3�Z?ddd4�Z@ddd5�ZAdd6�ZBddd7�ZCddd8�ZDdddd9�ZEddd:�ZFdS(;u.
Interact with Consul

https://www.consul.io

i(tabsolute_importtprint_functiontunicode_literalsN(tsix(thttp_clientturllib(tSaltInvocationErrorulistulist_uconsulcC@stdd�ptdd�S(u'
    Retrieve Consul configuration
    u
config.getu
consul.urlu
consul:url(t__salt__(((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt_get_config"scC@stdd�ptdd�S(u'
    Retrieve Consul configuration
    u
config.getuconsul.tokenuconsul:token(R(((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
_get_token*suGETuv1cC@s�|si}nidd6td6}|s5t�}ni|d6dd6}tjj|dj|��}	tjj|	|t�}
|dkr�d}n*|dkr�i}ntj	j
j|�}tj	jj
|
d	|d
|d|dtd
td|dt�}|jdd�tjkr;|jd|�|d<t|d<n�|jdd�tjkrct|d<nY|jdd�tjkr�d|d<t|d<n'|r�||d<t|d<n
t|d<|S(u�
    Consul object method function to construct and execute on the API URL.

    :param api_url:     The Consul api url.
    :param api_version  The Consul api version
    :param function:    The Consul api function to perform.
    :param method:      The HTTP method, e.g. GET or POST.
    :param data:        The data to be sent for POST method. This param is ignored for GET requests.
    :return:            The json response from the API call or False.
    uudatauresuX-Consul-Tokenuapplication/jsonuContent-Typeu{0}/uGETtmethodtparamstdatatdecodetstatustheader_dicttoptsustatusudictuKey not found.N(tTrueR	RtparseturljointformattFalsetNonetsalttutilstjsontdumpsthttptqueryt__opts__tgetRtOKt
NO_CONTENTt	NOT_FOUND(tfunctiont
consul_urlttokenR
tapi_versionRtquery_paramstrettheaderstbase_urlturltresult((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt_query2sH	

			






c	K@s�i}|sCt�}|sCtjd�d|d<t|d<|Sni}d|krbd|d<n|s{d|d<d}ndj|�}d|d<d	|d
<td|d|d
|d|�}|S(u 
    List keys in Consul

    :param consul_url: The Consul server URL.
    :param key: The key to use as the starting point for the list.
    :return: The list of keys.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.list
        salt '*' consul.list key='web'

    uNo Consul URL found.umessageuresurecurseuTrueukv/ukv/{0}ukeysu/u	separatorR#R"R$R&(RtlogterrorRRR,(R#R$tkeytkwargsR'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytlist_ts,	




	

	c
	C@si}|sCt�}|sCtjd�d|d<t|d<|Sn|sXtd��ni}dj|�}|r�d|d<n|r�t|d<ntd	|d
|d|d|�}|dr|rxI|d
D]:}	|	ddk	r�t	j
|	d�|	d<q�d|	d<q�Wqn|S(u�
    Get key from Consul

    :param consul_url: The Consul server URL.
    :param key: The key to use as the starting point for the list.
    :param recurse: Return values recursively beginning at the value of key.
    :param decode: By default values are stored as Base64 encoded values,
                   decode will return the whole key with the value decoded.
    :param raw: Simply return the decoded value of the key.
    :return: The keys in Consul.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.get key='web/key1'
        salt '*' consul.get key='web' recurse=True
        salt '*' consul.get key='web' recurse=True decode=True

    By default values stored in Consul are base64 encoded, passing the
    decode option will show them as the decoded values.

    .. code-block:: bash

        salt '*' consul.get key='web' recurse=True decode=True raw=True

    By default Consult will return other information about the key, the raw
    option will return only the raw value.

    uNo Consul URL found.umessageuresu#Required argument "key" is missing.ukv/{0}uTrueurecurseurawR#R"R$R&udatauValueuN(RR-R.RRRRR,Rtbase64t	b64decode(
R#R/R$trecurseR
trawR'R&R"titem((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyR�s6	




	
cK@si}|sCt�}|sCtjd�d|d<t|d<|Sn|sXtd��ndddg}x^|D]V}xM|D]E}||kr{||kr{||kr{tdj||���q{q{WqnWi}	td	|d
t�}
td	|d|�}d|kr8|dd
kr8|dd"kr8|d|	d<q8nd|kr�|dr�|dd
krdj|�|d<t|d<|S|d|ddkr�dj|�|d<t|d<|S|d|	d<q�dj|�|d<t|d<|Snd|kr?|d|
kr.dj|d�|d<t|d<|S|d|	d<nd|kr�|dr�d|dkr�|dd|dkr�|d|	d<q�dj|�|d<t|d<|Sq�dj|d�|d<t|d<q�tjd�n|}dj|�}
d}t	d	|d|d|
d|d|d|	�}|dr[t|d<d j||�|d<n t|d<d!j||�|d<|S(#u>
    Put values into Consul

    :param consul_url: The Consul server URL.
    :param key: The key to use as the starting point for the list.
    :param value: The value to set the key to.
    :param flags: This can be used to specify an unsigned value
                  between 0 and 2^64-1. Clients can choose to use
                  this however makes sense for their application.
    :param cas: This flag is used to turn the PUT into a
                Check-And-Set operation.
    :param acquire: This flag is used to turn the PUT into a
                    lock acquisition operation.
    :param release: This flag is used to turn the PUT into a
                    lock release operation.
    :return: Boolean & message of success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.put key='web/key1' value="Hello there"

        salt '*' consul.put key='web/key1' value="Hello there" acquire='d5d371f4-c380-5280-12fd-8810be175592'

        salt '*' consul.put key='web/key1' value="Hello there" release='d5d371f4-c380-5280-12fd-8810be175592'

    uNo Consul URL found.umessageuresu#Required argument "key" is missing.ucasureleaseuacquireu4Using arguments `{0}` and `{1}` together is invalid.R#treturn_listR/uflagsiii@u'Key {0} exists, index must be non-zero.udatauModifyIndexu)Key {0} exists, but indexes do not match.u6Key {0} does not exists, CAS argument can not be used.u{0} is not a valid session.uSessionu{0} locked by another session.u)Key {0} does not exist. Skipping release.ukv/{0}uPUTR$R"R
RR&uAdded key {0} with value {1}.u%Unable to add key {0} with value {1}.l(
RR-R.RRRtsession_listRRR,(R#R$R/tvalueR0R'tconflicting_argst_l1t_l2R&tavailable_sessionst_currentRR"R
((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytput�s�	




$	 










	


cK@s@i}|sCt�}|sCtjd�d|d<t|d<|Sn|sXtd��ni}d|krwt|d<nd|kr�|ddkr�|d|d<q�d|d<t|d<|Snd
j|�}td|d|d
|ddd|�}|drt|d<dj|�|d<nt|d<dj|�|d<|S(u
    Delete values from Consul

    :param consul_url: The Consul server URL.
    :param key: The key to use as the starting point for the list.
    :param recurse: Delete values recursively beginning at the value of key.
    :param cas: This flag is used to turn the DELETE into
                a Check-And-Set operation.
    :return: Boolean & message of success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.delete key='web'
        salt '*' consul.delete key='web' recurse='True'

    uNo Consul URL found.umessageuresu#Required argument "key" is missing.urecurseucasiuCheck and Set Operation uvalue must be greater than 0.ukv/{0}R#R$R"R
uDELETER&uDeleted key {0}.uUnable to delete key {0}.(uCheck and Set Operation uvalue must be greater than 0.(RR-R.RRRRR,(R#R$R/R0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytdelete\s@	





	


c	C@sni}|sCt�}|sCtjd�d|d<t|d<|Snd}td|d|d|dd	�}|S(
u�
    Returns the checks the local agent is managing

    :param consul_url: The Consul server URL.
    :return: Returns the checks the local agent is managing

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_checks

    uNo Consul URL found.umessageuresuagent/checksR#R"R$R
uGET(RR-R.RR,(R#R$R'R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_checks�s	


	c	C@sni}|sCt�}|sCtjd�d|d<t|d<|Snd}td|d|d|dd	�}|S(
u�
    Returns the services the local agent is managing

    :param consul_url: The Consul server URL.
    :return: Returns the services the local agent is managing

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_services

    uNo Consul URL found.umessageuresuagent/servicesR#R"R$R
uGET(RR-R.RR,(R#R$R'R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_services�s	


	cK@s�i}i}|sIt�}|sItjd�d|d<t|d<|Snd|krf|d|d<nd}td|d|d|d	d
d|�}|S(u
    Returns the members as seen by the local serf agent

    :param consul_url: The Consul server URL.
    :return: Returns the members as seen by the local serf agent

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_members

    uNo Consul URL found.umessageuresuwanu
agent/membersR#R"R$R
uGETR&(RR-R.RR,(R#R$R0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
agent_members�s$	


	cC@szi}i}|sIt�}|sItjd�d|d<t|d<|Snd}td|d|d|dd	d
|�}|S(u�
    Returns the local node configuration

    :param consul_url: The Consul server URL.
    :return: Returns the local node configuration

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_self

    uNo Consul URL found.umessageuresu
agent/selfR#R"R$R
uGETR&(RR-R.RR,(R#R$R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
agent_self�s 	


	cK@si}i}|sIt�}|sItjd�d|d<t|d<|Snd|krf|d|d<nd|d<t|d<|Sd|kr�|d|d<nd}td|d	|d
|ddd
|�}|dr�t|d<dj|d�|d<nt|d<d|d<|S(u�
    Manages node maintenance mode

    :param consul_url: The Consul server URL.
    :param enable: The enable flag is required.
                   Acceptable values are either true
                   (to enter maintenance mode) or
                   false (to resume normal operation).
    :param reason: If provided, its value should be a
                   text string explaining the reason for
                   placing the node into maintenance mode.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_maintenance enable='False' reason='Upgrade in progress'

    uNo Consul URL found.umessageuresuenableu'Required parameter "enable" is missing.ureasonuagent/maintenanceR#R"R$R
uPUTR&uAgent maintenance mode {0}ed.u,Unable to change maintenance mode for agent.(RR-R.RR,RR(R#R$R0R'R&R"tres((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_maintenances:	




	



cK@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<ndj|�}td|d|d	|d
dd|�}|dr�t|d<d
|d<nt|d<d|d<|S(u�
    Triggers the local agent to join a node

    :param consul_url: The Consul server URL.
    :param address: The address for the agent to connect to.
    :param wan: Causes the agent to attempt to join using the WAN pool.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_join address='192.168.1.1'

    uNo Consul URL found.umessageuresu'Required argument "address" is missing.uwanuagent/join/{0}R#R"R$R
uGETR&uAgent joined the clusteruUnable to join the cluster.(RR-R.RRRR,R(R#R$taddressR0R'R&R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
agent_joinUs2	


	




cC@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��ndj|�}td|d|d|d	d
d|�}|dr�t|d<dj|�|d<nt|d<d
j|�|d<|S(ua
    Used to instruct the agent to force a node into the left state.

    :param consul_url: The Consul server URL.
    :param node: The node the agent will force into left state
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_leave node='web1.example.com'

    uNo Consul URL found.umessageuresu$Required argument "node" is missing.uagent/force-leave/{0}R#R"R$R
uGETR&uNode {0} put in leave state.uUnable to change state for {0}.(RR-R.RRRR,R(R#R$tnodeR'R&R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_leave�s.	


	


cK@si}i}|sIt�}|sItjd�d|d<t|d<|Snd|krf|d|d<ntd��tgdD]}||kr|t^q|kr�d
|d<t|d<|Sd|kr�|d|d<nd
|kr�|d
|d<nd|kr>d|krd|d<t|d<|S|d|d<|d|d<nd|kr�d|krnd|d<t|d<|S|d|d<|d|d<nd	|kr�|d	|d<nd}td|d|d|ddd|�}|drt|d<dj|d�|d<nt|d<d|d<|S(uk
    The register endpoint is used to add a new check to the local agent.

    :param consul_url: The Consul server URL.
    :param name: The description of what the check is for.
    :param id: The unique name to use for the check, if not
               provided 'name' is used.
    :param notes: Human readable description of the check.
    :param script: If script is provided, the check type is
                   a script, and Consul will evaluate that script
                   based on the interval parameter.
    :param http: Check will perform an HTTP GET request against
                 the value of HTTP (expected to be a URL) based
                 on the interval parameter.
    :param ttl: If a TTL type is used, then the TTL update endpoint
                must be used periodically to update the state of the check.
    :param interval: Interval at which the check should run.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_check_register name='Memory Utilization' script='/usr/local/bin/check_mem.py' interval='15s'

    uNo Consul URL found.umessageuresunameuNameu$Required argument "name" is missing.uscriptuhttputtlu1Required parameter "script" or "http" is missing.uiduIDunotesuNotesuintervalu)Required parameter "interval" is missing.uScriptuIntervaluHTTPuTTLuagent/check/registerR#R"R$R
uPUTRuCheck {0} added to agent.uUnable to add check to agent.(uscriptuhttputtl(RR-R.RRRR,R(R#R$R0R'RR6R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_check_register�s`	


+





	



c	C@s�i}|sCt�}|sCtjd�d|d<t|d<|Sn|sXtd��ndj|�}td|d|d|d	d
�}|dr�t|d<dj|�|d<nt|d<d|d<|S(
u{
    The agent will take care of deregistering the check from the Catalog.

    :param consul_url: The Consul server URL.
    :param checkid: The ID of the check to deregister from Consul.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_check_deregister checkid='Memory Utilization'

    uNo Consul URL found.umessageuresu'Required argument "checkid" is missing.uagent/check/deregister/{0}R#R"R$R
uGETuCheck {0} removed from agent.u"Unable to remove check from agent.(RR-R.RRRR,R(R#R$tcheckidR'R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_check_deregisters*	


	



cK@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<ndj|�}td|d|d	|d
|dd�}|dr�t|d<d
j|�|d<nt|d<dj|�|d<|S(u2
    This endpoint is used with a check that is of the TTL type. When this
    is called, the status of the check is set to passing and the TTL
    clock is reset.

    :param consul_url: The Consul server URL.
    :param checkid: The ID of the check to mark as passing.
    :param note: A human-readable message with the status of the check.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_check_pass checkid='redis_check1' note='Forcing check into passing state.'

    uNo Consul URL found.umessageuresu'Required argument "checkid" is missing.unoteuagent/check/pass/{0}R#R"R$R&R
uGETuCheck {0} marked as passing.uUnable to update check {0}.(RR-R.RRRR,R(R#R$RLR0R'R&R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_check_pass0s2	


	


cK@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<ndj|�}td|d|d	|d
|dd�}|dr�t|d<d
j|�|d<nt|d<dj|�|d<|S(u9
    This endpoint is used with a check that is of the TTL type. When this
    is called, the status of the check is set to warning and the TTL
    clock is reset.

    :param consul_url: The Consul server URL.
    :param checkid: The ID of the check to deregister from Consul.
    :param note: A human-readable message with the status of the check.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_check_warn checkid='redis_check1' note='Forcing check into warning state.'

    uNo Consul URL found.umessageuresu'Required argument "checkid" is missing.unoteuagent/check/warn/{0}R#R"R$R&R
uGETuCheck {0} marked as warning.uUnable to update check {0}.(RR-R.RRRR,R(R#R$RLR0R'R&R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_check_warnas2	


	


cK@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<ndj|�}td|d|d	|d
|dd�}|dr�t|d<d
j|�|d<nt|d<dj|�|d<|S(u;
    This endpoint is used with a check that is of the TTL type. When this
    is called, the status of the check is set to critical and the
    TTL clock is reset.

    :param consul_url: The Consul server URL.
    :param checkid: The ID of the check to deregister from Consul.
    :param note: A human-readable message with the status of the check.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_check_fail checkid='redis_check1' note='Forcing check into critical state.'

    uNo Consul URL found.umessageuresu'Required argument "checkid" is missing.unoteuagent/check/fail/{0}R#R"R$R&R
uGETuCheck {0} marked as critical.uUnable to update check {0}.(RR-R.RRRR,R(R#R$RLR0R'R&R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_check_fail�s2	


	


cK@si}i}|sIt�}|sItjd�d|d<t|d<|Snt�}x-tj|�D]\}}|||j�<qbWd|kr�|d|d<ntd��d|kr�|d|d<nd	|kr�|d	|d
<nd|kr|d|d<nd
|kr@|d
}t	|t
�s3|g}n||d<nd|kr]|d|d<nd|kr�t�}	x1tj|d�D]\}}||	|j�<q�Wt}
t�}d|	kr�t}
|	d|d<nd|	kr�t}
|	d|d<nd|	kr|	d|d<nd|	kr5|	d|d<n|
rbd|krxd|d<t|d<|Snd|krx|d=n|dkr�||d<q�nd}td|d|d |d!d"d#|�}
|
dr�t|d<d$j
|d�|d<n!t|d<d%j
|d�|d<|S(&u�
    The used to add a new service, with an optional
    health check, to the local agent.

    :param consul_url: The Consul server URL.
    :param name: A name describing the service.
    :param address: The address used by the service, defaults
                    to the address of the agent.
    :param port: The port used by the service.
    :param id: Unique ID to identify the service, if not
               provided the value of the name parameter is used.
    :param tags: Identifying tags for service, string or list.
    :param script: If script is provided, the check type is
                   a script, and Consul will evaluate that script
                   based on the interval parameter.
    :param http: Check will perform an HTTP GET request against
                 the value of HTTP (expected to be a URL) based
                 on the interval parameter.
    :param check_ttl: If a TTL type is used, then the TTL update
                      endpoint must be used periodically to update
                      the state of the check.
    :param check_interval: Interval at which the check should run.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_service_register name='redis' tags='["master", "v1"]' address="127.0.0.1" port="8080" check_script="/usr/local/bin/check_redis.py" interval="10s"

    uNo Consul URL found.umessageuresunameuNameu$Required argument "name" is missing.uaddressuAddressuportuPortuiduIDutagsuTagsuenabletagoverrideuEnableTagOverrideucheckuscriptuScriptuhttpuHTTPuttluTTLuintervaluIntervalu)Required parameter "interval" is missing.iuCheckuagent/service/registerR#R"R$R
uPUTRu Service {0} registered on agent.uUnable to register service {0}.(RR-R.RtdictRt	iteritemstlowerRt
isinstancetlistRR,R(R#R$R0R'Rt	lc_kwargstktvt_tagstddtinterval_requiredtcheck_ddR"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_service_register�s� 	


	

	 	


	


cC@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��ndj|�}td|d|d|d	d
d|�}|dr�t|d<dj|�|d<nt|d<d
j|�|d<|S(u=
    Used to remove a service.

    :param consul_url: The Consul server URL.
    :param serviceid: A serviceid describing the service.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_service_deregister serviceid='redis'

    uNo Consul URL found.umessageuresu)Required argument "serviceid" is missing.uagent/service/deregister/{0}R#R"R$R
uPUTRuService {0} removed from agent.uUnable to remove service {0}.(RR-R.RRRR,R(R#R$t	serviceidR'RR"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_service_deregister5s.	


	


c	K@s+i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<nd|d<t|d<|Sd|kr�|d|d<ndj|�}td	|d
|d|d|�}|dr
t|d<d
j|�|d<nt|d<dj|�|d<|S(u
    Used to place a service into maintenance mode.

    :param consul_url: The Consul server URL.
    :param serviceid: A name of the service.
    :param enable: Whether the service should be enabled or disabled.
    :param reason: A human readable message of why the service was
                   enabled or disabled.
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.agent_service_deregister serviceid='redis' enable='True' reason='Down for upgrade'

    uNo Consul URL found.umessageuresu)Required argument "serviceid" is missing.uenableu'Required parameter "enable" is missing.ureasonuagent/service/maintenance/{0}R#R$R"R&u$Service {0} set in maintenance mode.u.Unable to set service {0} to maintenance mode.(RR-R.RRRR,R(R#R$R^R0R'R&R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytagent_service_maintenance`s>	




	



cK@si}|sCt�}|sCtjd�d|d<t|d<|Sni}d|krf|d|d<nd|kr�|d|d<nd|kr�|d|d	<ntd
��d|kr�|d|d
<nd|kr|dd&kr�d'|d<t|d<|S|d|d<nd|kr�|d}tj|�jd�rI|d }nt|�dksmt|�dkr�d(|d<t|d<|Sdj	|�|d<nd}t
d|d|d |d!d"d#|�}|dr�t|d<d$j	|d�|d<n!t|d<d%j	|d�|d<|S()u:
    Used to create a session.

    :param consul_url: The Consul server URL.
    :param lockdelay: Duration string using a "s" suffix for seconds.
                      The default is 15s.
    :param node: Must refer to a node that is already registered,
                 if specified. By default, the agent's own node
                 name is used.
    :param name: A human-readable name for the session
    :param checks: A list of associated health checks. It is highly
                   recommended that, if you override this list, you
                   include the default "serfHealth".
    :param behavior: Can be set to either release or delete. This controls
                     the behavior when a session is invalidated. By default,
                     this is release, causing any locks that are held to be
                     released. Changing this to delete causes any locks that
                     are held to be deleted. delete is useful for creating
                     ephemeral key/value entries.
    :param ttl: Session is invalidated if it is not renewed before
                the TTL expires
    :return: Boolean and message indicating success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.session_create node='node1' name='my-session' behavior='delete' ttl='3600s'

    uNo Consul URL found.umessageuresu	lockdelayu	LockDelayunodeuNodeunameuNameu$Required argument "name" is missing.uchecksutouchuTouchubehaviorudeleteureleaseuBehavior must be ueither delete or release.uBehavioruttlusi����iiuTTL must be ubetween 0 and 3600.u{0}suTTLusession/createR#R"R$R
uPUTRuCreated session {0}.uUnable to create session {0}.(udeleteurelease(uBehavior must be ueither delete or release.(uTTL must be ubetween 0 and 3600.(RR-R.RRRt	text_typetendswithtintRR,R(R#R$R0R'Rt_ttlR"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytsession_create�s^	






$

	


c		K@s�i}|sCt�}|sCtjd�d|d<t|d<|Sni}d|krf|d|d<nd}td|d|d|d	|�}|r�g}x#|d
D]}|j|d�q�W|S|S(u$
    Used to list sessions.

    :param consul_url: The Consul server URL.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :param return_list: By default, all information about the sessions is
                        returned, using the return_list parameter will return
                        a list of session IDs.
    :return: A list of all available sessions.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.session_list

    uNo Consul URL found.umessageuresudcusession/listR#R"R$R&udatauID(RR-R.RR,tappend(	R#R$R7R0R'R&R"t_listR6((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyR8�s,	


	c	K@s�i}|sCt�}|sCtjd�d|d<t|d<|Sn|sXtd��ni}d|kr{|d|d<ndj|�}td|d|d	|d
|�}|dr�t|d<dj|d�|d<n!t|d<d
j|d�|d<|S(u�
    Destroy session

    :param consul_url: The Consul server URL.
    :param session: The ID of the session to destroy.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :return: Boolean & message of success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.session_destroy session='c1c4d223-91cb-3d1f-1ee8-f2af9e7b6716'

    uNo Consul URL found.umessageuresu'Required argument "session" is missing.udcusession/destroy/{0}R#R"R$R&uCreated Service {0}.unameuUnable to create service {0}.(RR-R.RRRR,R(R#R$tsessionR0R'R&R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytsession_destroy$s0	


	


c	K@s�i}|sCt�}|sCtjd�d|d<t|d<|Sn|sXtd��ni}d|kr{|d|d<ndj|�}td|d|d	|d
|�}|S(u�
    Information about a session

    :param consul_url: The Consul server URL.
    :param session: The ID of the session to return information about.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :return: Boolean & message of success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.session_info session='c1c4d223-91cb-3d1f-1ee8-f2af9e7b6716'

    uNo Consul URL found.umessageuresu'Required argument "session" is missing.udcusession/info/{0}R#R"R$R&(RR-R.RRRR,(R#R$RhR0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytsession_infoTs&	


	c
K@si}i}i|d<|sSt�}|sStjd�d|d<t|d<|Snd|krp|d|d<nd|kr�|d|d<nd	|d<t|d<|Sd
|kr�t|d
t�r�|d
d}n
|d
}||d<nd
|d<t|d<|Sd|krbi|d<xE|dD]6}|dj|�r%|d|d|d|<q%q%Wnd|kr2i|d<|d|dd<d|kr�|d|dd<nd|kr�|d|dd<nd|kr�|d|dd<nd|kr2|d}t|t�s|g}n||dd<q2nd|krS|d|dd<nd|krt|d|dd<nd|kr�|d|dd<nd|kr�|d|dd <nd!|kr�|d!|dd"<nd#|kr�|d#|dd$<nd%|kr|d%|dd&<nd'|kr:|d'|dd'<nd(|kr[|d(|dd(<nd)|kr||d)|dd)<nd*|kr�|d*|dd*<nd+|kr�|d+|dd+<nd,|kr�i|d-<|d,|d-d.<d/|kr/|d/dFkrd4|d<t|d<|S|d/|d-d5<nd6|krP|d6|d-d7<nd8|krq|d8|d-d9<nd:|kr�|d:|d-d;<q�nd<}td=|d>|d?|d@dAdB|�}	|	dr�t|d<dCj	|d�|d<n!t|d<dDj	|d�|d<||dE<|S(GuV
    Registers a new node, service, or check

    :param consul_url: The Consul server URL.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :param node: The node to register.
    :param address: The address of the node.
    :param service: The service that will be registered.
    :param service_address: The address that the service listens on.
    :param service_port: The port for the service.
    :param service_id: A unique identifier for the service, if this is not
                       provided "name" will be used.
    :param service_tags: Any tags associated with the service.
    :param check: The name of the health check to register
    :param check_status: The initial status of the check,
                         must be one of unknown, passing, warning, or critical.
    :param check_service: The service that the check is performed against.
    :param check_id: Unique identifier for the service.
    :param check_notes: An opaque field that is meant to hold human-readable text.
    :return: Boolean & message of success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.catalog_register node='node1' address='192.168.1.1' service='redis' service_address='127.0.0.1' service_port='8080' service_id='redis_server1'

    uNodeMetauNo Consul URL found.umessageuresu
datacenteru
DatacenterunodeuNodeu+Required argument node argument is missing.uaddressiuAddressu.Required argument address argument is missing.u
ip_interfacesuTaggedAddressesuserviceuServiceuservice_addressuservice_portuPortu
service_iduIDuservice_tagsuTagsucpuuCpuunum_cpusuCpu_numumemuMemoryuoscodeuOsuosarchuOsarchukerneluKernelu
kernelreleaseu
Kernelreleaseu	localhostunodenameu	os_familyulsb_distrib_descriptionumasterucheckuCheckuNameucheck_statusuunknownupassinguwarningucriticalu<Check status must be unknown, passing, warning, or critical.uStatusu
check_serviceu	ServiceIDucheck_iduCheckIDucheck_notesuNotesucatalog/registerR#R"R$R
uPUTRu(Catalog registration for {0} successful.u$Catalog registration for {0} failed.udata(uunknownupassinguwarningucritical(
RR-R.RRTRURR,RR(
R#R$R0R'Rt_addressRWRYR"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytcatalog_register~s�
	









$




	



cK@sUi}i}|sIt�}|sItjd�d|d<t|d<|Snd|krf|d|d<nd|kr�|d|d<nd|d<t|d<|Sd	|kr�|d	|d
<nd|kr�|d|d<nd
}td|d|d|ddd|�}|dr0t|d<dj|d�|d<n!t|d<dj|d�|d<|S(u_
    Deregisters a node, service, or check

    :param consul_url: The Consul server URL.
    :param node: The node to deregister.
    :param datacenter: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :param checkid: The ID of the health check to deregister.
    :param serviceid: The ID of the service to deregister.
    :return: Boolean & message of success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.catalog_register node='node1' serviceid='redis_server1' checkid='redis_check1'

    uNo Consul URL found.umessageuresu
datacenteru
DatacenterunodeuNodeuNode argument required.ucheckiduCheckIDu	serviceidu	ServiceIDucatalog/deregisterR#R"R$R
uPUTRuCatalog item {0} removed.u!Removing Catalog item {0} failed.(RR-R.RR,RR(R#R$R0R'RR"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytcatalog_deregistersB	




	


cC@shi}|sCt�}|sCtjd�d|d<t|d<|Snd}td|d|d|�}|S(u�
    Return list of available datacenters from catalog.

    :param consul_url: The Consul server URL.
    :return: The list of available datacenters.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.catalog_datacenters

    uNo Consul URL found.umessageuresucatalog/datacentersR#R"R$(RR-R.RR,(R#R$R'R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytcatalog_datacenters]s	


	c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Snd|krf|d|d<nd}td|d|d|d	|�}|S(
uo
    Return list of available nodes from catalog.

    :param consul_url: The Consul server URL.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :return: The list of available nodes.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.catalog_nodes

    uNo Consul URL found.umessageuresudcu
catalog/nodesR#R"R$R&(RR-R.RR,(R#R$R0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
catalog_nodes{s"	


	c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Snd|krf|d|d<nd}td|d|d|d	|�}|S(
uw
    Return list of available services rom catalog.

    :param consul_url: The Consul server URL.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :return: The list of available services.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.catalog_services

    uNo Consul URL found.umessageuresudcucatalog/servicesR#R"R$R&(RR-R.RR,(R#R$R0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytcatalog_services�s"	


	c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<nd|kr�|d|d<ndj|�}td|d	|d
|d|�}|S(u�
    Information about the registered service.

    :param consul_url: The Consul server URL.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :param tag: Filter returned services with tag parameter.
    :return: Information about the requested service.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.catalog_service service='redis'

    uNo Consul URL found.umessageuresu'Required argument "service" is missing.udcutagucatalog/service/{0}R#R"R$R&(RR-R.RRRR,(R#R$tserviceR0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytcatalog_service�s*	


	c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<ndj|�}td|d|d	|d
|�}|S(u�
    Information about the registered node.

    :param consul_url: The Consul server URL.
    :param node: The node to request information about.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :return: Information about the requested node.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.catalog_service service='redis'

    uNo Consul URL found.umessageuresu$Required argument "node" is missing.udcucatalog/node/{0}R#R"R$R&(RR-R.RRRR,(R#R$RIR0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytcatalog_node�s&	


	c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<ndj|�}td|d|d	|d
|�}|S(u�
    Health information about the registered node.

    :param consul_url: The Consul server URL.
    :param node: The node to request health information about.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :return: Health information about the requested node.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.health_node node='node1'

    uNo Consul URL found.umessageuresu$Required argument "node" is missing.udcuhealth/node/{0}R#R"R$R&(RR-R.RRRR,(R#R$RIR0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pythealth_nodes&	


	c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<ndj|�}td|d|d	|d
|�}|S(u�
    Health information about the registered service.

    :param consul_url: The Consul server URL.
    :param service: The service to request health information about.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :return: Health information about the requested node.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.health_checks service='redis1'

    uNo Consul URL found.umessageuresu'Required argument "service" is missing.udcuhealth/checks/{0}R#R"R$R&(RR-R.RRRR,(R#R$RqR0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
health_checksCs&	


	c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<nd|kr�|d|d<nd|kr�|d|d<ndj|�}td	|d
|d|d|�}|S(
u�
    Health information about the registered service.

    :param consul_url: The Consul server URL.
    :param service: The service to request health information about.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :param tag: Filter returned services with tag parameter.
    :param passing: Filter results to only nodes with all
                    checks in the passing state.
    :return: Health information about the requested node.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.health_service service='redis1'

        salt '*' consul.health_service service='redis1' passing='True'

    uNo Consul URL found.umessageuresu'Required argument "service" is missing.udcutagupassinguhealth/service/{0}R#R"R$R&(RR-R.RRRR,(R#R$RqR0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pythealth_servicels.	


	c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|kr{|d|d<n|dkr�d|d<t|d<|Sdj|�}td
|d|d|d|�}|S(u�
    Returns the checks in the state provided on the path.

    :param consul_url: The Consul server URL.
    :param state: The state to show checks for. The supported states
                  are any, unknown, passing, warning, or critical.
                  The any state is a wildcard that can be used to
                  return all checks.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :return: The checks in the provided state.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.health_state state='redis1'

        salt '*' consul.health_state service='redis1' passing='True'

    uNo Consul URL found.umessageuresu%Required argument "state" is missing.udcuanyuunknownupassinguwarningucriticalu:State must be any, unknown, passing, warning, or critical.uhealth/state/{0}R#R"R$R&(uanyuunknownupassinguwarningucritical(RR-R.RRRR,(R#R$tstateR0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pythealth_state�s.	




	cC@shi}|sCt�}|sCtjd�d|d<t|d<|Snd}td|d|d|�}|S(u�
    Returns the current Raft leader

    :param consul_url: The Consul server URL.
    :return: The address of the Raft leader.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.status_leader

    uNo Consul URL found.umessageuresu
status/leaderR#R"R$(RR-R.RR,(R#R$R'R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
status_leader�s	


	cC@shi}|sCt�}|sCtjd�d|d<t|d<|Snd}td|d|d|�}|S(u
    Returns the current Raft peer set

    :param consul_url: The Consul server URL.
    :return: Retrieves the Raft peers for the
             datacenter in which the agent is running.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.status_peers

    uNo Consul URL found.umessageuresustatus/peersR#R"R$(RR-R.RR,(R#R$R'R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytstatus_peers�s	


	cK@s,i}i}|sIt�}|sItjd�d|d<t|d<|Snd|krf|d|d<ntd��d|kr�|d|d<nd	|kr�|d	|d
<nd}td|d
|d|ddd|�}|drt|d<dj|d�|d<n!t|d<dj|d�|d<|S(u1
    Create a new ACL token.

    :param consul_url: The Consul server URL.
    :param name: Meaningful indicator of the ACL's purpose.
    :param type: Type is either client or management. A management
                 token is comparable to a root user and has the
                 ability to perform any action including creating,
                 modifying, and deleting ACLs.
    :param rules: The Consul server URL.
    :return: Boolean & message of success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.acl_create

    uNo Consul URL found.umessageuresunameuNameu$Required argument "name" is missing.utypeuTypeurulesuRulesu
acl/createR#R$RR
uPUTR"uACL {0} created.u!Removing Catalog item {0} failed.(RR-R.RRR,RR(R#R$R0R'RR"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
acl_creates:	


	


cK@sai}i}|sIt�}|sItjd�d|d<t|d<|Snd|krf|d|d<nd|d<t|d<|Sd|kr�|d|d<ntd	��d
|kr�|d
|d<nd|kr�|d|d
<nd}td|d|d|ddd|�}|dr<t|d<dj|d�|d<n!t|d<dj|d�|d<|S(uf
    Update an ACL token.

    :param consul_url: The Consul server URL.
    :param name: Meaningful indicator of the ACL's purpose.
    :param id: Unique identifier for the ACL to update.
    :param type: Type is either client or management. A management
                 token is comparable to a root user and has the
                 ability to perform any action including creating,
                 modifying, and deleting ACLs.
    :param rules: The Consul server URL.
    :return: Boolean & message of success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.acl_update

    uNo Consul URL found.umessageuresuiduIDu#Required parameter "id" is missing.unameuNameu$Required argument "name" is missing.utypeuTypeurulesuRulesu
acl/updateR#R$RR
uPUTR"uACL {0} created.uAdding ACL {0} failed.(RR-R.RRR,RR(R#R$R0R'RR"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
acl_updateJsD	




	


cK@s�i}i}|sIt�}|sItjd�d|d<t|d<|Snd|krmd|d<t|d<|Sdj|d�}td|d|d	|d
dd|�}|dr�t|d<d
j|d�|d<n!t|d<dj|d�|d<|S(u6
    Delete an ACL token.

    :param consul_url: The Consul server URL.
    :param id: Unique identifier for the ACL to update.
    :return: Boolean & message of success or failure.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.acl_delete id='c1c4d223-91cb-3d1f-1ee8-f2af9e7b6716'

    uNo Consul URL found.umessageuresuidu#Required parameter "id" is missing.uacl/delete/{0}R#R$RR
uPUTR"uACL {0} deleted.uRemoving ACL {0} failed.(RR-R.RRR,R(R#R$R0R'RR"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
acl_delete�s4	




	


c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Snd|krmd|d<t|d<|Sdj|d�}td|d|d	d
d|�}|S(u;
    Information about an ACL token.

    :param consul_url: The Consul server URL.
    :param id: Unique identifier for the ACL to update.
    :return: Information about the ACL requested.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.acl_info id='c1c4d223-91cb-3d1f-1ee8-f2af9e7b6716'

    uNo Consul URL found.umessageuresuidu#Required parameter "id" is missing.uacl/info/{0}R#RR
uGETR"(RR-R.RRR,(R#R0R'RR"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytacl_info�s&	




	cK@si}i}|sIt�}|sItjd�d|d<t|d<|Snd|krmd|d<t|d<|Sdj|d�}td|d|d	|d
dd|�}|dr�t|d<d
j|d�|d<|d|d<n!t|d<dj|d�|d<|S(ue
    Information about an ACL token.

    :param consul_url: The Consul server URL.
    :param id: Unique identifier for the ACL to update.
    :return: Boolean, message of success or
             failure, and new ID of cloned ACL.

    CLI Example:

    .. code-block:: bash

        salt '*' consul.acl_info id='c1c4d223-91cb-3d1f-1ee8-f2af9e7b6716'

    uNo Consul URL found.umessageuresuidu#Required parameter "id" is missing.u
acl/clone/{0}R#R$RR
uPUTR"uACL {0} cloned.unameudatauIDuCloning ACLitem {0} failed.(RR-R.RRR,R(R#R$R0R'RR"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt	acl_clone�s6	




	


cK@s�i}i}|sIt�}|sItjd�d|d<t|d<|Snd|krmd|d<t|d<|Sd}td|d|d	|d
dd|�}|S(
u�
    List the ACL tokens.

    :param consul_url: The Consul server URL.
    :return: List of ACLs

    CLI Example:

    .. code-block:: bash

        salt '*' consul.acl_list

    uNo Consul URL found.umessageuresuidu#Required parameter "id" is missing.uacl/listR#R$RR
uPUTR"(RR-R.RR,(R#R$R0R'RR"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pytacl_list	s(	




	cK@sUi}i}|sIt�}|sItjd�d|d<t|d<|Sn|s^td��nd|krw|d}nd|kr�|d}nd|kr�|d}nd|kr�|d}nd	j|�}td
|d|d|d
dd|�}|dr0t|d<dj|�|d<|d|d<n!t|d<dj|d�|d<|S(u�
    List the ACL tokens.

    :param consul_url: The Consul server URL.
    :param name: The name of the event to fire.
    :param dc: By default, the datacenter of the agent is queried;
               however, the dc can be provided using the "dc" parameter.
    :param node: Filter by node name.
    :param service: Filter by service name.
    :param tag: Filter by tag name.
    :return: List of ACLs

    CLI Example:

    .. code-block:: bash

        salt '*' consul.event_fire name='deploy'

    uNo Consul URL found.umessageuresu$Required argument "name" is missing.udcunodeuserviceutaguevent/fire/{0}R#R$R&R
uPUTR"uEvent {0} fired.udatauCloning ACLitem {0} failed.uname(RR-R.RRRR,R(R#R$tnameR0R'R&R"RE((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
event_fire9	sB	






	


c	K@s�i}i}|sIt�}|sItjd�d|d<t|d<|Snd|krb|d}ntd��d}td|d|d	|d
|�}|S(u�
    List the recent events.

    :param consul_url: The Consul server URL.
    :param name: The name of the event to fire.
    :return: List of ACLs

    CLI Example:

    .. code-block:: bash

        salt '*' consul.event_list

    uNo Consul URL found.umessageuresunameu$Required argument "name" is missing.uevent/list/R#R$R&R"(RR-R.RRR,(R#R$R0R'R&R"((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt
event_listx	s$	



	(Gt__doc__t
__future__RRRR2tloggingtsalt.utils.httpRtsalt.utils.jsontsalt.extRtsalt.ext.six.movesRRt	getLoggert__name__R-tsalt.exceptionsRt__func_alias__t__virtualname__RR	RR,R1RRR?R@RARBRCRDRFRHRJRKRMRNRORPR]R_R`ReR8RiRjRlRmRnRoRpRrRsRtRuRvRxRyRzR{R|R}R~RR�R�R�(((s7/usr/lib/python2.7/site-packages/salt/modules/consul.pyt<module>s~
		
</@y=$!9/+X)111r+:[/0*�>%%,)))43:C0&0&?

Zerion Mini Shell 1.0