cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2006
Views
10
Helpful
6
Replies

Getting error after deploying package

darpan1979
Level 1
Level 1

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

2 Accepted Solutions

Accepted Solutions

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>
...

 

View solution in original post

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.

View solution in original post

6 Replies 6

yfherzog
Cisco Employee
Cisco Employee

What's on the line of the XML?

The zip file seems to be empty.

Please find attached the correct zip file

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>
...

 

I have now fixe it as per your advice and package oper status is ok now. But I m not able to parse through the interfaces and configure them. Attached is the changed zip. Any help would be appreciated.

 

Regards

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.

Thanks , it has resolved the problem !!!