02-14-2018 01:06 AM - edited 03-01-2019 04:06 AM
Hi !
can anyone please help answering below ?
1) where can i find device specific yang files in NSO managed devices?
a)Is it same as ned yang files(eg: ncs-4.4.2\packages\neds\cisco-ios\src\yang)?
b)Does this mean for all ios device <ncs-4.4.2\packages\neds\cisco-ios\src\yang> is the yang model used ?
note : I am trying to push configuration patch request using pyang -f sample-xml-skeleton output of this file on to device
2)I can see four
tailf-ned-cisco-ios,tailf-ned-cisco-ios-id,tailf-ned-cisco-ios-meta,tailf-ned-cisco-ios-oper,tailf-ned-cisco-ios-stats files in package yang folder.
a)What does each mean ?
b)Which file should i complie using pyang -f sample-xml-skeleton in order to use its output as request body for
http://localhost:8080/api/running/devices/device/ios_192.168.99.194/config\?deep
to change configuration of ios device.
Solved! Go to Solution.
02-14-2018 01:28 AM
1) where can i find device specific yang files in NSO managed devices?
a)Is it same as ned yang files(eg: ncs-4.4.2\packages\neds\cisco-ios\src\yang)?
Yes, each NED package has the source YANG files in the src/yang directory.
b)Does this mean for all ios device <ncs-4.4.2\packages\neds\cisco-ios\src\yang> is the yang model used ?
No, usually not. The YANG models used for your devices are taken from your *runtime* packages directory, i.e. where you have the ncs-cdb/ directory. The NSO installation packages directory, that you point to above, contains a few *very old* NED packages, that are just enough to allow you to run the NSO examples.
If you are not running the NSO examples, you have created a runtime directory. In that directory, there is a packages/ directory. The NEDs in use are taken from there. The runtime packages/ directory is empty when you create it, so whatever NEDs you are using are based on what you (or someone else perhaps) copied into this packages directory.
2)I can see four
tailf-ned-cisco-ios,tailf-ned-cisco-ios-id,tailf-ned-cisco-ios-meta,tailf-ned-cisco-ios-oper,tailf-ned-cisco-ios-stats files in package yang folder.
a)What does each mean ?
Each file contains different parts of the model. If you care mostly about configuration data, the only one that is really important to you will be the tailf-ned-cisco-ios.yang file. You will need them all for things to work properly, tho.
b)Which file should i complie using pyang -f sample-xml-skeleton in order to use its output as request body for
http://localhost:8080/api/running/devices/device/ios_192.168.99.194/config\?deep
to change configuration of ios device.
tailf-ned-cisco-ios.yang . But the sample-xml-skeleton feature is not terribly useful, if you ask me.
02-14-2018 01:28 AM
1) where can i find device specific yang files in NSO managed devices?
a)Is it same as ned yang files(eg: ncs-4.4.2\packages\neds\cisco-ios\src\yang)?
Yes, each NED package has the source YANG files in the src/yang directory.
b)Does this mean for all ios device <ncs-4.4.2\packages\neds\cisco-ios\src\yang> is the yang model used ?
No, usually not. The YANG models used for your devices are taken from your *runtime* packages directory, i.e. where you have the ncs-cdb/ directory. The NSO installation packages directory, that you point to above, contains a few *very old* NED packages, that are just enough to allow you to run the NSO examples.
If you are not running the NSO examples, you have created a runtime directory. In that directory, there is a packages/ directory. The NEDs in use are taken from there. The runtime packages/ directory is empty when you create it, so whatever NEDs you are using are based on what you (or someone else perhaps) copied into this packages directory.
2)I can see four
tailf-ned-cisco-ios,tailf-ned-cisco-ios-id,tailf-ned-cisco-ios-meta,tailf-ned-cisco-ios-oper,tailf-ned-cisco-ios-stats files in package yang folder.
a)What does each mean ?
Each file contains different parts of the model. If you care mostly about configuration data, the only one that is really important to you will be the tailf-ned-cisco-ios.yang file. You will need them all for things to work properly, tho.
b)Which file should i complie using pyang -f sample-xml-skeleton in order to use its output as request body for
http://localhost:8080/api/running/devices/device/ios_192.168.99.194/config\?deep
to change configuration of ios device.
tailf-ned-cisco-ios.yang . But the sample-xml-skeleton feature is not terribly useful, if you ask me.
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: