File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/client/ssh/wrapper/__pycache__/pillar.cpython-310.pyc
Back
o ;ji � @ s� d Z ddlZddlZddlZddlmZ zddlmZ W n e y+ ddl mZ Y nw ddefdd�Zd d � Zddd�Z efd d�Zddd�Ze ZeZdS )z) Extract the pillar data for this minion � N)�DEFAULT_TARGET_DELIM)�Mapping� Fc C sX |r t jj�t�� | i |�}t|t�r t|t�r t jj� ||�S t jj�t�� | ||�S )a� .. versionadded:: 0.14.0 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 ) �salt�utils�data�traverse_dict_and_list� __pillar__�value� isinstancer Z dictupdate�update)�key�default�merge� delimiter�ret� r �R/opt/saltstack/salt/lib/python3.10/site-packages/salt/client/ssh/wrapper/pillar.py�get s %��r c G s4 i }| D ]}zt | ||<