%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/modules/ |
Current File : //lib/python2.7/site-packages/salt/modules/sdb.pyc |
� ���^c @@ si d Z d d l m Z m Z m Z d d l Z i d d 6Z d � Z d � Z d � Z d d d � Z d S( uc Module for Manipulating Data via the Salt DB API ================================================ i ( t absolute_importt unicode_literalst print_functionNu setu set_c C@ s t j j j | t t � S( u Get a value from a db, using a uri in the form of sdb://<profile>/<key>. If the uri provided does not start with sdb://, then it will be returned as-is. CLI Example: .. code-block:: bash salt '*' sdb.get sdb://mymemcached/foo ( t saltt utilst sdbt sdb_gett __opts__t __utils__( t uri( ( s4 /usr/lib/python2.7/site-packages/salt/modules/sdb.pyt get s c C@ s t j j j | | t t � S( u' Set a value in a db, using a uri in the form of ``sdb://<profile>/<key>``. If the uri provided does not start with ``sdb://`` or the value is not successfully set, return ``False``. CLI Example: .. code-block:: bash salt '*' sdb.set sdb://mymemcached/foo bar ( R R R t sdb_setR R ( R t value( ( s4 /usr/lib/python2.7/site-packages/salt/modules/sdb.pyt set_ s c C@ s t j j j | t t � S( u/ Delete a value from a db, using a uri in the form of ``sdb://<profile>/<key>``. If the uri provided does not start with ``sdb://`` or the value is not successfully deleted, return ``False``. CLI Example: .. code-block:: bash salt '*' sdb.delete sdb://mymemcached/foo ( R R R t sdb_deleteR R ( R ( ( s4 /usr/lib/python2.7/site-packages/salt/modules/sdb.pyt delete. s i u2 abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)c C@ s t j j j | t | | t � S( u� Perform a one-time generation of a hash and write it to sdb. If that value has already been set return the value instead. This is useful for generating passwords or keys that are specific to multiple minions that need to be stored somewhere centrally. State Example: .. code-block:: yaml some_mysql_user: mysql_user: - present - host: localhost - password: '{{ salt['sdb.get_or_set_hash']('some_mysql_user_pass') }}' CLI Example: .. code-block:: bash salt '*' sdb.get_or_set_hash 'SECRET_KEY' 50 .. warning:: This function could return strings which may contain characters which are reserved as directives by the YAML parser, such as strings beginning with ``%``. To avoid issues when using the output of this function in an SLS file containing YAML+Jinja, surround the call with single quotes. ( R R R t sdb_get_or_set_hashR R ( R t lengtht chars( ( s4 /usr/lib/python2.7/site-packages/salt/modules/sdb.pyt get_or_set_hash= s !( t __doc__t __future__R R R t salt.utils.sdbR t __func_alias__R R R R ( ( ( s4 /usr/lib/python2.7/site-packages/salt/modules/sdb.pyt <module> s