HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/rh_ip.cpython-310.pyc
o

�N�g���@s�dZddlZddlZddlZddlZddlZddlZddlZddl	Zddl
ZddlmZe�
e�Zeje�ej�ejjjd��d�ZdZdddd	dd
d�ZdZd
ZdZdZdZdd�Zdd�Z dd�Z!dd�Z"dd�Z#dd�Z$dd�Z%dd �Z&d!d"�Z'd#d$�Z(d%d&�Z)d'd(�Z*d)d*�Z+d+d,�Z,d-d.�Z-d/d0�Z.d1d2�Z/d3d4�Z0d5d6�Z1d7d8�Z2d9d:�Z3d;d<�Z4d=d>�Z5d?d@�Z6dAdB�Z7dCdD�Z8dEdF�Z9dGdH�Z:dIdJ�Z;dKdL�Z<dMdN�Z=dOdP�Z>dQdR�Z?dSdT�Z@dUdV�ZAdWdX�ZBdYdZ�ZCd[d\�ZDdS)]z5
The networking module for RHEL/Fedora based distros
�N)�CommandExecutionErrorZrh_ip)�loader�ip�0Z16�1�layer2)�	ad_selectZ	tx_queues�	lacp_rateZ	max_bonds�use_carrier�xmit_hash_policyz/etc/sysconfig/network-scriptsz/etc/sysconfig/network)�yes�on�truerT)�no�off�falserF)
�eth�bond�team�alias�cloneZipsecZdialup�bridge�slave�teamport�vlan�ipip�ibcCs4tddkrtddkrtddkrtSdStSdS)z:
    Confine this module to RHEL/Fedora based distros
    �	os_family�RedHat�os�Amazon�osmajorrelease�)FznThe rh_ip execution module cannot be loaded: this module is only available on RHEL/Fedora based distributions.)�
__grains__�__virtualname__�r%r%�F/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/rh_ip.py�__virtual__Is�r'cCs2t|t�r|f}d}|�||d�dd�|D���S)�c
    Build an appropriate error message from a given option and
    a list of expected values.
    z>Invalid option -- Interface: {0}, Option: {1}, Expected: [{2}]�|cs��|]}t|�VqdS�N��str��.0�er%r%r&�	<genexpr>b��z#_error_msg_iface.<locals>.<genexpr>��
isinstancer-�format�join��iface�option�expected�msgr%r%r&�_error_msg_ifaceZs
r<cCsd}|�|||�S)r(zDInvalid option -- Route interface: {0}, Option: {1}, Expected: [{2}])r5r7r%r%r&�_error_msg_routesesr=cCst�d|||�dS)Nz:Using default option -- Interface: %s Option: %s Value: %s��log�info)r8�opt�valuer%r%r&�_log_default_ifacens�rCcCs0t|t�r|f}d}|�|d�dd�|D���S)r(z8Invalid network setting -- Setting: {0}, Expected: [{1}]r)csr*r+r,r.r%r%r&r1|r2z%_error_msg_network.<locals>.<genexpr>r3�r9r:r;r%r%r&�_error_msg_networkts
rEcCst�d||�dS)Nz/Using existing setting -- Setting: %s Value: %sr>)rArBr%r%r&�_log_default_networksrFcCsxt|�}i}|r:|D]/}|��}|r|�d�s|�d�rq
dd�|�dd�D�}t|�dkr/q
|\}}|||��<q
|S)N�!�#cSsg|]}|���qSr%)�rstrip)r/�pr%r%r&�
<listcomp>�sz$_parse_rh_config.<locals>.<listcomp>�=�r")�
_read_file�strip�
startswith�split�len�upper)�pathZ	rh_configZcv_rh_config�line�pair�namerBr%r%r&�_parse_rh_config�srXcCsi}d|vr*|dtvr|�ddi�n|dtvr"|�ddi�nt|dtt�d|vrHddg}|d|vrB|�d|di�nt|d|�d|vrjgd�}t|d�|vrb|�d|di�nt||d|�d	|vr�gd
�}t|d	�|vr�|�d	|d	i�nt|d	|�d|vr�d|����}g}d
D]1}||dvr�tdtdd�}|d||vr�|�d�	||d|��q�t||d||�q�|r�|�|d�
|�i�tt}dD]*}||v�r||tvr�|�|di�q�||tv�r|�|di�q�t|||�q�|S)z�
    Filters given options and outputs valid settings for ETHTOOLS_OPTS
    If an option has a value that is not expected, this
    function will log what the Interface, Setting and what it was
    expecting.
    Zautonegr
rZduplex�fullZhalfZspeed)�10Z100Z1000Z10000Z	advertise)Z0x001Z0x002Z0x004Z0x008Z0x010Z0x020Z0x20000Z0x8000Z0x1000Z0x40000Z0x80000Z0x200000Z0x400000Z0x800000Z	0x1000000Z	0x2000000Z	0x4000000Zchannelsz-L )�rx�tx�otherZcombinedrMZnum_cpusz{} {}� )r[r\ZsgZtsoZufoZgsoZgroZlro)�_CONFIG_TRUE�update�
_CONFIG_FALSE�_raise_error_ifacer-rO�ranger#�appendr5r6)�optsr8Zconfig�validZchannels_cmdZchannels_paramsr9r%r%r&�_parse_ethtool_opts�s\��
�rgcCs|ddvrt�d|�t||�S|ddvr"t�d|�t||�S|ddvr3t�d|�t||�S|ddvrDt�d	|�t||�S|dd
vrUt�d|�t||�S|ddvrft�d
|�t||�S|ddvrwt�d|�t||�Sd}t	|d|�dS)z�
    Filters given options and outputs valid settings for requested
    operation. If an option has a value that is not expected, this
    function will log what the Interface, Setting and what it was
    expecting.
    �mode)�
balance-rrrz5Device: %s Bonding Mode: load balancing (round-robin))�
active-backuprz8Device: %s Bonding Mode: fault-tolerance (active-backup))�balance-xor�2z-Device: %s Bonding Mode: load balancing (xor))�	broadcast�3z4Device: %s Bonding Mode: fault-tolerance (broadcast))�802.3ad�4z>Device: %s Bonding Mode: IEEE 802.3ad Dynamic link aggregation)�balance-tlb�5z0Device: %s Bonding Mode: transmit load balancing)�balance-alb�6z0Device: %s Bonding Mode: adaptive load balancing)rrrlrnrprrrtrirjrkrmrorqrsN)
r?r@�_parse_settings_bond_0�_parse_settings_bond_1�_parse_settings_bond_2�_parse_settings_bond_3�_parse_settings_bond_4�_parse_settings_bond_5�_parse_settings_bond_6rb)rer8rfr%r%r&�_parse_settings_bond�s2



�


r|c	CsNi}dD]'}||vr+zt||�|�|||i�Wqty*t||d�Yqwqd|vr<d|vr<|dd|d<d|vr�|dsJt|dd�dD]}||vre|||dret||d�|d��qLd	|vr�|d	tvry|�d	d
i�|S|d	tvr�|�d	di�|Stt}t|d	|�|St|d	td	�|�d	td	i�|S)zc
    Add shared settings for miimon support used by balance-rr, balance-xor
    bonding types.
    )�miimon�	downdelay�updelay�integerr}r~r"znonzero integer)r~rz0 or a multiple of miimon ({})r
rr)	�intr`�	Exceptionrbr5r_rarC�_BOND_DEFAULTS)rer8�ret�bindingrfr%r%r&�_parse_settings_miimonsJ����
���r�cCs�i}d|vrhzt|d�|�d|di�Wnty&t|dd�Ynwd}d|vrbt|dt�rZdt|d�krBdkrRnn|�dd�|d�i�|St|d|�|St|d|�|St|d|�|S)zT
    Add shared settings for arp used by balance-rr, balance-xor bonding types.
    �arp_intervalr�zlist of ips (up to 16)Z
arp_ip_targetrM��,)r�r`r�rbr4�listrRr6)rer8r�rfr%r%r&�_parse_settings_arpGs(� ���r�cCsHddi}|�t||��|�t||��d|vr"d|vr"t|dd�|S)z�
    Filters given options and outputs valid settings for bond0.
    If an option has a value that is not expected, this
    function will log what the Interface, Setting and what it was
    expecting.
    rhrr}r��miimon or arp_interval�!at least one of these is required�r`r�r�rb�rer8rr%r%r&rucs�rucC�Jddi}|�t||��d|vrt|dd�d|vr#|�d|di�|S)z�
    Filters given options and outputs valid settings for bond1.
    If an option has a value that is not expected, this
    function will log what the Interface, Setting and what it was
    expecting.
    rhrr}r��primary�r`r�rbr�r%r%r&rvv�rvcCs�ddi}|�t||��|�t||��d|vr"d|vr"t|dd�d|vr?d}|d|vr9|�d	|di�|St|d|�|S)
z�
    Filters given options and outputs valid settings for bond2.
    If an option has a value that is not expected, this
    function will log what the Interface, Setting and what it was
    expecting.
    rhrlr}r�r�r��hashing-algorithm)r�layer2+3�layer3+4rr�)rer8rrfr%r%r&rw�s��rwcCs0ddi}|�t||��d|vrt|dd�|S)z�
    Filters given options and outputs valid settings for bond3.
    If an option has a value that is not expected, this
    function will log what the Interface, Setting and what it was
    expecting.
    rhrnr}r�r�r�r%r%r&rx�s
rxc	Cs\ddi}|�t||��d|vrt|dd�dD]g}||vrn|dkrKd}|||vr0t|||�||dkr=|�|d	i�||d
krJ|�|di�nd}zt||�|�|||i�Wqtymt|||�Yqwt||t|�|�|t|i�qd|vr�td
dkr�tddkr�d}nd}|d|vr�|�d|di�|St|d|�|S)z�
    Filters given options and outputs valid settings for bond4.
    If an option has a value that is not expected, this
    function will log what the Interface, Setting and what it was
    expecting.
    rhrpr}r�)r	rr	)�fastr�slowrr�rr�rr�rrr!�)rr�r��encap2+3�encap3+4)rr�r�r�r�zvlan+srcmacr)r`r�rbr�r�rCr�r#)rer8rr�rfr%r%r&ry�sD���rycCr�)z�
    Filters given options and outputs valid settings for bond5.
    If an option has a value that is not expected, this
    function will log what the Interface, Setting and what it was
    expecting.
    rhrrr}r�r�r�r�r%r%r&rz�r�rzcCr�)z�
    Filters given options and outputs valid settings for bond6.
    If an option has a value that is not expected, this
    function will log what the Interface, Setting and what it was
    expecting.
    rhrtr}r�r�r�r�r%r%r&r{�r�r{cCs�i}d|vr"|dttvr|�d|di�n
tt}t|d|�d|vr<|ddkr6|�d|di�nt|dd�d|vrU|drO|�d|di�|St|dd�|S)zE
    Filters given options and outputs valid settings for a vlan
    Zreorder_hdrZvlan_idrzPositive integerZphys_devzNon-empty string)r_rar`rb)rer8rrfr%r%r&�_parse_settings_vlans �r�c	Cs�d|i}d|vr!gd�}|d|vr|d|d<nt||d|�d|vr/|d|d<d|d<d|vrNz
t|d�|d<WntyMt|ddg�Ynwd	|vrad
|vrad}t�|�t|��|dvrzt||�}|rzd
�dd�|��D��|d<|dkr�d|d<|dkr�d|d<d|vr�t	j
j�|d�|d<|dkr�d|d<|d|d<d|vr�t	j
j�|d�|d<|dkr�d|vr�d}t�d||�t|��t
||�}|r�d
�dd�|��D��|d <d!|d"<|d#kr�t||�}	|	r�d$|d"<|	D]}
||
||
<q�|d%v�rYd&}d	|v�r6t	j
jj�|d	��r|d	|d	<n|d	d'k�r&d(}n|d	dk�r5t||d	d)�nd(}|�rY|dk�rYtd*�}||v�rYd	||v�rY||d	|d	<|d+k�rbd,|d"<|d-k�r�d.|d"<d(}
tt}d/D]&}
|
|v�r�||
tv�r�d(}
�qs||
tv�r�d&}
�qst|||
|��qsgd0�}|
�r�d1}nd2}|D]}z
td3||�W�q�t�y�t�d4|�Y�q�wnd-|v�r�|d-|d-<|d5k�r�d6|d"<d7D]}
|
|v�r�t||
d8��q�||
||
<�q�|d9k�r�d:|d"<d;|v�rd<|v�rd=}t�|�t|��|d;|d;<nd<|v�r$|d<|d<<d>D]}
|
|v�r3||
||
<�q&d?D]}
|
|v�rD||
||
<�q7d@|v�r�g|d@<|d@D]-}
t	j
jj�|
��rvdAdB�|
�dC�D�\}}|d@�||dD���qSdE}t�|�t|��dF|v�r�|dFD]}
t	j
jj�|
��s�dG}t�|�t|��|dF|dF<�q�dH|v�r�|dH|dH<tt}dID]*}
|
|v�r�||
tv�r�d||
<�q�||
tv�r�dJ||
<�q�t|||
|��q�dK|v�r�t�dL||�|�r�d|dK<ndJ|dK<dM|v�r"|dMtv�r
d|dM<n|dMtv�rdJ|dM<n
t||dM|�ndJ|dM<d#|v�rK|d#tv�r7d|d#<n|d#tv�rCdJ|d#<nt||d#|�dN|v�r[|dNtv�r[dJ|dN<dO|v�rf|dO|dO<dP|v�rq|dP|dP<dQ|v�r||dQ|dQ<d	|v�r�|d	|d	<d
|v�r�|d
|d
<dR|v�r�|dRtv�r�d|dR<|S|dRtv�r�dJ|dR<|St||dR|�|SdJ|dR<|S)SzW
    Filters given options and outputs valid settings for a
    network interface.
    rW�proto)�noneZbootpZdhcpZdnsr�peerdnsZmtur�ZhwaddrZmacaddrzFCannot pass both hwaddr and macaddr. Must use either hwaddr or macaddr)rr^cS�g|]\}}|�d|���qS)r^r%�r/�x�yr%r%r&rKK�z'_parse_settings_eth.<locals>.<listcomp>�ethtoolrr�rZTeamZ
devicetypeZteam_configrZTeamPort�team_masterZteam_port_configrrhzMissing required option 'mode'z%s for bond interface '%s'cSr�)rLr%r�r%r%r&rKbr��bondingZBondZdevtyperZVlan)rrrrrF�autoT)zAA:BB:CC:DD:EE:FFr�r�znetwork.interfacesrZEthernetrZBridge)�bypassfirewall)z#net.bridge.bridge-nf-call-ip6tablesz"net.bridge.bridge-nf-call-iptablesz#net.bridge.bridge-nf-call-arptablesrrMzsysctl.persistzFailed to set sysctl: %srZIPIP)Zmy_inner_ipaddrZmy_outer_ipaddrz1.2.3.4rZ
InfiniBand�prefix�netmaskz&Cannot use prefix and netmask together)	�ipaddr�masterZsrcaddr�delay�domainZgatewayZuuidZnickname�zone)Zipv6addrZipv6gateway�ipaddrscss�|]}|��VqdSr+)rO)r/�ir%r%r&r1�r2z&_parse_settings_eth.<locals>.<genexpr>�/)r�r�zipv4 CIDR is invalidZ	ipv6addrszipv6 CIDR is invalidZenable_ipv6)
Zonparentr�Z
peerroutesrrZdefrouteZstpZipv6_peerdnsZ
ipv6_defrouteZipv6_peerroutesZ
ipv6_autoconfZipv4_failure_fatalZdhcpv6crZonbootzTThe 'onboot' option is controlled by the 'enabled' option. Interface: %s Enabled: %sZuserctlZarpcheckZipaddr_startZ
ipaddr_endZclonenum_startZ
nm_controlled)rbr��
ValueErrorr?�error�AttributeErrorrgr6�items�salt�utils�json�dumpsr|r��validate�netZmac�__salt__r_rar�warningZ	ipv4_addrrQrd�	ipv6_addr)re�
iface_type�enabledr8�resultrfr;r�r�rrAZ	auto_addrZifacesr�Z
bridgectlsZsysctl_valueZsysctlrr�r%r%r&�_parse_settings_eth,s~�






��




���








�
�





�
�













���r�cCsDdd�|��D�}i}d|vrt|dd�|D]}||||<q|S)z[
    Filters given options and outputs valid settings for
    the route settings file.
    cS�i|]	\}}|��|�qSr%��lower�r/�k�vr%r%r&�
