Select NED for service
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2025 09:07 AM
I'm defining a service that request feature on a NED available only for selected NED version.
If I define the template as usual I got erro at load-time:
reload-result { package snfeSERVICE result false info snfeSERVICE-SNMP-template.xml:109 Element: 'permit' only exists for ned-id: huawei-vrp-cli-6.68:huawei-vrp-cli-6.68, huawei-vrp-cli-6.73:huawei-vrp-cli-6.73
I read Templates - Network Services Orchestrator (NSO) v6.1 - Cisco DevNet. I follow the instruction and create a package-meta-data.xml accordingly:
<ncs-package xmlns="http://tail-f.com/ns/ncs-packages"> <name>snfeSERVICE</name> <package-version>1.0.4</package-version> <description>Servizio per Sinfonia Easy - Componente stateful di snfe</description> <ncs-min-version>5.7</ncs-min-version> <component> <name>main</name> <application> <python-class-name>snfeSERVICE.Main</python-class-name> </application> </component> </ncs-package> <supported-ned-id xmlns:huawei-vrp-cli-6.73="http://tail-f.com/ns/ned-id/huawei-vrp-cli-6.73"> huawei-vrp-cli-6.73:huawei-vrp-cli-6.73 </supported-ned-id> <supported-ned-id xmlns:huawei-vrp-cli-6.68="http://tail-f.com/ns/ned-id/huawei-vrp-cli-6.68"> huawei-vrp-cli-6.68:huawei-vrp-cli-6.68 </supported-ned-id>
But no effect!
Where I'm wrong?
- Labels:
-
Crosswork
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2025 02:33 AM
can you try putting the "permit" tag in a <?if-ned-id?> block? see https://cisco-tailf.gitbook.io/nso-docs/guides/development/core-concepts/templates#ch_templates.xml_instructions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2025 03:19 AM
I'm confused. Your suggestion seems to refer to the XML templates, but my question is about the package-meta-data.xml file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2025 07:41 AM
now I'm not sure what the question really is... do you want to be able to load the service package? or do you want to know why having <supported-ned-id> in package-meta-data.xml gave you "no effect"?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2025 07:50 AM
The latter.
I'd like to have simple templates, that does not include NED information, because, if I have to add new NEDs I should modify all the template files.
I read that it is possibile to limit the NED versions applicable declaring them in the packeg-meta-data.xml file. I tried but it seems to have no effect: the package operates also on devices with NED ids not included in package-meta-data.xml supported-ned-id tags
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2025 04:16 AM
I can't reproduce your observation that "the package operates also on devices with NED ids not included in package-meta-data.xml supported-ned-id tags", if I have:
1 2 versions of the same ned loaded, let's say 1.0 and 1.1
2 a template with no <?if-ned-id?> + a tag that only exists in 1.1
3 <supported-ned-id> declares support for 1.1
applying the template gave me: unit-template.xml:6 will not apply template to device ex0 with unsupported ned-id: router-nc-1.0:router-nc-1.0. The template is only available for supported ned-id(s) router-nc-1.1:router-nc-1.1
