07-13-2020 11:52 PM
Hi Guys,
I m getting the following error after package reload in NSO
packages package l3cpe
oper-status file-load-error
oper-status error-info "l3cpe-template.xml:115 Unknown element: '{intf-type}' for ned-id: cisco-ios-cli-6.42:cisco-ios-cli-6.42"
Can you please help
Regards
Darpan
Solved! Go to Solution.
07-14-2020 01:54 AM
You cannot parametrize the XML tag itself. only its content:
This is what you have there at the moment:
<interface xmlns="urn:ios"> <{intf-type}> <name>{slot}</name> <ip> <no-address> <address>false</address> </no-address> </ip> </{intf-type}>
you'd need to have the same block for each interface type you want to support, and have that block conditional on the content of intf-type:
<interface xmlns="urn:ios"> <GigabitEthernet when="{/intf-type = 'GigabitEthernet'}"> <name>{/interface-id}</name> ... <interface xmlns="urn:ios"> <TenGigabitEthernet when="{/intf-type = 'TenGigabitEthernet'}"> <name>{/interface-id}</name> ...
07-16-2020 12:38 AM
You're trying to use the 'foreach' processing instruction, but you're not using the correct syntax.
Have a look at the NSO Development Guide - search for section "Processing instructions". You can find the syntax for the statement.
You were using something like this:
<interface xmlns="urn:ios" foreach="{interfaces}"> ... </interface>
instead, you should be using something like this:
<?foreach {/interfaces}?> <interface xmlns="urn:ios"> ... </interface> <?end?>
Finally, when troubleshooting, use 'commit dry-run outformat native | debug template '.
This will help you figure out what's not working.
07-14-2020 01:04 AM
What's on the line of the XML?
The zip file seems to be empty.
07-14-2020 01:10 AM
07-14-2020 01:54 AM
You cannot parametrize the XML tag itself. only its content:
This is what you have there at the moment:
<interface xmlns="urn:ios"> <{intf-type}> <name>{slot}</name> <ip> <no-address> <address>false</address> </no-address> </ip> </{intf-type}>
you'd need to have the same block for each interface type you want to support, and have that block conditional on the content of intf-type:
<interface xmlns="urn:ios"> <GigabitEthernet when="{/intf-type = 'GigabitEthernet'}"> <name>{/interface-id}</name> ... <interface xmlns="urn:ios"> <TenGigabitEthernet when="{/intf-type = 'TenGigabitEthernet'}"> <name>{/interface-id}</name> ...
07-15-2020 07:00 AM
07-16-2020 12:38 AM
You're trying to use the 'foreach' processing instruction, but you're not using the correct syntax.
Have a look at the NSO Development Guide - search for section "Processing instructions". You can find the syntax for the statement.
You were using something like this:
<interface xmlns="urn:ios" foreach="{interfaces}"> ... </interface>
instead, you should be using something like this:
<?foreach {/interfaces}?> <interface xmlns="urn:ios"> ... </interface> <?end?>
Finally, when troubleshooting, use 'commit dry-run outformat native | debug template '.
This will help you figure out what's not working.
07-16-2020 07:49 AM
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