04-25-2022 05:54 AM
Why devicelist has been remove in from service package instance in latest NSO 5.6.4
But in older version we have devicelist and device both.
Any reason of removing ? do NSO team thing only one is sufficent?
04-25-2022 12:01 PM - edited 04-25-2022 12:21 PM
the leaf is still there but it was changed to hidden . You can access to it only throught JAVA or Python.
nabil@DESKTOP-8ECTID4:~/ncs-5.8/src/ncs/yang$ grep -n -i -B 10 -A 10 "device-list" tailf-ncs-services.yang 52- } 53- 54- revision 2021-09-02 { 55- description 56- "Released as part of NCS-5.6. 57- 58- Non-backwards-compatible changes have been introduced. 59- 60- Updated showing data modifications from get-modifications 61- 62: Removed service leaf-list 'device-list'. 63- 64- Removed the action /services/commit-dry-run. 65- 66- Added /services/global-settings/service-callback-timeout. 67- 68- Obsoleted the commit-queue-failed enum for 69- commit-queue/queue-item/status leaf in the service-commit-queue 70- grouping. Use failed enum instead. 71- 72- Removed commit-queue/queue-item/no-of-impacted-services leaf -- 81- description 82- "Released as part of NCS-5.5. 83- 84- Added 'wait-for-lock' grouping to 'deep-check-sync' input."; 85- } 86- 87- revision 2020-06-25 { 88- description 89- "Released as part of NCS-5.4. 90- 91: Marked service leaf-list 'device-list' obsolete, use service 92- 'modified' and 'directly-modified' instead. 93- 94- Marked the action /services/commit-dry-run as obsolete, 95- use 'commit dry-run' instead. 96- 97- Added plan-location to the service-data."; 98- } 99- 100- revision 2020-02-20 { 101- description -- 197- 198- Changed the output format for 'check-sync', 'deep-check-sync', 199- 're-deploy' and 'commit-dry-run' to be consistent."; 200- } 201- 202- revision 2015-11-24 { 203- description 204- "Released as part of NCS-4.1. 205- 206- Added service private data: 207: 'private/device-list' and 'private/service-list'. 208- 209- Added parameters, 'shallow' and 'deep' to service action 210- 'check-sync'. 211- 212- Added parameters, 'shallow' and 'deep' to service action 213- 're-deploy'. 214- 215- Added parameters, 'shallow' and 'deep' to service action 216- 'get-modifications'. 217- 218- Added service 'modified' and 'directly-modified'. 219- 220: Deprecated service leaf-list 'device-list', use service 221- 'modified' and 'directly-modified' instead. 222- 223- Added grouping service-reactive-re-deploy and the use hereof."; 224- } 225- 226- revision 2015-03-19 { 227- description 228- "Released as part of NCS-3.4. 229- 230- Minor description enhancements."; -- 731- type binary; 732- } 733- leaf forward-diff-set { 734- description 735- "Internal node use by NCS service manager to remember 736- the forwards diff for a service instance. This data is 737- is used to produce the proper 'get-modifications' output"; 738- tailf:hidden full; 739- type binary; 740- } 741: leaf-list device-list { 742- description 743- "A list of managed devices this service instance has manipulated."; 744- tailf:hidden full; 745- type string; 746- } 747- leaf-list ned-id-list { 748- description 749- "A list of NED identities this service instance has manipulated."; 750- tailf:hidden full; 751- type string; nabil@DESKTOP-8ECTID4:~/ncs-5.8/src/ncs/yang$
nabil@DESKTOP-8ECTID4:~/ncs-5.8/src/ncs/yang$ grep -n -i -B 35 -A 40 "full" tailf-common* tailf-common.yang-2159- log in clear text but will appear as ***."; tailf-common.yang-2160- } tailf-common.yang-2161- tailf-common.yang-2162- extension hidden { tailf-common.yang-2163- argument tag { tailf-common.yang-2164- tailf:arg-type { tailf-common.yang-2165- type string { tailf-common.yang-2166- pattern '[^\*].*|..+'; // must not be single '*' tailf-common.yang-2167-// YANG 1.1: tailf-common.yang-2168-// pattern '\*' { tailf-common.yang-2169-// modifier invert-match; tailf-common.yang-2170-// } tailf-common.yang-2171- } tailf-common.yang-2172- } tailf-common.yang-2173- } tailf-common.yang-2174- tailf:use-in "leaf"; tailf-common.yang-2175- tailf:use-in "leaf-list"; tailf-common.yang-2176- tailf:use-in "list"; tailf-common.yang-2177- tailf:use-in "container"; tailf-common.yang-2178- tailf:use-in "tailf:action"; tailf-common.yang-2179- tailf:use-in "refine"; tailf-common.yang-2180- tailf:use-in "rpc"; tailf-common.yang-2181- tailf:use-in "action"; tailf-common.yang-2182- tailf:occurence "*"; tailf-common.yang-2183- tailf-common.yang-2184- description tailf-common.yang-2185- "This statement can be used to hide a node from some, or all, tailf-common.yang-2186- northbound interfaces. All nodes with the same value are tailf-common.yang-2187- considered a hide group and are treated the same with regards to tailf-common.yang-2188- being visible or not in a northbound interface. tailf-common.yang-2189- tailf-common.yang-2190- A node with an hidden property is not shown in the northbound tailf-common.yang-2191- user interfaces (CLI and Web UI) unless an 'unhide' operation has tailf-common.yang-2192- been performed in the user interface. tailf-common.yang-2193- tailf-common.yang:2194: The hidden value 'full' indicates that the node should be hidden tailf-common.yang-2195- from all northbound interfaces, including programmatical interfaces tailf-common.yang-2196- such as NETCONF. tailf-common.yang-2197- tailf-common.yang-2198- The value '*' is not valid. tailf-common.yang-2199- tailf-common.yang-2200- A hide group can be unhidden only if this has been explicitly tailf-common.yang-2201- allowed in the confd.conf(5) daemon configuration. tailf-common.yang-2202- tailf-common.yang-2203- Multiple hide groups can be specified by giving this statement tailf-common.yang-2204- multiple times. The node is shown if any of the specified hide groups tailf-common.yang-2205- has been given in the 'unhide' operation. tailf-common.yang-2206- tailf-common.yang-2207- The CLI does not support using this extension on key leafs where tailf-common.yang-2208- it will be ignored. tailf-common.yang-2209- tailf-common.yang-2210- Note that if a mandatory node is hidden, a hook callback tailf-common.yang-2211- function (or similar) might be needed in order to set the tailf-common.yang-2212- element."; tailf-common.yang-2213- }
Example on how to access in Python on NSO 5.8
In [1]: dev_list = root.vpn.l3vpn["aa"].private.device_list In [2]: for dev in dev_list: ...: print(dev) ...: TEST-IOS-XR-3.01
04-25-2022 12:57 PM
04-25-2022 10:56 PM
I see it is as private, Quick question, then to fetch device attach to service instance , we can use device instead of device-list. Device-list don't have any device.
In [1]: dev_list = root.vpn.l3vpn["aa"].device In [2]: for dev in dev_list: ...: print(dev)
@vle So we can use this to fetch all device attached to NSO service package instance. . SO we should not use devicelist as that is private.
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