%PDF- %PDF-
| Direktori : /lib/python2.7/site-packages/salt/client/ssh/wrapper/ |
| Current File : //lib/python2.7/site-packages/salt/client/ssh/wrapper/pillar.pyo |
�
���^c @@ s� d Z d d l m Z m Z d d l Z d d l Z d d l Z d d l Z d d l m
Z
d e e
d � Z d � Z
d d � Z e
d � Z e Z e Z d S(
s)
Extract the pillar data for this minion
i ( t absolute_importt print_functionN( t DEFAULT_TARGET_DELIMt c C@ s} | ra t j j j t | i | � } t | t j � ra t | t j � ra t j j j | | � Sn t j j j t | | | � S( s�
.. versionadded:: 0.14
Attempt to retrieve the named value from pillar, if the named value is not
available return the passed default. The default return is an empty string.
If the merge parameter is set to ``True``, the default will be recursively
merged into the returned pillar data.
The value can also represent a value in a nested dict using a ":" delimiter
for the dict. This means that if a dict in pillar looks like this::
{'pkg': {'apache': 'httpd'}}
To retrieve the value associated with the apache key in the pkg dict this
key can be passed::
pkg:apache
merge
Specify whether or not the retrieved values should be recursively
merged into the passed default.
.. versionadded:: 2015.5.0
delimiter
Specify an alternate delimiter to use when traversing a nested dict
.. versionadded:: 2015.5.0
CLI Example:
.. code-block:: bash
salt '*' pillar.get pkg:apache
(
t saltt utilst datat traverse_dict_and_listt
__pillar__t
isinstancet collectionst Mappingt
dictupdatet update( t keyt defaultt merget delimitert ret( ( sB /usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/pillar.pyt get s %c G@ sA i } x4 | D], } y t | | | <Wq
t k
r8 q
Xq
W| S( s�
.. versionadded:: 0.16.2
Return one or more pillar entries
CLI Examples:
.. code-block:: bash
salt '*' pillar.item foo
salt '*' pillar.item foo bar baz
( R t KeyError( t argsR t arg( ( sB /usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/pillar.pyt itemC s
c C@ s% | r t j | i � } n t } | S( sY
Return the raw pillar data that is available in the module. This will
show the pillar as it is loaded as the __pillar__ dict.
CLI Example:
.. code-block:: bash
salt '*' pillar.raw
With the optional key argument, you can select a subtree of the
pillar raw data.::
salt '*' pillar.raw key='roles'
( R R ( R R ( ( sB /usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/pillar.pyt rawY s c C@ ss t j j j t | t | � } | t k rB t d j | � � � n t | t � si t d j | � � � n | j
� S( s�
.. versionadded:: 2015.8.0
Attempt to retrieve a list of keys from the named value from the pillar.
The value can also represent a value in a nested dict using a ":" delimiter
for the dict, similar to how pillar.get works.
delimiter
Specify an alternate delimiter to use when traversing a nested dict
CLI Example:
.. code-block:: bash
salt '*' pillar.keys web:sites
s Pillar key not found: {0}s% Pillar value in key {0} is not a dict( R R R R R R t formatR t dictt
ValueErrort keys( R R R ( ( sB /usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/pillar.pyR q s ( t __doc__t
__future__R R R
t salt.pillarR t salt.utils.datat salt.utils.dictupdatet
salt.defaultsR t FalseR R t NoneR R t itemsR ( ( ( sB /usr/lib/python2.7/site-packages/salt/client/ssh/wrapper/pillar.pyt <module> s 2