07-25-2019 06:08 PM
I am trying to take advantage of NSO's automatic service package upgrade feature to add a node to the service schema, but it does not seem to be working.
I start off with a basic template-only service with this YANG snippet:
augment /ncs:services { list basic { key name; uses ncs:service-data; ncs:servicepoint "basic"; leaf name { type string; } leaf-list device { type leafref { path "/ncs:devices/ncs:device/ncs:name"; } } leaf foo { type string; } //leaf bar { // type string; // default "bye"; //} } }
In NSO, I instantiate the service:
admin@ncs(config)# services basic b1 admin@ncs(config-basic-b1)# foo hello admin@ncs(config-basic-b1)# commit dry-run cli { local-node { data services { + basic b1 { + foo hello; + } } } } admin@ncs(config-basic-b1)# commit Commit complete.
In the YANG, I uncomment the `bar` leaf, re-compile, and reload packages.
If I understand the docs correctly, the package reload with the new YANG model should automatically upgrade my service instances and add the `bar` leaf with default value `yo`. But this does not happen:
admin@ncs# show running-config services basic services basic b1 foo hello !
I know the new package with the new `bar` leaf loaded as I am able to instantiate it just fine:
admin@ncs# show running-config services basic b2 services basic b2 foo hej bar hejda !
What am I missing here? I'm using NSO 4.7 if that matters.
Thanks,
-Allen
Solved! Go to Solution.
07-26-2019 09:44 AM
Default values are not displayed by default. You can either do a show on the entire path (show running-config services basic bar) or do show running-config services basic | details to get the defaults included.
07-26-2019 09:44 AM
Default values are not displayed by default. You can either do a show on the entire path (show running-config services basic bar) or do show running-config services basic | details to get the defaults included.
07-26-2019 10:13 AM
Thanks, Viktor. I did not know about the `| details` in that context. That is very helpful.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: