%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/runners/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/runners/git_pillar.pyo

�
���^c@@sxdZddlmZmZmZddlZddlZddlZddl	m
Z
eje�Z
ddd�ZdS(u:
Runner module to directly manage the git external pillar
i(tabsolute_importtprint_functiontunicode_literalsN(tSaltRunnerErrorc

C@s�i}xStjdg�D]?}tt|��}|dkrCqn||}tjjjt|dtjj	j
dtjj	jdtjj	j�}x�|j
D]�}|dk	r�||jkr�q�q�n|dk	r�||jkr�q�q�nzOy|j�}Wn8tk
r7}	tjd|	|jdtj�t}nXWd|j�X|||j<q�WqW|s�|dk	sz|dk	r�td	��q�td
��n|S(u�
    .. versionadded:: 2014.1.0

    .. versionchanged:: 2015.8.4
        This runner function now supports the :ref:`git_pillar
        configuration schema <git-pillar-configuration>` introduced in
        2015.8.0. Additionally, the branch and repo can now be omitted to
        update all git_pillar remotes. The return data has also changed to
        a dictionary. The values will be ``True`` only if new commits were
        fetched, and ``False`` if there were errors or no new commits were
        fetched.

    .. versionchanged:: 2018.3.0
        The return for a given git_pillar remote will now be ``None`` when no
        changes were fetched. ``False`` now is reserved only for instances in
        which there were errors.

    Fetch one or all configured git_pillar remotes.

    .. note::
        This will *not* fast-forward the git_pillar cachedir on the master. All
        it does is perform a ``git fetch``. If this runner is executed with
        ``-l debug``, you may see a log message that says that the repo is
        up-to-date. Keep in mind that Salt automatically fetches git_pillar
        repos roughly every 60 seconds (or whatever
        :conf_master:`loop_interval` is set to). So, it is possible that the
        repo was fetched automatically in the time between when changes were
        pushed to the repo, and when this runner was executed. When in doubt,
        simply refresh pillar data using :py:func:`saltutil.refresh_pillar
        <salt.modules.saltutil.refresh_pillar>` and then use
        :py:func:`pillar.item <salt.modules.pillar.item>` to check if the
        pillar data has changed as expected.

    CLI Example:

    .. code-block:: bash

        # Update specific branch and repo
        salt-run git_pillar.update branch='branch' repo='https://foo.com/bar.git'
        # Update all repos
        salt-run git_pillar.update
        # Run with debug logging
        salt-run git_pillar.update -l debug
    u
ext_pillarugittper_remote_overridestper_remote_onlytglobal_onlyu;Exception '%s' caught while fetching git_pillar remote '%s'texc_info_on_loglevelNu8Specified git branch/repo not found in ext_pillar configu$No git_pillar remotes are configured(t__opts__tgettnexttitertsalttutilstgitfst	GitPillartpillart
git_pillartPER_REMOTE_OVERRIDEStPER_REMOTE_ONLYtGLOBAL_ONLYtremotestNonetbranchturltfetcht	ExceptiontlogterrortidtloggingtDEBUGtFalset
clear_lockR(
Rtrepotrett
ext_pillartpillar_typetpillar_confRtremotetresulttexc((s;/usr/lib/python2.7/site-packages/salt/runners/git_pillar.pytupdatesH-
		
(t__doc__t
__future__RRRRtsalt.pillar.git_pillarRtsalt.utils.gitfstsalt.exceptionsRt	getLoggert__name__RRR*(((s;/usr/lib/python2.7/site-packages/salt/runners/git_pillar.pyt<module>s

Zerion Mini Shell 1.0