Resource Type: cisco_yang_netconf
- Defined in:
- lib/puppet/type/cisco_yang_netconf.rb
- Providers:
-
cisco
Overview
IOS-XR configuration management via YANG Netconf.
~~~puppet cisco_yang_netconf { ‘<title>’:
..attributes..
} ~~~ ‘<title>` is the title of the yang resource. This example demonstrates changing the VRF table to contain only the vrf with name "blue". ~~~puppet
cisco_yang_netconf { 'blue vrf':
target => '<vrfs xmlns=\"http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg\"/>',
source => '<vrfs xmlns=\"http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg\">
<vrf>
<vrf-name>blue</vrf-name>
<create/>
<vpn-id>
<vpn-oui>875</vpn-oui>
<vpn-index>3</vpn-index>
</vpn-id>
</vrf>
</vrfs>',
mode => replace
}
~~~ This example demonstrates inserting the vrf with name "blue" into the table, with the values provided. ~~~puppet
cisco_yang_netconf { '<vrfs xmlns=\"http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg\"/>':
source => '<vrfs xmlns=\"http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg\">
<vrf>
<vrf-name>blue</vrf-name>
<create/>
<vpn-id>
<vpn-oui>875</vpn-oui>
<vpn-index>3</vpn-index>
</vpn-id>
</vrf>
</vrfs>'
}
~~~ This example demonstrates removing the vrf with name "red" from the vrf table. ~~~puppet
cisco_yang_netconf { '<vrfs xmlns=\"http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg\"/>':
source => '<vrfs xmlns=\"http://cisco.com/ns/yang/Cisco-IOS-XR-infra-rsi-cfg\">
<vrf xmlns:xc=\"urn:ietf:params:xml:ns:netconf:base:1.0\" xc:operation=\"delete\">
<vrf-name>red</vrf-name>
<create/>
</vrf>
</vrfs>'
}
~~~