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_ospf.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_ospf
extends_documentation_fragment: nxos
version_added: "2.2"
short_description: Manages configuration of an ospf instance.
description:
  - Manages configuration of an ospf instance.
author: Gabriele Gerbino (@GGabriele)
options:
  ospf:
    description:
      - Name of the ospf instance.
    required: true
  state:
    description:
      - Determines whether the config should be present or not
        on the device.
    required: false
    default: present
    choices: ['present','absent']
s-
- nxos_ospf:
    ospf: 1
    state: present
sz
commands:
    description: commands sent to the device
    returned: always
    type: list
    sample: ["router ospf 1"]
i����N(t
get_configtload_config(tnxos_argument_spect
check_args(t
AnsibleModule(tCustomNetworkConfigsrouter ospftospfc	Cs�|j�}g}d}x�|D]}}d}d|kry2tj||tj�}|j�}|d}Wntk
r�d}nX|r�|j|�q�qqW|S(Ns^router ospf\s(?P<ospf>\S+).*tsrouter ospfR(t
splitlinestretmatchtDOTALLt	groupdicttAttributeErrortappend(	tconfigtmoduletsplitted_configt
value_listtREGEXtlinetvaluet
match_ospft
ospf_group((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_ospf.pyt	get_valueHs


cCs>i}tt|��}t||�}|r:||d<n|S(NR(tstrRR(RtexistingRR((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_ospf.pytget_existing[s
cCs-dj|d�g}|j|dg�dS(Nsrouter ospf {0}Rtparents(tformattadd(Rtproposedt	candidatetcommands((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_ospf.pyt
state_presentescCs-dj|d�g}|j|dg�dS(Nsno router ospf {0}RR!(R"R#(RR$R%R&((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_ospf.pytstate_absentjsc
Cs�tdtdtdd�dtdddgd	ddt��}|jt�td
|dt�}t�}t||�tdtd
|�}|jd}t	|jd�}t
|�}td|�}|s�g}n
|d}tdd�}	|dkr||krt|||	�n|dkrE||krEt
|||	�n|	r{|	j�}	t||	�t|d<|	|d<n
g|d<|j|�dS(NRtrequiredttypeRtstatetchoicestpresenttabsenttdefaultt
argument_spectsupports_check_modetchangedtwarningstindentiR&(tdicttTruetFalsetupdateRR	tlistRtparamsRR R
R'R(t
items_textRt	exit_json(
R0RR3tresultR+RRR$t
existing_listR%((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_ospf.pytmainos6$
	

	




t__main__(tANSIBLE_METADATAt
DOCUMENTATIONtEXAMPLEStRETURNRt&ansible.module_utils.network.nxos.nxosRRRRtansible.module_utils.basicR	t*ansible.module_utils.network.common.configR
tPARAM_TO_COMMAND_KEYMAPRR R'R(R?t__name__(((sJ/usr/lib/python2.7/site-packages/ansible/modules/network/nxos/nxos_ospf.pyt<module>s&



		
			*

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