%PDF- %PDF-
Direktori : /usr/lib/python2.7/site-packages/salt/cache/ |
Current File : //usr/lib/python2.7/site-packages/salt/cache/etcd_cache.pyc |
� ���^c @@ s d Z d d l m Z m Z m Z d d l Z d d l Z y d d l Z e Z Wn e k ri e Z n Xd d l m Z d Z e r� e j j e j � n e j e � Z d a d a d Z i d d 6Z d � Z d � Z d � Z d � Z d d � Z d � Z d � Z d � Z! d S( u Minion data cache plugin for Etcd key/value data store. .. versionadded:: develop It is up to the system administrator to set up and configure the Etcd infrastructure. All is needed for this plugin is a working Etcd agent with a read-write access to the key-value store. The related documentation can be found in the `Etcd documentation`_. To enable this cache plugin, the master will need the python client for Etcd installed. This can be easily installed with pip: .. code-block: bash pip install python-etcd Optionally, depending on the Etcd agent configuration, the following values could be set in the master config. These are the defaults: .. code-block:: yaml etcd.host: 127.0.0.1 etcd.port: 2379 etcd.protocol: http etcd.allow_reconnect: True etcd.allow_redirect: False etcd.srv_domain: None etcd.read_timeout: 60 etcd.username: None etcd.password: None etcd.cert: None etcd.ca_cert: None Related docs could be found in the `python-etcd documentation`_. To use the etcd as a minion data cache backend, set the master ``cache`` config value to ``etcd``: .. code-block:: yaml cache: etcd .. _`Etcd documentation`: https://github.com/coreos/etcd .. _`python-etcd documentation`: http://python-etcd.readthedocs.io/en/latest/ i ( t absolute_importt print_functiont unicode_literalsN( t SaltCacheErroru /salt_cacheu etcdu listu lsc C@ s t s t d f St S( u8 Confirm that python-etcd package is installed. u@ Please install python-etcd package to use etcd data cache driver( t HAS_ETCDt Falset __virtualname__( ( ( s9 /usr/lib/python2.7/site-packages/salt/cache/etcd_cache.pyt __virtual__O s c C@ s� t d k r d Si t j d d � d 6t j d d � d 6t j d d � d 6t j d t � d 6t j d t � d 6t j d d � d 6t j d d � d 6t j d d � d 6t j d d � d 6t j d d � d 6t j d d � d 6} t j d t � a t d k r d j t j d � � a n t j d | � t j | � a y t j t � Wn: t j k r�t j d! t � t j t d d"