<dictcomp>E�z!_parse_routes.<locals>.<dictcomp>�routeszList of routes)r��_raise_error_routes)r8rer�rAr%r%r&�
_parse_routes?sr�cCsdd�|��D�}dd�|��D�}|�dd�}|r|ni}d}tt}d|vrOz|d|d<tjj�|d�}td|d�Wnt	yNt
d|�Ynw|d|d<d	�|�}d
�|�}tjj�|d�}||vr~|tvru||d<n|tvr}||d<nt
d|�d|vr�z|d|d<td|d�Wnt
y�t
ddg�Ynw|dr�d
�tjj�|d�|�|d<nt
ddg�d|vr�tjj�|d�}	|	|vr�|	tvr�||d<n|	tvr�||d<nt
d|�|D]}
|
dvr�d
�tjj�||
�|�||
<q�|S)zd
    Filters given options and outputs valid settings for
    the global network settings file.
    cSr�r%r�r�r%r%r&r�Vr�z+_parse_network_settings.<locals>.<dictcomp>cSr�r%r�r�r%r%r&r�Wr��retain_settingsF�r��
networkingz	{0}yes{0}z{0}no{0}�hostnamezserver1.example.comz	{1}{0}{1}�
nozeroconf)r�r�r�)r��getr_rar�r��stringutilsZ	is_quotedrFr��_raise_error_networkr5Zdequoter�)re�currentr�r�Z
quote_typerfZtrue_valZ	false_valr�r�rAr%r%r&�_parse_network_settingsPsj�


�
�
�
�
��r�cC�t|||�}t�|�t|���zB
    Log and raise an error with a logical formatted message.
    )r<r?r�r�r7r%r%r&rb��
rbcCst||�}t�|�t|��r�)rEr?r�r�rDr%r%r&r��s

r�cCr�r�)r=r?r�r�r7r%r%r&r��r�r�c	Cs�z:tjj�|d��'}tjj�|�����}z|�d�Wn	t	y%Ynw|Wd�WS1s3wYWdSt
yEgYSw)z2
    Reads and returns the contents of a file
    �rbr�N)r�r��files�fopenr�Z
to_unicode�read�
splitlines�remover�r�)rTZrfh�linesr%r%r&rN�s�(��rNcCs�tj�||�|��}tj�|�s!d}|�||�}t�|�t|��tj	j
�|d��}|�tj	j
�|��Wd�dS1s?wYdS)�
    Writes a file to disk
    z){0} cannot be written. {1} does not exist�wN)rrTr6r5�existsr?r�r�r�r�r�r��writer��to_str)r8�dataZfolder�pattern�filenamer;�fp_r%r%r&�_write_file_iface�s
"�r�cCsJtjj�|d��}|�tjj�|��Wd�dS1swYdS)r�r�N)r�r�r�r�r�r�r�)r�r�r�r%r%r&�_write_file_network�s"�r�cCs.|��}z|�d�W|StyY|Sw)Nr�)r�r�r�)r�r�r%r%r&�
_read_temp�s��r�c
Ks"tddkrtddkrd}nd}ntddkrd}ntdd	d
�}|��}|tvr1t||t�|dkrHd|d<d
|vrHd}t�|�t|��|dkrcd|vr[d}t�|�t|��t|d�|d<|dkr�d
|vrzd|vrzd}t�|�t|��d
|vr�d|vr�t�d|d|d
|�|d
=nd
|vr�|�	d
�|d<|dkr�d|d<|dkr�t
dd�s�t
dd�|dkr�t
dd�s�t
dd�|dvr�t||||�}zt�
d|�d��}Wntjjy�t�d |�Yd!Sw|�|�}|�d"�r�t|�St||td#�tj�td$|���}	t|	�S)%z�
    Build an interface script for a network interface.

    CLI Example:

    .. code-block:: bash

        salt '*' ip.build_interface eth0 eth <settings>
    rZFedorar!��8�7r �	osreleaseNrMrrr�z1master is a required setting for slave interfacesrrhz$mode is required for bond interfacesrr�zCmaster or team_master is a required setting for teamport interfaceszyBoth team_master (%s) and master (%s) were configured for teamport interface %s. Ignoring master in favor of team_master.rrzpkg.versionzbridge-utilszpkg.installrZteamd)
rrrrrrrrrrZrhz
_eth.jinjaz&Could not load template rh%s_eth.jinjar��testz	ifcfg-{0}�ifcfg-)r#r��_IFACE_TYPESrbr?r�r�r-r��popr�r��JINJA�get_template�jinja2�
exceptions�TemplateNotFound�renderr�r�r��_RH_NETWORK_SCRIPT_DIRrrTr6rN)
r8r�r��settingsZrh_majorr;re�templateZifcfgrTr%r%r&�build_interface�sr



