??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177

Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
ó àUdac@sŒidd6dgd6dd6ZdZdZdZd d lZd d lZd d lmZd d lm Z d d l m Z d dl m Z mZd dl mZmZd dlmZd dlmZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zdd„Zd„Zd„Zd„Z d„Z!d „Z"d!„Z#d"„Z$d#„Z%d$„Z&d%„Z'e(d&krˆe'ƒnd S('s1.1tmetadata_versiontpreviewtstatustnetworkt supported_bys= --- module: ios_vrf version_added: "2.3" author: "Peter Sprygada (@privateip)" short_description: Manage the collection of VRF definitions on Cisco IOS devices description: - This module provides declarative management of VRF definitions on Cisco IOS devices. It allows playbooks to manage individual or the entire VRF collection. It also supports purging VRF definitions from the configuration that are not explicitly defined. extends_documentation_fragment: ios notes: - Tested against IOS 15.6 options: vrfs: description: - The set of VRF definition objects to be configured on the remote IOS device. Ths list entries can either be the VRF name or a hash of VRF definitions and attributes. This argument is mutually exclusive with the C(name) argument. name: description: - The name of the VRF definition to be managed on the remote IOS device. The VRF definition name is an ASCII string name used to uniquely identify the VRF. This argument is mutually exclusive with the C(vrfs) argument description: description: - Provides a short description of the VRF definition in the current active configuration. The VRF definition value accepts alphanumeric characters used to provide additional information about the VRF. rd: description: - The router-distinguisher value uniquely identifies the VRF to routing processes on the remote IOS system. The RD value takes the form of C(A:B) where C(A) and C(B) are both numeric values. interfaces: description: - Identifies the set of interfaces that should be configured in the VRF. Interfaces must be routed interfaces in order to be placed into a VRF. associated_interfaces: description: - This is a intent option and checks the operational state of the for given vrf C(name) for associated interfaces. If the value in the C(associated_interfaces) does not match with the operational state of vrf interfaces on device it will result in failure. version_added: "2.5" delay: description: - Time in seconds to wait before checking for the operational state on remote device. version_added: "2.4" default: 10 purge: description: - Instructs the module to consider the VRF definition absolute. It will remove any previously configured VRFs on the device. default: false type: bool state: description: - Configures the state of the VRF definition as it relates to the device operational configuration. When set to I(present), the VRF should be configured in the device active configuration and when set to I(absent) the VRF should not be in the device active configuration default: present choices: ['present', 'absent'] route_both: description: - Adds an export and import list of extended route target communities to the VRF. version_added: "2.5" route_export: description: - Adds an export list of extended route target communities to the VRF. version_added: "2.5" route_import: description: - Adds an import list of extended route target communities to the VRF. version_added: "2.5" route_both_ipv4: description: - Adds an export and import list of extended route target communities in address-family configuration submode to the VRF. version_added: "2.7" route_export_ipv4: description: - Adds an export list of extended route target communities in address-family configuration submode to the VRF. version_added: "2.7" route_import_ipv4: description: - Adds an import list of extended route target communities in address-family configuration submode to the VRF. version_added: "2.7" route_both_ipv6: description: - Adds an export and import list of extended route target communities in address-family configuration submode to the VRF. version_added: "2.7" route_export_ipv6: description: - Adds an export list of extended route target communities in address-family configuration submode to the VRF. version_added: "2.7" route_import_ipv6: description: - Adds an import list of extended route target communities in address-family configuration submode to the VRF. version_added: "2.7" s  - name: configure a vrf named management ios_vrf: name: management description: oob mgmt vrf interfaces: - Management1 - name: remove a vrf named test ios_vrf: name: test state: absent - name: configure set of VRFs and purge any others ios_vrf: vrfs: - red - blue - green purge: yes - name: Creates a list of import RTs for the VRF with the same parameters ios_vrf: name: test_import rd: 1:100 route_import: - 1:100 - 3:100 - name: Creates a list of import RTs in address-family configuration submode for the VRF with the same parameters ios_vrf: name: test_import_ipv4 rd: 1:100 route_import_ipv4: - 1:100 - 3:100 - name: Creates a list of import RTs in address-family configuration submode for the VRF with the same parameters ios_vrf: name: test_import_ipv6 rd: 1:100 route_import_ipv6: - 1:100 - 3:100 - name: Creates a list of export RTs for the VRF with the same parameters ios_vrf: name: test_export rd: 1:100 route_export: - 1:100 - 3:100 - name: Creates a list of export RTs in address-family configuration submode for the VRF with the same parameters ios_vrf: name: test_export_ipv4 rd: 1:100 route_export_ipv4: - 1:100 - 3:100 - name: Creates a list of export RTs in address-family configuration submode for the VRF with the same parameters ios_vrf: name: test_export_ipv6 rd: 1:100 route_export_ipv6: - 1:100 - 3:100 - name: Creates a list of import and export route targets for the VRF with the same parameters ios_vrf: name: test_both rd: 1:100 route_both: - 1:100 - 3:100 - name: Creates a list of import and export route targets in address-family configuration submode for the VRF with the same parameters ios_vrf: name: test_both_ipv4 rd: 1:100 route_both_ipv4: - 1:100 - 3:100 - name: Creates a list of import and export route targets in address-family configuration submode for the VRF with the same parameters ios_vrf: name: test_both_ipv6 rd: 1:100 route_both_ipv6: - 1:100 - 3:100 s1 commands: description: The list of configuration mode commands to send to the device returned: always type: list sample: - vrf definition ansible - description management vrf - rd: 1:100 start: description: The time the job started returned: always type: str sample: "2016-11-16 10:38:15.126146" end: description: The time the job ended returned: always type: str sample: "2016-11-16 10:38:25.595612" delta: description: The time elapsed to perform all operations returned: always type: str sample: "0:00:10.469466" iÿÿÿÿN(tpartial(t AnsibleModule(t exec_command(t load_configt get_config(tios_argument_spect check_args(t NetworkConfig(t iteritemscCs·|jƒjdƒrdS|jƒjdƒr2dS|jƒjdƒrKdS|jƒjdƒrddS|jƒjd ƒr}dS|jƒjd ƒr–d S|jƒjd ƒr¯d SdSdS(NtETtethernettVLtsvitLOtloopbacktMGt managementtMAtPOt portchanneltNVtnvetunknown(tuppert startswith(t interface((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pytget_interface_typescCsDd||kr3|jd|ddddgƒn|j|ƒdS(Nsvrf definition %ssaddress-family ipv4texitsaddress-family ipv6(textendtappend(tnametcmdtcommands((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pytadd_command_to_vrfs cCs¨tƒ}x˜|D]}|\}}d„}|ddkrV|jd|dƒqn|jdƒsŒ|jd|dddd dgƒn|||d ƒrÃd |d }t|d||ƒn|||d ƒrúd |d }t|d||ƒn|||dƒrBx3|dD]$}d|}t|d||ƒqWn|||dƒrŠx3|dD]$}d|}t|d||ƒq_Wn|||dƒrd}t|d||ƒx0|dD]$}d|}t|d||ƒqÁWd}t|d||ƒn|||dƒr‚d}t|d||ƒx0|dD]$}d|}t|d||ƒq=Wd}t|d||ƒn|||dƒrþd }t|d||ƒx0|dD]$}d|}t|d||ƒq¹Wd}t|d||ƒn|||dƒrzd }t|d||ƒx0|dD]$}d|}t|d||ƒq5Wd}t|d||ƒn|ddk rxLt|jdgƒƒj|dƒD]%} |jd| d|dgƒq°WxÄt|dƒj|jdgƒƒD]š} t|ƒ} t ddd| ƒ} | d| j } dj | ƒ} |jd| d|dgƒt j d| t jƒ}|rÿ|j|jƒƒqÿqÿWqqW|S( Ncs¯t|jˆƒtƒr„tˆjˆƒtƒr„|jˆƒoƒ|jˆƒˆjˆƒkoƒt‡‡fd†|jˆƒDƒƒ S|jˆƒo®|jˆƒˆjˆƒkS(Nc3s$|]}|ˆjˆƒkVqdS(N(tget(t.0telem(thavetx(sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pys .s(t isinstanceR'tlisttall(twantR*R+((R*R+sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pyt needs_update,s0Ttstatetabsentsno vrf definition %sR#svrf definition %ssaddress-family ipv4R saddress-family ipv6t descriptionsdescription %strdsrd %st route_importsroute-target import %st route_exportsroute-target export %stroute_import_ipv4sexit-address-familytroute_export_ipv4troute_import_ipv6troute_export_ipv6t interfacess interface %ssno vrf forwarding %stindentitcontentss svrf forwarding %ss ip address .+(R-R"R'R!R&tNonetsett differenceR R tchildrentjointretsearchtMtgroup(tupdatestmoduleR%tupdateR/R*R0R$troutetintftcfgt configobjRAt intf_configtmatch((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pytmap_obj_to_commands&s’           , ,  !cCsO|d|}dj|jƒ}tjd|tjƒ}|rK|jdƒSdS(Nsvrf definition %ss sdescription (.+)$i(RBRARCRDRERF(RMR#RLRO((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pytparse_description‰s cCsO|d|}dj|jƒ}tjd|tjƒ}|rK|jdƒSdS(Nsvrf definition %ss srd (.+)$i(RBRARCRDRERF(RMR#RLRO((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pytparse_rd‘s cCsÍd}tƒ}x·ttjdt|ƒtjƒƒD]‘}xˆ||jD]y}||krHy,||jƒdj|jdƒdƒWqÁt k r½|jdƒdg||jƒd.+:.+)R_tipv4tipv6R4(RCtcompileR-R>R^R]tparse_export_ipv4tparse_import_ipv4tparse_export_ipv6tparse_import_ipv6RDt groupdictR'R!( RMR#taddress_familyt rd_patternR\t export_matcht import_matchtextexrdtimtimrd((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pyt parse_both´s0        "0cCsb|d|}y<|d}dj|jƒ}tjd|tjƒ}|SWntk r]nXdS(Nsvrf definition %ssaddress-family ipv4s sroute-target\s+import\s+(.+)(RBRARCRURERX(RMR#RLtsubcfgR\((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pyRdÏs  cCsb|d|}y<|d}dj|jƒ}tjd|tjƒ}|SWntk r]nXdS(Nsvrf definition %ssaddress-family ipv4s sroute-target\s+export\s+(.+)(RBRARCRURERX(RMR#RLRqR\((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pyRcÚs  cCsb|d|}y<|d}dj|jƒ}tjd|tjƒ}|SWntk r]nXdS(Nsvrf definition %ssaddress-family ipv6s sroute-target\s+import\s+(.+)(RBRARCRURERX(RMR#RLRqR\((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pyRfås  cCsb|d|}y<|d}dj|jƒ}tjd|tjƒ}|SWntk r]nXdS(Nsvrf definition %ssaddress-family ipv6s sroute-target\s+export\s+(.+)(RBRARCRURERX(RMR#RLRqR\((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pyReðs  cCsct|ƒ}tddd|ƒ}tjd|tjƒ}|sFtƒStƒ}t|ƒ}xt|ƒD]ó}i|d6dd6t||ƒd6t ||ƒd 6|j |ƒd 6t ||ƒd 6t ||ƒd 6t ||ƒd 6t||ƒd6t||ƒd6t ||ddƒd6t||ƒd6t||ƒd6t ||ddƒd6}|j|ƒqhW|S(NR<iR=s^vrf definition (\S+)R#tpresentR1R3R4R;R5R6t route_bothR7R8RhR`troute_both_ipv4R9R:Ratroute_both_ipv6(R R RCRURER-R[R?RQRRR'R]R^RpRdRcRfReR"(RHtconfigRMROt instancesR;titemtobj((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pytmap_config_to_objûs2   cCs|j|ƒs|j|}n>|j|jddƒ}|j|}|||ƒ||}tƒjd|ƒ}|r‰|||ƒn|S(NttypeRVs validate_%s(R'tparamst argument_spect _CHECK_ARGUMENT_TYPES_DISPATCHERtglobals(tkeyRxRHtvaluet value_typet type_checkert validator((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pytget_param_values  cCs¶|jjdƒ}|st|jd r:|jdr:tƒS|jdsZ|jddƒni|jdd6g}nltƒ}x`|D]X}t|tƒs°|ji|d6ƒq„d|krÏ|jddƒq„|j|ƒq„Wtƒ}xÆ|D]¾}ttd|d|ƒ}|dƒ|d<|d ƒ|d <|d ƒ|d <|d ƒ|d <|d ƒ|d <|d ƒ|d <|dƒ|d<|dƒ|d<|dƒ|d<|dƒ|d<|dƒ|d<|dƒ|d<|dƒ|dcsR1Rr( R-tnextR>R.R"R R,tsortedt TypeError(R/R*RGRxR€R((R”sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pytupdate_objects`s$  " c Cs+|jdr'|dr.tj|jdƒn|jd}t|dj|ƒƒ\}}}|dkr'|jƒjƒ}|s„dS|d}|d} x‰|D]~} | d|krŸ| jdƒdkrÐqŸnxJ| dD];} t | ƒt | ƒk rÛ|j dd | |fƒqÛqÛWqŸqŸWq'ndS( NRŒtchangedtdelayR#sshow vrf | include {0}iiÿÿÿÿRˆs%Interface %s not configured on vrf %s( R|ttimetsleepRtformattstripRWR'R>RR( R/RHtresultR#trctoutterrtdatatvrfRtwR“((sG/usr/lib/python2.7/site-packages/ansible/modules/network/ios/ios_vrf.pytcheck_declarative_intent_paramsvs$   !    c *Cs’tdtddƒdtƒdtƒdtƒdtddƒdtddƒd tddƒd tddƒd tddƒd tddƒd tddƒdtddƒdtddƒdtddƒdtddƒdtddddƒdtdddtƒdtdddddgƒƒ}|jtƒd$g}td|d|dtƒ}itd6}tƒ}t||ƒ||d sF   o^    c       1   A