%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/modules/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/modules/chocolatey.pyc

�
���^c@@s4dZddlmZmZmZddlZddlZddlZddlZddl	m
Z
ddlZddl
ZddlmZddlmZmZmZeje�Zidd6Zd	�Zd
�Zd�Zd�Zd
�Zd�Zed�Z deedeed�Z"d�Z#d�Z$ddeedeededd�
Z%ded�Z&dded�Z'ddd�Z(dded�Z)d�Z*ded�Z+dded�Z,ddeedeedd�Z-ded�Z.eded�Z/ddd�Z0d�Z1d �Z2d!�Z3dS("u{
A dead simple module wrapping calls to the Chocolatey package manager
(http://chocolatey.org)

.. versionadded:: 2014.1.0
i(tabsolute_importtprint_functiontunicode_literalsN(tCaseInsensitiveDict(tLooseVersion(tCommandExecutionErrortCommandNotFoundErrortSaltInvocationErrorulistulist_cC@s:tjjj�stdfStddkr6tdfSdS(uU
    Confirm this module is on a Windows system running Vista or later.

    While it is possible to make Chocolatey run under XP and Server 2003 with
    an awful lot of hassle (e.g. SSL is completely broken), the PowerShell shim
    for simulating UAC forces a GUI prompt, and is not compatible with
    salt-minion running as SYSTEM.
    u:Cannot load module chocolatey: Chocolatey requires Windowsu	osreleaseuXPu
2003ServeruICannot load module chocolatey: Chocolatey requires Windows Vista or lateru
chocolatey(uXPu
2003Server(tsalttutilstplatformt
is_windowstFalset
__grains__(((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt__virtual__ s
	

cC@s,x%d�tD�D]}tj|�qWdS(uu
    Clear variables stored in __context__. Run this function when a new version
    of chocolatey is installed.
    cs@s$|]}|jd�r|VqdS(uchocolatey.N(t
startswith(t.0tx((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pys	<genexpr>9sN(t__context__tpop(tvar((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt_clear_context4scC@sSdtkrtdStt��td�kr;dg}ng}|td<tdS(uT
    Returns ['--yes'] if on v0.9.9.0 or later, otherwise returns an empty list
    uchocolatey._yesu0.9.9u--yes(Rt
_LooseVersiontchocolatey_version(tanswer((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt_yes=s
cC@s`dtkrtdStt��td�kr;dg}ntjd�g}|td<tdS(u_
    Returns ['--no-progress'] if on v0.10.4 or later, otherwise returns an
    empty list
    uchocolatey._no_progressu0.10.4u
--no-progressu+--no-progress unsupported in choco < 0.10.4(RRRtlogtwarning(R((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt_no_progressKs

cC@s�dtkrtdStdd�}|r<|td<tdStjjtjjd�ddd�tjjtjjd�ddd�g}x2|D]*}tjj|�r�|td<tdSq�Wd	}t|��d
S(u>
    Returns the full path to chocolatey.bat on the host.
    uchocolatey._pathu	cmd.whichuchocolatey.exeuProgramDatau
ChocolateyubinuSystemDriveuchocolatey.batu]Chocolatey not installed. Use chocolatey.bootstrap to install the Chocolatey package manager.N(	Rt__salt__tostpathtjointenvirontgettisfileR(t	choc_patht
choc_defaultstchoc_exeterr((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt_find_chocolatey[s
$*

cC@sUdtkrtdSt�g}|jd�td|dt�}|td<tdS(u�
    Returns the version of Chocolatey installed on the minion.

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.chocolatey_version
    uchocolatey._versionu-vucmd.runtpython_shell(RR(tappendRR(tcmdtout((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyRxs


cC@sy
t�}Wntk
r&d }nX|rA|rAdj|�Sidd!6dd"6dd#6d	d$6}d
}tj�}d}td|�sEtd
tdf|kr0|td
tdf}tj	j
|d�}td||�|ddg}td|dt�}	|	ddkrBd}
t|
��qBqEd}
t|
��ntj	j
|d�}td||�|ddg}td|dt�}	|	ddkr�d}
t|
��ndj|�}td|dt
�}	|	ddkrdj|	d�}
t|
��n|	dS(%u�
    Download and install the latest version of the Chocolatey package manager
    via the official bootstrap.

    Chocolatey requires Windows PowerShell and the .NET v4.0 runtime. Depending
    on the host's version of Windows, chocolatey.bootstrap will attempt to
    ensure these prerequisites are met by downloading and executing the
    appropriate installers from Microsoft.

    Note that if PowerShell is installed, you may have to restart the host
    machine for Chocolatey to work.

    force
        Run the bootstrap process even if Chocolatey is found in the path.

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.bootstrap
        salt '*' chocolatey.bootstrap force=True
    uChocolatey found at {0}umhttp://download.microsoft.com/download/A/7/5/A75BC017-63CE-47D6-8FA4-AFB5C21BAC54/Windows6.0-KB968930-x86.msuuVistaux86umhttp://download.microsoft.com/download/3/C/8/3C8CF51E-1D9D-4DAA-AAEA-5C48D1CD055C/Windows6.0-KB968930-x64.msuuAMD64umhttp://download.microsoft.com/download/F/9/E/F9EF6ACB-2BA8-4845-9C10-85FC4A69B207/Windows6.0-KB968930-x86.msuu
2008Serverumhttp://download.microsoft.com/download/2/8/6/28686477-3242-4E96-9009-30B16BED89AF/Windows6.0-KB968930-x64.msuukhttp://download.microsoft.com/download/1/B/E/1BE39E79-7E39-46A3-96FF-047F95396215/dotNetFx40_Full_setup.exeu9C:\Windows\SYSTEM32\WindowsPowerShell\v1.0\powershell.exeucmd.has_execu	osreleaseucpuarchupowershell.exeu
cp.get_urlu/quietu
/norestartucmd.run_allR)uretcodeiumInstalling Windows PowerShell failed. Please run the installer GUI on the host to get a more specific reason.uWindows PowerShell not foundudotnet4.exeu/qudInstalling .NET v4.0 failed. Please run the installer GUI on the host to get a more specific reason.u�{0} -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\binu$Bootstrapping Chocolatey failed: {0}ustderrustdoutN(uVistaux86(uVistauAMD64(u
2008Serverux86(u
2008ServeruAMD64(R(RtNonetformatttempfilet
gettempdirRR
RRR RRtTrue(tforceR$tps_downloadstnet4_urlttemp_dirtps_pathturltdestR+tresultR'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt	bootstrap�sP





	cC@s�t�}|dg}|r+|j|�ntjjj|�rP|jd�ntjjj|�ru|jd�n|r�|jd|g�n|r�|jd�n|r�|jd�n|jd�td|d	t�}|d
dkrd
j	|d�}	t
|	��nti�}
tj
d�}x�|djd�D]u}|jd�rZ|
SxY|j|�D]H\}
}d|
kr�qjn|
|
kr�g|
|
<n|
|
j|�qjWqAW|
S(u]
    Instructs Chocolatey to pull a vague package list from the repository.

    Args:

        narrow (str):
            Term used to narrow down results. Searches against
            name/description/tag. Default is None.

        all_versions (bool):
            Display all available package versions in results. Default is False.

        pre_versions (bool):
            Display pre-release packages in results. Default is False.

        source (str):
            Chocolatey repository (directory, share or remote URL feed) the
            package comes from. Defaults to the official Chocolatey feed if
            None is passed. Default is None.

        local_only (bool):
            Display packages only installed locally. Default is False.

        exact (bool):
            Display only packages that match ``narrow`` exactly. Default is
            False.

            .. versionadded:: 2017.7.0

    Returns:
        dict: A dictionary of results.

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.list <narrow>
        salt '*' chocolatey.list <narrow> all_versions=True
    ulistu
--allversionsu--prereleaseu--sourceu--local-onlyu--exactu--limit-outputucmd.run_allR)uretcodeiiuRunning chocolatey failed: {0}ustdoutu(\S+)\|(\S+)u
uNo packagesu
chocolatey(ii(R(R*RR	tdatatis_truetextendRRR.RRtretcompiletsplitRtfindall(tnarrowtall_versionstpre_versionstsourcet
local_onlytexactR$R+R9R'trettpkg_retlinetnametver((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytlist_�s>-	

cC@skt�}|dddg}td|dt�}|ddkrcdj|d	�}t|��n|d	S(
u�
    Instructs Chocolatey to pull a full package list from the Microsoft Web PI
    repository.

    Returns:
        str: List of webpi packages

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.list_webpi
    ulistu--sourceuwebpiucmd.run_allR)uretcodeiuRunning chocolatey failed: {0}ustdout(R(RRR.R(R$R+R9R'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt
list_webpiEs	cC@skt�}|dddg}td|dt�}|ddkrcdj|d	�}t|��n|d	S(
u(
    Instructs Chocolatey to pull a full package list from the Windows Features
    list, via the Deployment Image Servicing and Management tool.

    Returns:
        str: List of Windows Features

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.list_windowsfeatures
    ulistu--sourceuwindowsfeaturesucmd.run_allR)uretcodeiuRunning chocolatey failed: {0}ustdout(R(RRR.R(R$R+R9R'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytlist_windowsfeatures^s	cC@s�|r|	rtd��nt�}|d|g}|rO|jd|g�n|rk|jd|g�ntjjj|�r�|jd�ntjjj|�r�|jd�n|r�|jd|g�n|r�|jd�n|r�|jd	�n|r|jd
|g�n|	r/|jd�n|
rK|jd|
g�n|jt��|jt	��t
d
|dt�}
|
ddkr�dj|
d�}t
|��n|dkr�t�n|
dS(u7	
    Instructs Chocolatey to install a package.

    Args:

        name (str):
            The name of the package to be installed. Only accepts a single
            argument. Required.

        version (str):
            Install a specific version of the package. Defaults to latest
            version. Default is None.

        source (str):
            Chocolatey repository (directory, share or remote URL feed) the
            package comes from. Defaults to the official Chocolatey feed.
            Default is None.

            Alternate Sources:

            - cygwin
            - python
            - ruby
            - webpi
            - windowsfeatures

        force (bool):
            Reinstall the current version of an existing package. Do not use
            with ``allow_multiple``. Default is False.

        pre_versions (bool):
            Include pre-release packages. Default is False.

        install_args (str):
            A list of install arguments you want to pass to the installation
            process i.e product key or feature list. Default is None.

        override_args (bool):
            Set to true if you want to override the original install arguments
            (for the native installer) in the package and use your own. When
            this is set to False install_args will be appended to the end of the
            default arguments. Default is None.

        force_x86 (bool):
            Force x86 (32bit) installation on 64 bit systems. Default is False.

        package_args (str):
            Arguments you want to pass to the package. Default is None.

        allow_multiple (bool):
            Allow multiple versions of the package to be installed. Do not use
            with ``force``. Does not work with all packages. Default is False.

            .. versionadded:: 2017.7.0

        execution_timeout (str):
        Chocolatey execution timeout value you want to pass to the installation process. Default is None.

            .. versionadded:: 2018.3.0

    Returns:
        str: The output of the ``chocolatey`` command

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.install <package name>
        salt '*' chocolatey.install <package name> version=<package version>
        salt '*' chocolatey.install <package name> install_args=<args> override_args=True
    u7Cannot use 'force' in conjunction with 'allow_multiple'uinstallu	--versionu--sourceu--forceu--prereleaseu--installargumentsu--overrideargumentsu
--forcex86u--packageparametersu--allow-multipleu--execution-timeoutucmd.run_allR)uretcodeiiii�uRunning chocolatey failed: {0}ustdoutu
chocolatey(iiii�(RR(R=RR	R;R<R*RRRRR.RR(RKtversionRER2RDtinstall_argst
override_argst	force_x86tpackage_argstallow_multipletexecution_timeoutR$R+R9R'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytinstallwsDR	
cC@st|ddd|d|�S(u�
    Instructs Chocolatey to install a package via Cygwin.

    name
        The name of the package to be installed. Only accepts a single argument.

    install_args
        A list of install arguments you want to pass to the installation process
        i.e product key or feature list

    override_args
        Set to true if you want to override the original install arguments (for
        the native installer) in the package and use your own. When this is set
        to False install_args will be appended to the end of the default
        arguments

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.install_cygwin <package name>
        salt '*' chocolatey.install_cygwin <package name> install_args=<args> override_args=True
    REucygwinRQRR(RW(RKRQRR((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytinstall_cygwin�s	c
C@s"t|d|ddd|d|�S(u�
    Instructs Chocolatey to install a package via Ruby's Gems.

    name
        The name of the package to be installed. Only accepts a single argument.

    version
        Install a specific version of the package. Defaults to latest version
        available.

    install_args
        A list of install arguments you want to pass to the installation process
        i.e product key or feature list

    override_args
        Set to true if you want to override the original install arguments (for
        the native installer) in the package and use your own. When this is set
        to False install_args will be appended to the end of the default
        arguments


    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.install_gem <package name>
        salt '*' chocolatey.install_gem <package name> version=<package version>
        salt '*' chocolatey.install_gem <package name> install_args=<args> override_args=True
    RPREurubyRQRR(RW(RKRPRQRR((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytinstall_gems
	cC@s�tt��td�kr8tjd�t|d|�St�d|g}|rf|jd|g�n|r�|jd|g�n|jt��td|dt	�}|d	d
kr�dj
|d�}t|��n|dS(
u�
    Instructs Chocolatey to install a package if it doesn't already exist.

    .. versionchanged:: 2014.7.0
        If the minion has Chocolatey >= 0.9.8.24 installed, this function calls
        :mod:`chocolatey.install <salt.modules.chocolatey.install>` instead, as
        ``installmissing`` is deprecated as of that version and will be removed
        in Chocolatey 1.0.

    name
        The name of the package to be installed. Only accepts a single argument.

    version
        Install a specific version of the package. Defaults to latest version
        available.

    source
        Chocolatey repository (directory, share or remote URL feed) the package
        comes from. Defaults to the official Chocolatey feed.

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.install_missing <package name>
        salt '*' chocolatey.install_missing <package name> version=<package version>
    u0.9.8.24u+installmissing is deprecated, using installRPuinstallmissingu	--versionu--sourceucmd.run_allR)uretcodeiuRunning chocolatey failed: {0}ustdout(RRRRRWR(R=RRRR.R(RKRPRER+R9R'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytinstall_missing:s
c
C@s"t|d|ddd|d|�S(u�
    Instructs Chocolatey to install a package via Python's easy_install.

    name
        The name of the package to be installed. Only accepts a single argument.

    version
        Install a specific version of the package. Defaults to latest version
        available.

    install_args
        A list of install arguments you want to pass to the installation process
        i.e product key or feature list

    override_args
        Set to true if you want to override the original install arguments (for
        the native installer) in the package and use your own. When this is set
        to False install_args will be appended to the end of the default
        arguments

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.install_python <package name>
        salt '*' chocolatey.install_python <package name> version=<package version>
        salt '*' chocolatey.install_python <package name> install_args=<args> override_args=True
    RPREupythonRQRR(RW(RKRPRQRR((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytinstall_pythonks
	cC@st|dd�S(uB
    Instructs Chocolatey to install a Windows Feature via the Deployment Image
    Servicing and Management tool.

    name
        The name of the feature to be installed. Only accepts a single argument.

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.install_windowsfeatures <package name>
    REuwindowsfeatures(RW(RK((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytinstall_windowsfeatures�scC@st|ddd|d|�S(u
    Instructs Chocolatey to install a package via the Microsoft Web PI service.

    name
        The name of the package to be installed. Only accepts a single argument.

    install_args
        A list of install arguments you want to pass to the installation process
        i.e product key or feature list

    override_args
        Set to true if you want to override the original install arguments (for
        the native installer) in the package and use your own. When this is set
        to False install_args will be appended to the end of the default
        arguments

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.install_webpi <package name>
        salt '*' chocolatey.install_webpi <package name> install_args=<args> override_args=True
    REuwebpiRQRR(RW(RKRQRR((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt
install_webpi�s	cC@s�t�d|g}|r.|jd|g�n|rJ|jd|g�n|rc|jdg�n|jt��td|dt�}|ddkr�dj|d
�}t|��n|d
S(u�
    Instructs Chocolatey to uninstall a package.

    name
        The name of the package to be uninstalled. Only accepts a single
        argument.

    version
        Uninstalls a specific version of the package. Defaults to latest version
        installed.

    uninstall_args
        A list of uninstall arguments you want to pass to the uninstallation
        process i.e product key or feature list

    override_args
        Set to true if you want to override the original uninstall arguments
        (for the native uninstaller) in the package and use your own. When this
        is set to False uninstall_args will be appended to the end of the
        default arguments

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.uninstall <package name>
        salt '*' chocolatey.uninstall <package name> version=<package version>
        salt '*' chocolatey.uninstall <package name> version=<package version> uninstall_args=<args> override_args=True
    u	uninstallu	--versionu--uninstallargumentsu--overrideargumentsucmd.run_allR)uretcodeiiEiNiiuRunning chocolatey failed: {0}ustdout(iiEiNii(R(R=RRRR.R(RKRPtuninstall_argsRRR+R9R'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt	uninstall�sc	C@sht�d|g}	|r.|	jd|g�n|rJ|	jd|g�ntjjj|�ro|	jd�ntjjj|�r�|	jd�n|r�|	jd|g�n|r�|	jd�n|r�|	jd�n|r�|	jd	|g�n|	jt��|	jt��t	d
|	dt
�}
|
ddkr`dj|
d�}t|��n|
dS(u�
    .. versionadded:: 2016.3.4

    Instructs Chocolatey to upgrade packages on the system. (update is being
    deprecated). This command will install the package if not installed.

    Args:

        name (str):
            The name of the package to update, or "all" to update everything
            installed on the system.

        version (str):
            Install a specific version of the package. Defaults to latest
            version.

        source (str):
            Chocolatey repository (directory, share or remote URL feed) the
            package comes from. Defaults to the official Chocolatey feed.

        force (bool):
            Reinstall the **same** version already installed

        pre_versions (bool):
            Include pre-release packages in comparison. Defaults to False.

        install_args (str):
            A list of install arguments you want to pass to the installation
            process i.e product key or feature list

        override_args (str):
            Set to true if you want to override the original install arguments
            (for the native installer) in the package and use your own. When
            this is set to False install_args will be appended to the end of the
            default arguments

        force_x86
            Force x86 (32bit) installation on 64 bit systems. Defaults to false.

        package_args
            A list of arguments you want to pass to the package

    Returns:
        str: Results of the ``chocolatey`` command

    CLI Example:

    .. code-block:: bash

        salt "*" chocolatey.upgrade all
        salt "*" chocolatey.upgrade <package name> pre_versions=True
    uupgradeu	--versionu--sourceu--forceu--prereleaseu--installargumentsu--overrideargumentsu
--forcex86u--packageparametersucmd.run_allR)uretcodeiiii�uRunning chocolatey failed: {0}ustdout(iiii�(
R(R=RR	R;R<R*RRRRR.R(RKRPRER2RDRQRRRSRTR+R9R'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytupgrade�s0>cC@stt��td�kr>tjd�t|d|d|�St�d|g}|rl|jd|g�ntjj	j
|�r�|jd�n|jt��|jt
��td|d	t�}|d
dkr�dj|d�}t|��n|dS(u?
    Instructs Chocolatey to update packages on the system.

    name
        The name of the package to update, or "all" to update everything
        installed on the system.

    source
        Chocolatey repository (directory, share or remote URL feed) the package
        comes from. Defaults to the official Chocolatey feed.

    pre_versions
        Include pre-release packages in comparison. Defaults to False.

    CLI Example:

    .. code-block:: bash

        salt "*" chocolatey.update all
        salt "*" chocolatey.update <package name> pre_versions=True
    u0.9.8.24u#update is deprecated, using upgradeRERDuupdateu--sourceu--prereleaseucmd.run_allR)uretcodeiiii�uRunning chocolatey failed: {0}ustdout(iiii�(RRRRR`R(R=RR	R;R<R*RRRRR.R(RKRERDR+R9R'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytupdateKs
c	C@s�td|dt�}i}|j�}x1|D])}||j�kr.||||<q.q.W|r�td|d|d|�}x1|D]&}i||d6||d6||<q�Wn|S(u�
    Instructs Chocolatey to check an installed package version, and optionally
    compare it to one available from a remote feed.

    Args:

        name (str):
            The name of the package to check. Required.

        check_remote (bool):
            Get the version number of the latest package from the remote feed.
            Default is False.

        source (str):
            Chocolatey repository (directory, share or remote URL feed) the
            package comes from. Defaults to the official Chocolatey feed.
            Default is None.

        pre_versions (bool):
            Include pre-release packages in comparison. Default is False.

    Returns:
        dict: A dictionary of currently installed software and versions

    CLI Example:

    .. code-block:: bash

        salt "*" chocolatey.version <package name>
        salt "*" chocolatey.version <package name> check_remote=True
    RBRFRDREu	installedu	available(RMR1tlower(	RKtcheck_remoteRERDt	installedtpackagest
lower_nametpkgt	available((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyRPys 

cC@s�t�ddd|d|g}|r:|jd|g�n|rV|jd|g�ntd|dt�}|d	d
kr�dj|d�}t|��n|dS(
uv
    Instructs Chocolatey to add a source.

    name
        The name of the source to be added as a chocolatey repository.

    source
        Location of the source you want to work with.

    username
        Provide username for chocolatey sources that need authentication
        credentials.

    password
        Provide password for chocolatey sources that need authentication
        credentials.

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.add_source <source name> <source_location>
        salt '*' chocolatey.add_source <source name> <source_location> user=<user> password=<password>

    usourcesuaddu--nameu--sourceu--useru
--passworducmd.run_allR)uretcodeiuRunning chocolatey failed: {0}ustdout(R(R=RRR.R(RKtsource_locationtusernametpasswordR+R9R'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt
add_source�scC@sht�d|d|g}td|dt�}|ddkr`dj|d�}t|��n|dS(	u�
    Instructs Chocolatey to change the state of a source.

    name
        Name of the repository to affect.

    state
        State in which you want the chocolatey repository.

    usourceu--nameucmd.run_allR)uretcodeiuRunning chocolatey failed: {0}ustdout(R(RRR.R(RKtstateR+R9R'((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt_change_source_state�scC@s
t|d�S(u�
    Instructs Chocolatey to enable a source.

    name
        Name of the source repository to enable.

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.enable_source <name>

    uenable(Rn(RK((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt
enable_source�scC@s
t|d�S(u�
    Instructs Chocolatey to disable a source.

    name
        Name of the source repository to disable.

    CLI Example:

    .. code-block:: bash

        salt '*' chocolatey.disable_source <name>
    udisable(Rn(RK((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pytdisable_source�s
(4t__doc__t
__future__RRRtloggingRR>R/trequests.structuresRtsalt.utils.dataRtsalt.utils.platformtsalt.utils.versionsRRtsalt.exceptionsRRRt	getLoggert__name__Rt__func_alias__RRRRR(RRR:R-RMRNRORWRXRYRZR[R\R]R_R`RaRPRlRnRoRp(((s;/usr/lib/python2.7/site-packages/salt/modules/chocolatey.pyt<module>sv
							_T		v%1$	1U.2(		

Zerion Mini Shell 1.0