%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //usr/lib/python2.7/site-packages/salt/states/win_dism.pyc

�
���^c@@s�dZddlmZmZmZddlZddlZddlZddl	Zej
e�ZdZ
d�Zdeded�Zded�Zddeeded�Zeded	�Zeeded
�Zded�ZdS(u

Installing of Windows features using DISM
=========================================

Install windows features/capabilties with DISM

.. code-block:: yaml

    Language.Basic~~~en-US~0.0.1.0:
      dism.capability_installed

    NetFx3:
      dism.feature_installed
i(tabsolute_importtunicode_literalstprint_functionNudismcC@s tjjj�stdfStS(uA
    Only work on Windows where the DISM module is available
    u Module only available on Windows(tsalttutilstplatformt
is_windowstFalset__virtualname__(((s8/usr/lib/python2.7/site-packages/salt/states/win_dism.pyt__virtual__s
c
C@s1i|d6td6dd6id6}td�}||krRdj|�|d<|Stdr�d	j|�|dd
<d|d<|Std|||||�}|ddkr�dj||d�|d<t|d<ntd�}tjjj	||�}	|	r-dj|�|d<||d<|	|dd
<n|S(u5
    Install a DISM capability

    Args:
        name (str): The capability to install
        source (str): The optional source of the capability
        limit_access (bool): Prevent DISM from contacting Windows Update for
            online images
        image (Optional[str]): The path to the root directory of an offline
            Windows image. If `None` is passed, the running operating system is
            targeted. Default is None.
        restart (Optional[bool]): Reboot the machine if required by the install

    Example:
        Run ``dism.available_capabilities`` to get a list of available
        capabilities. This will help you get the proper name to use.

        .. code-block:: yaml

            install_dotnet35:
              dism.capability_installed:
                - name: NetFX3~~~~
    unameuresultuucommentuchangesudism.installed_capabilitiesu'The capability {0} is already installedutestu{0} will be installedu
capabilityudism.add_capabilityuretcodeiiii�uFailed to install {0}: {1}ustdoutu
Installed {0}N(iiii�(
tTruet__salt__tformatt__opts__tNoneRRRtdatat
compare_lists(
tnametsourcetlimit_accesstimagetrestarttrettoldtstatustnewtchanges((s8/usr/lib/python2.7/site-packages/salt/states/win_dism.pytcapability_installed(s2







cC@s+i|d6td6dd6id6}td�}||krRdj|�|d<|Stdr�d	j|�|dd
<d|d<|Std|||�}|ddkr�dj||d�|d<t|d<ntd�}tjjj	||�}|r'dj|�|d<||d<||dd
<n|S(u�
    Uninstall a DISM capability

    Args:
        name (str): The capability to uninstall
        image (Optional[str]): The path to the root directory of an offline
            Windows image. If `None` is passed, the running operating system is
            targeted. Default is None.
        restart (Optional[bool]): Reboot the machine if required by the install

    Example:
        Run ``dism.installed_capabilities`` to get a list of installed
        capabilities. This will help you get the proper name to use.

        .. code-block:: yaml

            remove_dotnet35:
              dism.capability_removed:
                - name: NetFX3~~~~
    unameuresultuucommentuchangesudism.installed_capabilitiesu%The capability {0} is already removedutestu{0} will be removedu
capabilityudism.remove_capabilityuretcodeiiii�uFailed to remove {0}: {1}ustdoutuRemoved {0}N(iiii�(
R
RRR
RRRRRR(RRRRRRRR((s8/usr/lib/python2.7/site-packages/salt/states/win_dism.pytcapability_removedhs0







cC@s7i|d6td6dd6id6}td�}||krRdj|�|d<|Stdr�d	j|�|dd
<d|d<|Std|||||||�}	|	ddkr�dj||	d�|d<t|d<ntd�}
tjjj	||
�}|r3dj|�|d<|	|d<||dd
<n|S(u�
    Install a DISM feature

    Args:
        name (str): The feature in which to install
        package (Optional[str]): The parent package for the feature. You do not
            have to specify the package if it is the Windows Foundation Package.
            Otherwise, use package to specify the parent package of the feature
        source (str): The optional source of the feature
        limit_access (bool): Prevent DISM from contacting Windows Update for
            online images
        enable_parent (Optional[bool]): True will enable all parent features of
            the specified feature
        image (Optional[str]): The path to the root directory of an offline
            Windows image. If `None` is passed, the running operating system is
            targeted. Default is None.
        restart (Optional[bool]): Reboot the machine if required by the install

    Example:
        Run ``dism.available_features`` to get a list of available features.
        This will help you get the proper name to use.

        .. code-block:: yaml

            install_telnet_client:
              dism.feature_installed:
                - name: TelnetClient
    unameuresultuucommentuchangesudism.installed_featuresu$The feature {0} is already installedutestu{0} will be installedufeatureudism.add_featureuretcodeiiii�uFailed to install {0}: {1}ustdoutu
Installed {0}N(iiii�(
R
RRR
RRRRRR(RtpackageRRt
enable_parentRRRRRRR((s8/usr/lib/python2.7/site-packages/salt/states/win_dism.pytfeature_installed�s2#







c	C@s.i|d6td6dd6id6}td�}||krRdj|�|d<|Stdr�d	j|�|dd
<d|d<|Std||||�}|ddkr�dj||d�|d<t|d<ntd�}tjjj	||�}|r*dj|�|d<||d<||dd
<n|S(u,
    Disables a feature.

    Args:
        name (str): The feature to disable
        remove_payload (Optional[bool]): Remove the feature's payload. Must
            supply source when enabling in the future.
        image (Optional[str]): The path to the root directory of an offline
            Windows image. If `None` is passed, the running operating system is
            targeted. Default is None.
        restart (Optional[bool]): Reboot the machine if required by the install

    Example:
        Run ``dism.installed_features`` to get a list of installed features.
        This will help you get the proper name to use.

        .. code-block:: yaml

            remove_telnet_client:
              dism.feature_removed:
                - name: TelnetClient
                - remove_payload: True
    unameuresultuucommentuchangesudism.installed_featuresu"The feature {0} is already removedutestu{0} will be removedufeatureudism.remove_featureuretcodeiiii�uFailed to remove {0}: {1}ustdoutuRemoved {0}N(iiii�(
R
RRR
RRRRRR(	Rtremove_payloadRRRRRRR((s8/usr/lib/python2.7/site-packages/salt/states/win_dism.pytfeature_removed�s2







cC@s�i|d6td6dd6id6}d|krytjj|�rytdrXd|d<n
t|d<dj|�|d<|Std	�}td
|�}|d|kr�dj||d�|d<|Stdr�d
j|�|dd<d|d<|Std|||||�}|ddkrFdj||d�|d<t|d<ntd	�}	t	j
jj||	�}
|
r�dj|�|d<||d<|
|dd<n|S(u;
    Install a package.

    Args:
        name (str): The package to install. Can be a .cab file, a .msu file,
            or a folder
        ignore_check (Optional[bool]): Skip installation of the package if the
            applicability checks fail
        prevent_pending (Optional[bool]): Skip the installation of the package
            if there are pending online actions
        image (Optional[str]): The path to the root directory of an offline
            Windows image. If `None` is passed, the running operating system is
            targeted. Default is None.
        restart (Optional[bool]): Reboot the machine if required by the install

    Example:

        .. code-block:: yaml

            install_KB123123123:
              dism.package_installed:
                - name: C:\Packages\KB123123123.cab
    unameuresultuucommentuchangesu~utestuPackage path {0} does not existudism.installed_packagesudism.package_infouPackage Identityu)The package {0} is already installed: {1}u{0} will be installedupackageudism.add_packageuretcodeiiii�uFailed to install {0}: {1}ustdoutu
Installed {0}N(iiii�(
R
tostpathtexistsR
RRRRRRRR(Rtignore_checktprevent_pendingRRRRtpackage_infoRRR((s8/usr/lib/python2.7/site-packages/salt/states/win_dism.pytpackage_installed#sB










c	C@s�i|d6td6dd6id6}d|krytjj|�rytdrXd|d<n
t|d<dj|�|d<|Std	�}td
|�}d|ks�|d|kr�dj|�|d<|Stdr�d
j|�|dd<d|d<|Std|||�}|ddkrEdj||d�|d<t|d<ntd	�}t	j
jj||�}|r�dj|�|d<||d<||dd<n|S(u�
    Uninstall a package

    Args:
        name (str): The full path to the package. Can be either a .cab file or a
            folder. Should point to the original source of the package, not to
            where the file is installed. This can also be the name of a package as listed in
            ``dism.installed_packages``
        image (Optional[str]): The path to the root directory of an offline
            Windows image. If `None` is passed, the running operating system is
            targeted. Default is None.
        restart (Optional[bool]): Reboot the machine if required by the install

    Example:

        .. code-block:: yaml

            # Example using source
            remove_KB1231231:
              dism.package_installed:
                - name: C:\Packages\KB1231231.cab

            # Example using name from ``dism.installed_packages``
            remove_KB1231231:
              dism.package_installed:
                - name: Package_for_KB1231231~31bf3856ad364e35~amd64~~10.0.1.3
    unameuresultuucommentuchangesu~utestuPackage path {0} does not existudism.installed_packagesudism.package_infouPackage Identityu"The package {0} is already removedu{0} will be removedupackageudism.remove_packageuretcodeiiii�uFailed to remove {0}: {1}ustdoutuRemoved {0}N(iiii�(
R
R"R#R$R
RRRRRRRR(	RRRRRR'RRR((s8/usr/lib/python2.7/site-packages/salt/states/win_dism.pytpackage_removedps@










(t__doc__t
__future__RRRtloggingR"tsalt.utils.dataRtsalt.utils.platformt	getLoggert__name__tlogRR	RRRRRR!R(R)(((s8/usr/lib/python2.7/site-packages/salt/states/win_dism.pyt<module>s2	<9A=I

Zerion Mini Shell 1.0