04-04-2019 05:11 AM
I need support, I am facing an issue in constructing right tags with in XML.
make command and packages reloads gets successful but unable to use l2 services code.
root@ncs(config)# commit dry-run | debug template l2vpn-demo-template
Fetching literal "\n " (from file "l2vpn-demo-template.xml", line 7)
Evaluating "/link[1]/device" (from file "l2vpn-demo-template.xml", line 7)
Context node: /services/l2vpn-demo:l2vpn-demo[name='console-l2']
Result:
For /services/l2vpn-demo:l2vpn-demo[name='console-l2']/link[device='PE1'], it evaluates to "PE1"
Fetching literal "\n " (from file "l2vpn-demo-template.xml", line 7)
Operation 'merge' on non-existing node: /devices/device[name='PE1'] (from file "l2vpn-demo-template.xml", line 7)
The device /devices/device[name='PE1'] does not support namespace 'urn:ios' for node "interface" (from file "l2vpn-demo-template.xml", line 10)
Skipping...
The device /devices/device[name='PE1'] does not support namespace 'urn:ios' for node "'l2vpn-xconnect'" (from file "l2vpn-demo-template.xml", line 52)
Skipping...
Fetching literal "\n " (from file "l2vpn-demo-template.xml", line 101)
Evaluating "/link[2]/device" (from file "l2vpn-demo-template.xml", line 101)
Context node: /services/l2vpn-demo:l2vpn-demo[name='console-l2']
Result:
For /services/l2vpn-demo:l2vpn-demo[name='console-l2']/link[device='PE2'], it evaluates to "PE2"
Fetching literal "\n " (from file "l2vpn-demo-template.xml", line 101)
Operation 'merge' on non-existing node: /devices/device[name='PE2'] (from file "l2vpn-demo-template.xml", line 101)
The device /devices/device[name='PE2'] does not support namespace 'urn:ios' for node "'l2vpn-xconnect'" (from file "l2vpn-demo-template.xml", line 103)
Skipping...
The device /devices/device[name='PE2'] does not support namespace 'urn:ios' for node "interface" (from file "l2vpn-demo-template.xml", line 143)
Skipping...
Required XML Code (for PE only) is given below;
<?xml version="1.0" encoding="UTF-8"?>
<config-template xmlns="http://tail-f.com/ns/config/1.0" servicepoint="l2vpn-demo">
<devices xmlns="http://tail-f.com/ns/ncs">
<device tags="merge">
<name>{/link[1]/device}</name>
<config tags="merge">
<interface xmlns="urn:ios" tags="nocreate">
<GigabitEthernet>
<name>{/link[1]/ios/intf-number}</name>
<service>
<instance>
<id>{/link[1]/vlan-id}</id>
<ethernet>
</ethernet>
<description>{/link[1]/context-group-name}-Serivce-Instance</description>
<encapsulation>
<dot1q>
<id>{/link[1]/vlan-id}</id>
</dot1q>
</encapsulation>
<rewrite>
<ingress>
<tag>
<pop>1</pop>
<mode>symmetric</mode>
</tag>
</ingress>
</rewrite>
</instance>
</service>
</GigabitEthernet>
</interface>
<l2vpn-xconnect xmlns="urn:ios" tags="merge">
<l2vpn>
<xconnect>
<context>
<name>{/link[1]/context-group-name}</name>
<interworking>ethernet</interworking>
<member>
<member-list>
<name>{/link[1]/ios/intf-number}</name>
<service-instance>{/link[1]/vlan-id}
</service-instance>
</member-list>
<address-list>
<name>{/link[1]/remote-ip}</name>
<vcid>{/pw-id}</vcid>
<encapsulation>mpls</encapsulation>
<group>{/link[1]/context-group-name}
</group>
</address-list>
</member>
</context>
</xconnect>
</l2vpn>
</l2vpn-xconnect>
</config>
</device>
</devices>
</config-template>
Please help. Thanks
Solved! Go to Solution.
04-08-2019 11:24 AM
From these messages:i
The device /devices/device[name='PE1'] does not support namespace 'urn:ios' for node "interface" (from file "l2vpn-demo-template.xml", line 10)
I'd guess that either PE1 and PE2 are not on-boarded with ned-id=cisco-ios: or your template which specifies ios config namespace in not right.
-Larry
04-04-2019 05:56 AM
04-07-2019 02:51 AM
04-08-2019 11:24 AM
From these messages:i
The device /devices/device[name='PE1'] does not support namespace 'urn:ios' for node "interface" (from file "l2vpn-demo-template.xml", line 10)
I'd guess that either PE1 and PE2 are not on-boarded with ned-id=cisco-ios: or your template which specifies ios config namespace in not right.
-Larry
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide