%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/win_network.pyo |
� ���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z e j e � Z d Z d Z d � Z d � Z d � Z d � Z d d d d d e d � Z d S( u Configuration of network interfaces on Windows hosts ==================================================== .. versionadded:: 2014.1.0 This module provides the ``network`` state(s) on Windows hosts. DNS servers, IP addresses and default gateways can currently be managed. Below is an example of the configuration for an interface that uses DHCP for both DNS servers and IP addresses: .. code-block:: yaml Local Area Connection #2: network.managed: - dns_proto: dhcp - ip_proto: dhcp .. note:: Both the ``dns_proto`` and ``ip_proto`` arguments are required. Static DNS and IP addresses can be configured like so: .. code-block:: yaml Local Area Connection #2: network.managed: - dns_proto: static - dns_servers: - 8.8.8.8 - 8.8.4.4 - ip_proto: static - ip_addrs: - 10.2.3.4/24 .. note:: IP addresses are specified using the format ``<ip-address>/<subnet-length>``. Salt provides a convenience function called :mod:`ip.get_subnet_length <salt.modules.win_ip.get_subnet_length>` to calculate the subnet length from a netmask. Optionally, if you are setting a static IP address, you can also specify the default gateway using the ``gateway`` parameter: .. code-block:: yaml Local Area Connection #2: network.managed: - dns_proto: static - dns_servers: - 8.8.8.8 - 8.8.4.4 - ip_proto: static - ip_addrs: - 10.2.3.4/24 - gateway: 10.2.3.1 i ( t absolute_importt unicode_literalst print_functionN( t range( t CommandExecutionError( t sixu staticu dhcpu networkc C@ s&