11-18-2022 03:58 AM
Hello,
I have built own NETCONF NED using NSO tool. Config data are working fine, but missing device platform or version, which are operational data. I can get them using vendor specific YANG models, but need these steps to be done automatically after connection to device. What is the best way to implement this? Java code that is part of NED package? Could you please advice?
Thank you.
Tomas
11-21-2022 01:47 PM
Hello Thomas,
I don't think you can using the Netconf Ned because there is no Java Code but you can with the generic NED. Cisco has a generic NED for Netconf device that support setting up the device platform.
You can also develop an action that can perform the RPC using Netconf then set the device platform in Java or Python using Maapi
Best Regards
Best Regards,
Nabil
12-05-2022 12:44 AM
The Device Automaton package (https://gitlab.com/nso-developer/device-automaton) supports automatic NED selection based on the capabilities announced in NETCONF. You could use that package and also gain a bunch of other functionality or if you really want to implement it yourself, you can have a look at the code, most stuff related to ned-id selection is in https://gitlab.com/nso-developer/device-automaton/-/blob/master/packages/device-automaton/python/device_automaton/device_detect_ned_id.py Briefly, what it does is first to set ned-id to `netconf` so that the device can be created (there must be a NED configured), then NSO can talk to the device and get the capabilities after which the Device Automaton can inspect the capabilities of the device and compare to the NED currently loaded in the system and pick the best fit. It then changes the ned-id configured in NSO and can from there perform the rest of the device automaton steps, like synchronizing the configuration and replacing factory credentials on the device.
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