%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@s�dZddlmZmZmZddlmZyddlZeZ	Wne
k
raeZ	nXidd6Zdd�Zdd�Zd	�ZdS(
u�
Consul sdb Module

:maintainer:    SaltStack
:maturity:      New
:platform:      all

This module allows access to Consul using an ``sdb://`` URI

Like all sdb modules, the Consul module requires a configuration profile to
be configured in either the minion or master configuration file. This profile
requires very little. For example:

.. code-block:: yaml

    myconsul:
      driver: consul
      host: 127.0.0.1
      port: 8500
      token: b6376760-a8bb-edd5-fcda-33bc13bfc556
      scheme: http
      consistency: default
      dc: dev
      verify: True

The ``driver`` refers to the Consul module, all other options are optional.
For option details see: https://python-consul.readthedocs.io/en/latest/#consul
i(tabsolute_importtprint_functiontunicode_literals(tCommandExecutionErrorNusetuset_cC@s)|s
tSt|�}|jj||�S(N(tFalsetget_conntkvtput(tkeytvaluetprofiletconn((s3/usr/lib/python2.7/site-packages/salt/sdb/consul.pytset_.scC@s@|s
tSt|�}|jj|�\}}|r<|dSdS(NuValue(RRRtgettNone(RR
Rt_tresult((s3/usr/lib/python2.7/site-packages/salt/sdb/consul.pyR
7s
cC@sWi}x+d
D]#}||kr
||||<q
q
WtrGtj|�Std��d	S(u5
    Return a client object for accessing consul
    uhostuportutokenuschemeuconsistencyudcuverifyuY(unable to import consul, module most likely not installed. PLease install python-consul)N(uhostuportutokenuschemeuconsistencyudcuverify(t
HAS_CONSULtconsultConsulR(R
tparamsR((s3/usr/lib/python2.7/site-packages/salt/sdb/consul.pyRBs

(t__doc__t
__future__RRRtsalt.exceptionsRRtTrueRtImportErrorRt__func_alias__RRR
R(((s3/usr/lib/python2.7/site-packages/salt/sdb/consul.pyt<module>s



	

Zerion Mini Shell 1.0