07-08-2020 01:04 PM
Has anybody ever added an additional leaf into the service list key? In testing, it looks to work fine but we have 900 existing services in this package already and just curious how it could affect them. From what we see it should go over all the existing service entries and update the key with the deviceName.
OLD:
list test-l2vpn { description "Configure test l2vpn services"; uses ncs:service-data; ncs:servicepoint test-l2vpn-servicepoint; key circuit_id; leaf circuit_id { description "Circuit ID used to identify service"; tailf:info "Unique circuit id"; tailf:cli-allow-range; type string; } leaf deviceName { description "Hostname of device"; tailf:info "Hostname of device"; type leafref { path /ncs:devices/ncs:device/ncs:name; } }
NEW:
list test-l2vpn { description "Configure test l2vpn services"; uses ncs:service-data; ncs:servicepoint test-l2vpn-servicepoint; key "circuit_id deviceName"; leaf circuit_id { description "Circuit ID used to identify service"; tailf:info "Unique circuit id"; tailf:cli-allow-range; type string; } leaf deviceName { description "Hostname of device"; tailf:info "Hostname of device"; type leafref { path /ncs:devices/ncs:device/ncs:name; } }
Solved! Go to Solution.
07-09-2020 12:16 AM
Have a look at the development guide under section "Automatic Schema Upgrades and Downgrades".
It explains the limitations of what could be handled automatically by NSO. In case you case is not covered, there's also an option to create an upgrade package to handle the transition (explained a bit further down on the same document).
07-09-2020 12:16 AM
Have a look at the development guide under section "Automatic Schema Upgrades and Downgrades".
It explains the limitations of what could be handled automatically by NSO. In case you case is not covered, there's also an option to create an upgrade package to handle the transition (explained a bit further down on the same document).
07-09-2020 06:44 AM
Thanks, that was it.
Key changes
When a key of a list is modified, CDB tries to upgrade the key using the same rules as explained above for adding, deleting, re-ordering, change of type, and change of hash value. If automatic upgrade of a key fails the entire list instance will be deleted.
Looks like since all existing services already have the leaf already it should work.
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