cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3269
Views
15
Helpful
11
Replies

Unable to Reload package with New Template

abhinavr5289
Level 1
Level 1

Hi 

 

We are unable to load the newly created Service Package with updated Yang, can someone please help why it's failing here?

 

reload-result {
package PE_CE_8_1
result false
info PE_CE_8_1-template.xml:246 Element: 'fib-quota' only exists for ned-id: npt12500_8.1.01060-nc-1.0:npt12500_8.1.01060-nc-1.0
}

 

should Template XML support all configured NEDs? because this FIb Quota is newly added in Yang and is only available in NED npt12500_8.1.01060-nc-1.0. other NED yang has no attribute "Fib-quota".

 

 

 

Regards

Abhinav R

1 Accepted Solution

Accepted Solutions

RichardD2
Level 1
Level 1

Hi,

There's an option called if-ned-id you can add in your template so the processing is conditional on matching a specific ned (and the element you are concerned about). It's explained here https://community.cisco.com/t5/nso-developer-hub-discussions/error-element-only-exist-for-a-ned-id/td-p/4034137

thanks

R

View solution in original post

11 Replies 11

RichardD2
Level 1
Level 1

Hi,

There's an option called if-ned-id you can add in your template so the processing is conditional on matching a specific ned (and the element you are concerned about). It's explained here https://community.cisco.com/t5/nso-developer-hub-discussions/error-element-only-exist-for-a-ned-id/td-p/4034137

thanks

R

Hi @RichardD2 ,

 

Thanks, I have added conditions as per the above resolution and now Sync-from passes successfully. Also, the result against that problematic template is True.

 

But, I am still not able to execute that service also that is not able in UI? any suggestions?

 

Thanks,

Abhinav R

@abhinavr5289

What is the error that you are seeing in the UI? More info would be helpful. Maybe you can post a screenshot?

thanks

R

abhinavr5289
Level 1
Level 1

Hi @RichardD2 ,

 

There is no Error in UI or CLI, after adding conditions in XML for the package we are able to complete Sync-from successfully.

but we are not able to see the package in UI or CLI to proceed further for configuration.

 

Ex- after creating a package, we do package reload to highlight service in UI/CLI to do configuration. but hereafter successful configuration we still not able to see that newly created package available for configuration.

 

 

Thanks

Abhinav R 

@abhinavr5289

Ok, from the ncs_cli what is the output of 'show packages package oper-status'?

If your package doesn't even make it into the list, I would be checking to see that it's in the right directory. 

The recommendation I follow is to make sure its in the packages directory

From the developer guide:

When NSO starts, it needs to search for packages to load. The ncs.conf parameter /ncs-config/
load-path defines a list of directories. At initial startup, NSO searches these directories for packages,
copies the packages to a private directory tree in the directory defined by the /ncs-config/statedir
parameter in ncs.conf, and loads and starts all the packages found. All .fxs (compiled YANG files)
and .ccl (compiled CLI spec files) files found in the directory load-dir in a package are loaded. On
subsequent startups, NSO will by default only load and start the copied packages - see the section called
“Loading Packages” for different ways to get NSO to search the load path for changed or added packages.

 

thanks

R

HI @RichardD2,

 

The below package is operationally up, but I am not able to see it to do configuration.

 

 

packages package PE_CE_8_1
oper-status up

 

admin@ncs(config)# PE
^
% Invalid input detected at '^' marker. >> Here is should auto-complete, but no luck.

 

Thanks

Abhinav R

@abhinavr5289

In order to troubleshoot this further, we need to see the service package. Can you post your YANG model and XML template?

thank you,

R

HI @RichardD2 ,

 

Please refer to the attached files.

 

Thanks

Abhinav R

@abhinavr5289

Thanks for posting the files. At first glance, this block doesn't look correct:

</route-targets>
                        <?if-ned-id npt12500_8.1.01060-nc-1.0:npt12500_8.1.01060-nc-1.0?>
                        <?elif-ned-id npt1050_8.1.01060-nc-1.0:npt1050_8.1.01060-nc-1.0?>

I believe you need to make it look like:

</route-targets>
<?if-ned-id npt12500_8.1.01060-nc-1.0:npt12500_8.1.01060-nc-1.0 npt1050_8.1.01060-nc-1.0:npt1050_8.1.01060-nc-1.0?>

You just need to separate the ned-ids with a space instead of using elif right after.

R

HI @RichardD2 ,

 

Changes done as per your above reply but still issue is there, we are not able to see the package for further configuration.

 

reload-result {
package PE_CE_8_1
result true
}

admin@ncs# PE
^
% Invalid input detected at '^' marker.

 

Thanks

Abhinav R

@abhinavr5289

So you login to ncs_cli type 'PE' and then you get the error?

If you are wanting to deploy an instance of your service, you need to be in config mode

admin@ncs# conf
Entering configuration mode terminal
admin@ncs(config)#

Then type PE and enter the attributes for your service.

thanks

R