%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_firewall.pyc

�
���^c@@srdZddlmZmZmZddlmZmZd�Zdd�Z	ddd	d
d�Z
dd�Zd
S(u(
State for configuring Windows Firewall
i(tabsolute_importtunicode_literalstprint_function(tCommandExecutionErrortSaltInvocationErrorcC@sdtkrdStS(u/
    Load if the module firewall is loaded
    ufirewall.get_configuwin_firewall(t__salt__tFalse(((s</usr/lib/python2.7/site-packages/salt/states/win_firewall.pyt__virtual__suallprofilescC@s�i|d6td6id6dd6}idd6dd	6d
d6dd
6}||krhtdj|���ntd�}|d
kr�|||kr�t|d<dj|�|d<|SxH|D]@}||r�|d
ks�|||kr�d|d|<q�q�q�Wtdr8|dpd|d<|d|d<i|d<|S|dr�ytd|�|d<Wq�tk
r�dj||�|d<q�Xn.|d
kr�d}ndj|�}||d<|S(uZ
    Disable all the firewall profiles (Windows only)

    Args:
        profile (Optional[str]): The name of the profile to disable. Default is
            ``allprofiles``. Valid options are:

            - allprofiles
            - domainprofile
            - privateprofile
            - publicprofile

    Example:

    .. code-block:: yaml

        # To disable the domain profile
        disable_domain:
          win_firewall.disabled:
            - name: domainprofile

        # To disable all profiles
        disable_all:
          win_firewall.disabled:
            - name: allprofiles
    unameuresultuchangesuucommentuDomainu
domainprofileuPrivateuprivateprofileuPublicu
publicprofileuAlluallprofilesuInvalid profile name: {0}ufirewall.get_configu1Profile {0} does not exist in firewall.get_configudisabledutestufirewall.disableu*Firewall Profile {0} could not be disabledu&All the firewall profiles are disabledu Firewall profile {0} is disabledN(tTrueRtformatRRt__opts__tNoneR(tnametrettprofile_maptcurrent_configtkeytmsg((s</usr/lib/python2.7/site-packages/salt/states/win_firewall.pytdisabledsH












	
utcpuallowuinuanycC@s�i|d6td6id6dd6}td|�sFi|d6|d<nd|d<|Std	r�|dpld|d<|d|d<i|d<|Sy!td
||||||�Wntk
r�d|d<nX|S(
um
    Add a new inbound or outbound rule to the firewall policy

    Args:

        name (str): The name of the rule. Must be unique and cannot be "all".
            Required.

        localport (int): The port the rule applies to. Must be a number between
            0 and 65535. Can be a range. Can specify multiple ports separated by
            commas. Required.

        protocol (Optional[str]): The protocol. Can be any of the following:

            - A number between 0 and 255
            - icmpv4
            - icmpv6
            - tcp
            - udp
            - any

        action (Optional[str]): The action the rule performs. Can be any of the
            following:

            - allow
            - block
            - bypass

        dir (Optional[str]): The direction. Can be ``in`` or ``out``.

        remoteip (Optional [str]): The remote IP. Can be any of the following:

            - any
            - localsubnet
            - dns
            - dhcp
            - wins
            - defaultgateway
            - Any valid IPv4 address (192.168.0.12)
            - Any valid IPv6 address (2002:9b3b:1a31:4:208:74ff:fe39:6c43)
            - Any valid subnet (192.168.1.0/24)
            - Any valid range of IP addresses (192.168.0.1-192.168.0.12)
            - A list of valid IP addresses

            Can be combinations of the above separated by commas.

            .. versionadded:: 2016.11.6

    Example:

    .. code-block:: yaml

        open_smb_port:
          win_firewall.add_rule:
            - name: SMB (445)
            - localport: 445
            - protocol: tcp
            - action: allow
    unameuresultuchangesuucommentufirewall.rule_existsunew ruleu$A rule with that name already existsutestufirewall.add_ruleuCould not add ruleN(RRR
RR(Rt	localporttprotocoltactiontdirtremoteipR
((s</usr/lib/python2.7/site-packages/salt/states/win_firewall.pytadd_rule^s&A





cC@s�i|d6td6id6dd6}idd6dd	6d
d6dd
6}||krhtdj|���ntd�}|d
kr�|||kr�t|d<dj|�|d<|SxH|D]@}||s�|d
ks�|||kr�d|d|<q�q�q�Wtdr8|dpd|d<|d|d<i|d<|S|dr�ytd|�|d<Wq�tk
r�dj||�|d<q�Xn.|d
kr�d}ndj|�}||d<|S(uR
    Enable all the firewall profiles (Windows only)

    Args:
        profile (Optional[str]): The name of the profile to enable. Default is
            ``allprofiles``. Valid options are:

            - allprofiles
            - domainprofile
            - privateprofile
            - publicprofile

    Example:

    .. code-block:: yaml

        # To enable the domain profile
        enable_domain:
          win_firewall.enabled:
            - name: domainprofile

        # To enable all profiles
        enable_all:
          win_firewall.enabled:
            - name: allprofiles
    unameuresultuchangesuucommentuDomainu
domainprofileuPrivateuprivateprofileuPublicu
publicprofileuAlluallprofilesuInvalid profile name: {0}ufirewall.get_configu1Profile {0} does not exist in firewall.get_configuenabledutestufirewall.enableu)Firewall Profile {0} could not be enabledu%All the firewall profiles are enableduFirewall profile {0} is enabledN(RRR	RRR
RR(RR
RRRR((s</usr/lib/python2.7/site-packages/salt/states/win_firewall.pytenabled�sH












	
N(t__doc__t
__future__RRRtsalt.exceptionsRRRRRR(((s</usr/lib/python2.7/site-packages/salt/states/win_firewall.pyt<module>s	NX

Zerion Mini Shell 1.0