cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1600
Views
0
Helpful
3
Replies

NSO XML template issue

bjronmork
Level 1
Level 1

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

1 Accepted Solution

Accepted Solutions

lmanor
Cisco Employee
Cisco Employee

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

View solution in original post

3 Replies 3

vleijon
Cisco Employee
Cisco Employee
So, it says: The device /devices/device[name='PE1'] does not support namespace 'urn:ios' for node "interface" (from file "l2vpn-demo-template.xml", line 10)

What is the ned for the device PE1? How is PE1 configured?

Thanks for your reply vleijon.

I updated tags as per below; issue resolved.
--------------------------------------------------
<interface xmlns="urn:ios" tags="nocreate">
<GigabitEthernet tags="merge">
--------------------------------------------------
Regards,
Bjron

lmanor
Cisco Employee
Cisco Employee

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