%PDF- %PDF-
Mini Shell

Mini Shell

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

�
���^c@@s[dZddlmZmZmZddlZddlZddlZddl	Zddl
ZddlZddlZddl
ZddlmZmZddlmamamZmZmZddlmZyddlZWnek
r�ddlZnXddlZeje �Z!dZ"d�Z#d	d
�Z$d�Ze%d�Zd	d
�Z&dS(u�
Module to manage Windows software repo on a Standalone Minion

``file_client: local`` must be set in the minion config file.

For documentation on Salt's Windows Repo feature, see :ref:`here
<windows-package-manager>`.
i(tabsolute_importtunicode_literalstprint_functionN(tCommandExecutionErrortSaltRenderError(tgenrepotupdate_git_repostPER_REMOTE_OVERRIDEStPER_REMOTE_ONLYtGLOBAL_ONLY(tsixuwinrepocC@sVtjjj�rLtjjjtt��atjjjtt��at	St
dfS(u5
    Set the winrepo module if the OS is Windows
    u"This module only works on Windows.(tsalttutilstplatformt
is_windowst	functoolstnamespaced_functiont_genrepotglobalst_update_git_repost__virtualname__tFalse(((s8/usr/lib/python2.7/site-packages/salt/modules/winrepo.pyt__virtual__0s
ubasecC@svtd}g}|jtjj�|jddg�|j|�|j|djd�jd��tj	j
|�S(Nuwinrepo_source_diruminionufilesiu/(t__opts__tappendRtsyspathst	CACHE_DIRtextendtstriptsplittostseptjoin(tsaltenvtwinrepo_source_dirtdirs((s8/usr/lib/python2.7/site-packages/salt/modules/winrepo.pyt_get_local_repo_dir=s

#cC@stdtdt�S(u�
    Generate winrepo_cachefile based on sls files in the winrepo_dir

    CLI Example:

    .. code-block:: bash

        salt-call winrepo.genrepo
    toptst
fire_event(RRR(((s8/usr/lib/python2.7/site-packages/salt/modules/winrepo.pyRGs
cC@s=tjjjd�s$td��ntdtd|dt�S(u�
    Checkout git repos containing :ref:`Windows Software Package Definitions
    <windows-package-manager>`.

    .. important::
        This function requires `Git for Windows`_ to be installed in order to
        work. When installing, make sure to select an installation option which
        permits the git executable to be run from the Command Prompt.

    .. _`Git for Windows`: https://git-for-windows.github.io/

    clean : False
        Clean repo cachedirs which are not configured under
        :conf_minion:`winrepo_remotes`.

        .. note::
            This option only applies if either pygit2_ or GitPython_ is
            installed into Salt's bundled Python.

        .. warning::
            This argument should not be set to ``True`` if a mix of git and
            non-git repo definitions are being used, as it will result in the
            non-git repo definitions being removed.

        .. versionadded:: 2015.8.0

        .. _GitPython: https://github.com/gitpython-developers/GitPython
        .. _pygit2: https://github.com/libgit2/pygit2

    CLI Example:

    .. code-block:: bash

        salt-call winrepo.update_git_repos
    ugitu\Git for Windows is not installed, or not configured to be accessible from the Command PromptR%tcleant
masterless(RRtpathtwhichRRRtTrue(R'((s8/usr/lib/python2.7/site-packages/salt/modules/winrepo.pyRTs$cC@setjj|�r|}n�t|�}|jd�}|jd�}|j|�djtjj|��}tjj|�s�djtjj|��}tjj|�s�dj|�Snt	j
jtt
�}i}y.t	jj||tdtdtd�}WnYtk
r`}tjd	|�tjd
|�dj|�|d<d
j|�|d<nX|S(u
    .. versionadded:: 2015.8.0

    Display the rendered software definition from a specific sls file in the
    local winrepo cache. This will parse all Jinja. Run pkg.refresh_db to pull
    the latest software definitions from the master.

    .. note::
        This function does not ask a master for an sls file to render. Instead
        it directly processes the file specified in `name`

    Args:
        name str: The name/path of the package you want to view. This can be the
        full path to a file on the minion file system or a file on the local
        minion cache.

        saltenv str: The default environment is ``base``

    Returns:
        dict: Returns a dictionary containing the rendered data structure

    .. note::
        To use a file from the minion cache start from the local winrepo root
        (``C:\salt\var\cache\salt\minion\files\base\win\repo-ng``). If you have
        ``.sls`` files organized in subdirectories you'll have to denote them
        with ``.``. For example, if you have a ``test`` directory in the winrepo
        root with a ``gvim.sls`` file inside, would target that file like so:
        ``test.gvim``. Directories can be targeted as well as long as they
        contain an ``init.sls`` inside. For example, if you have a ``node``
        directory with an ``init.sls`` inside, target that like so: ``node``.

    CLI Example:

    .. code-block:: bash

        salt '*' winrepo.show_sls gvim
        salt '*' winrepo.show_sls test.npp
        salt '*' winrepo.show_sls C:\test\gvim.sls
    u\u.u{0}.slsu{0}\init.slsu!Software definition {0} not foundurendererurenderer_blacklisturenderer_whitelistuFailed to compile %s.u
Error: %s.uFailed to compile {0}uMessageu{0}uError(RR)texistsR$RRtformatRR RtloadertrenderRt__salt__ttemplatetcompile_templateRtlogtdebug(tnameR!tsls_filetrepot
definitiont	rendererstconfigtexc((s8/usr/lib/python2.7/site-packages/salt/modules/winrepo.pytshow_sls�s4)	
	('t__doc__t
__future__RRRtloggingRtsalt.outputRtsalt.utils.functoolstsalt.utils.pathtsalt.utils.platformtsalt.loadert
salt.templatetsalt.exceptionsRRtsalt.runners.winrepoRRRRRRR	tsalt.extR
tmsgpacktImportErrortmsgpack_puretsalt.utils.gitfst	getLoggert__name__R3RRR$RR<(((s8/usr/lib/python2.7/site-packages/salt/modules/winrepo.pyt<module>	s0(
	

	
,

Zerion Mini Shell 1.0