��

rc
Ks�d}zttdd�dkrd}Wn	tyYnwt�d|�t||�}t�d|�zt�|�}Wntj	j
yDt�d|�Yd	Swg}g}|d
D]}|d}tj
jj�|�ra|�|�qM|�|�qMt�d|�t�d
|�|j||d�}|j||d�}	|dr�t|�}
|
�t|	��|
St||td�t||	td�tj�td|���}tj�td|���}t|�}
|
�t|��|
S)z�
    Build a route script for a network interface.

    CLI Example:

    .. code-block:: bash

        salt '*' ip.build_routes eth0 <settings>
    zrh6_route_eth.jinjar�r�zroute_eth.jinjazTemplate name: %sz
Opts: 
 %szCould not load template %sr�r�r�zIPv4 routes:
%szIPv6 routes:
%s)r�r8r�z	route-{0}z
route6-{0}�route-�route6-)r�r#r�r?�debugr�r�r�r�r�r�r�r�r�r�r�r�rdr�r��extendr�r�rrTr6rN)
r8r�rreZopts6Zopts4Zrouter�ZroutecfgZ	routecfg6r�rT�path6r%r%r&�build_routesBsN��
�rcC�"|��dvrtdd|���SdS)zq
    Shutdown a network interface

    CLI Example:

    .. code-block:: bash

        salt '*' ip.down eth0
    �rr�cmd.runzifdown N�r�r��r8r�r%r%r&�downz�rcCstj�td|���}t|�S)z�
    Return the contents of an interface script

    CLI Example:

    .. code-block:: bash

        salt '*' ip.get_interface eth0
    r�)rrTr6r�rN)r8rTr%r%r&�
get_interface�s
rcCr	)zo
    Start up a network interface

    CLI Example:

    .. code-block:: bash

        salt '*' ip.up eth0
    r
rzifup Nrr
r%r%r&�up�rrcCsBtj�td|���}tj�td|���}t|�}|�t|��|S)z�
    Return the contents of the interface routes script.

    CLI Example:

    .. code-block:: bash

        salt '*' ip.get_routes eth0
    rr)rrTr6r�rNr)r8rTrr�r%r%r&�
get_routes�s

rcCstt�S)z�
    Return the contents of the global network script.

    CLI Example:

    .. code-block:: bash

        salt '*' ip.get_network_settings
    )rN�_RH_NETWORK_FILEr%r%r%r&�get_network_settings�s
rcKs�d|vrd|d<d|vrd|d<d}|dtvr,d|vr%td|d�}nt�d�d}d}|dtvr<t�d�d}ntd	d
krItdd�}ntdd
�}|oR|S)z�
    Apply global network configuration.

    CLI Example:

    .. code-block:: bash

        salt '*' ip.apply_network_settings
    Zrequire_rebootFZapply_hostnameTr�znetwork.mod_hostnamezUThe network state sls is trying to apply hostname changes but no hostname is defined.zbThe network state sls is requiring a reboot of the system to properly apply network configuration.r!r�zservice.restartZNetworkManager�network)r_r�r?r�r#)r�Zhostname_res�resr%r%r&�apply_network_settings�s,
��rcKsptt�}t||�}zt�d�}Wntjjy!t�	d�YdSw|�
|�}|dr/t|�St|t�t
t�S)z�
    Build the global network script.

    CLI Example:

    .. code-block:: bash

        salt '*' ip.build_network_settings <settings>
    z
network.jinjaz%Could not load template network.jinjar�r�)rXrr�r�r�r�r�r�r?r�r�r�r�rN)r�Zcurrent_network_settingsrerrr%r%r&�build_network_settings�s

�

r)E�__doc__�loggingrr�Zjinja2.exceptionsZsalt.utils.filesr�Zsalt.utils.jsonZsalt.utils.stringutilsZsalt.utils.templatesZsalt.utils.validate.netZsalt.exceptionsr�	getLogger�__name__r?ZEnvironmentZFileSystemLoaderrTr6r�Z	templatesZTEMPLATE_DIRNAMEr�r$r�r�rr_rar�r'r<r=rCrErFrXrgr|r�r�rurvrwrxryrzr{r�r�r�r�rbr�r�rNr�r�r�rrrrrrrrrr%r%r%r&�<module>s�
���	T2-8H				`8
+