Anons79 Mini Shell

Directory : /lib/python2.7/site-packages/ansible/modules/network/nxos/
Upload File :
Current File : //lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_overlay_global.pyo

�
�Udac@s�idd6dgd6dd6ZdZdZdZd	d
lZd	dlmZmZd	dlmZm	Z	d	d
l
mZd	dlm
Z
idd6Zd�Zd�Zd�Zd�Zd�Zedkr�e�nd
S(s1.1tmetadata_versiontpreviewtstatustnetworktsupported_bys?
---
module: nxos_overlay_global
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Configures anycast gateway MAC of the switch.
description:
  - Configures anycast gateway MAC of the switch.
author: Gabriele Gerbino (@GGabriele)
notes:
  - Tested against NXOSv 7.3.(0)D1(1) on VIRL
  - Default restores params default value
  - Supported MAC address format are "E.E.E", "EE-EE-EE-EE-EE-EE",
    "EE:EE:EE:EE:EE:EE" and "EEEE.EEEE.EEEE"
options:
  anycast_gateway_mac:
    description:
      - Anycast gateway mac of the switch.
    required: true
s9
- nxos_overlay_global:
    anycast_gateway_mac: "b.b.b"
s�
commands:
    description: commands sent to the device
    returned: always
    type: list
    sample: ["fabric forwarding anycast-gateway-mac 000B.000B.000B"]
i����N(t
get_configtload_config(tnxos_argument_spect
check_args(t
AnsibleModule(tCustomNetworkConfigs%fabric forwarding anycast-gateway-mactanycast_gateway_maccCs{i}tt|��}x\|D]T}t|}tjdj|�|tj�}d}|ri|d}n|||<qW|S(Ns(?:{0}\s)(?P<value>.*)$ti(tstrRtPARAM_TO_COMMAND_KEYMAPtretfindalltformattM(tmoduletargstexistingtconfigtargtcommandthas_commandtvalue((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_overlay_global.pytget_existingDs

!
cCsIi}x<|j�D].\}}|j|�}|r|||<qqW|S(N(titemstget(tkey_mapttabletnew_dicttkeyRtnew_key((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_overlay_global.pyt
apply_key_mapSsc
Cst�}tt|�}tt|�}x�|j�D]�\}}|j|�}|dkr}|r}|jdj||��q4d|kr4|dkr4t||�}t||�}||kr�dj||�}	|j|	�q�q4q4W|r|j|dg�ndS(Ntdefaults
no {0} {1}sanycast-gateway-macs{0} {1}tparents(	tlistR#RRRtappendRt
normalize_mactadd(
RRtproposedt	candidatetcommandstproposed_commandstexisting_commandsR!texisting_valueR((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_overlay_global.pytget_commands\s	c
Cs|dkrdSyod|krx|jd�}t|�dkrIt�nx2|D]!}t|�dkrPt�qPqPWnd|krg}|jd�}t|�dkr�t�nx�|D]Q}t|�dkr�t�q�t|�}d|}|j|j|d��q�Wnkd	|krx|jd	�}t|�dkrIt�nx2|D]!}t|�dkrPt�qPqPWnt�Wn'tk
r�|jd
dd|�nXdj|�}gtd
t|�d�D]}|||d!^q�}	dj|	�j	�S(NRt-iit.iiit:tmsgsInvalid MAC address formattproposed_maci(
tNonetsplittlent
ValueErrorR'tzfillt	fail_jsontjointrangetupper(
R5Rtsplitted_mactoctecttsplitted_dot_mact
octect_lentpaddingt
joined_mactitmac((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_overlay_global.pyR(osD	
	
	
!	


6cs&tdtdtdd��}|jt�td|dt�}t�}t||�itd6gd6|d	6}tj	��t
|��}t�fd
�|jj�D��}t
dd�}t||||�|r|j�}||d<|jst||�t|d<qn|j|�dS(
NRtrequiredttypeR
t
argument_spectsupports_check_modetchangedR,twarningsc3s9|]/\}}|dk	r|�kr||fVqdS(N(R6(t.0tktv(R(sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_overlay_global.pys	<genexpr>�s	tindenti(tdicttTruetupdateRR	R&RtFalseRtkeysRtparamsRR
R0t
items_textt
check_modeRt	exit_json(RIRRLtresultRR*R+((RsT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_overlay_global.pytmain�s(
		
%
	
t__main__(tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRt&ansible.module_utils.network.nxos.nxosRRRRtansible.module_utils.basicR	t*ansible.module_utils.network.common.configR
RRR#R0R(R[t__name__(((sT/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_overlay_global.pyt<module>s&



					-	"

Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]