10-06-2017 07:08 AM - edited 03-01-2019 04:00 AM
I referred to Create a device using REST
But I would like to create a service model for adding a device. Is it possible?
Solved! Go to Solution.
10-09-2017 09:01 AM
Adding the device using a service is no problem, the challenge is usually to get SSH keys and sync from the device, this cannot be done from the service create code.
Creating an "add device" action might be an easier approach, unless you want the service semantics.
10-08-2017 06:51 PM
From NSO's perspective, there aren't any restrictions. A service can be modeled in YANG and then mapped to other models [device/service].
What is the intended value-add of the above described service?
10-09-2017 09:01 AM
Adding the device using a service is no problem, the challenge is usually to get SSH keys and sync from the device, this cannot be done from the service create code.
Creating an "add device" action might be an easier approach, unless you want the service semantics.
10-09-2017 09:44 AM
Thanks for the reply.
Will give a try to create a service model.
10-10-2017 11:48 AM
Please note that Fredrik was very careful to say "action".... as opposed to "service"....
if you need to do this in NSO (as compared with any other approaches mentioned), you should do it as an "action" -- not as a service...
cheers
gregg
10-17-2017 11:14 PM
Another option is to first map your service to create the device entry.
Then kick off your action that Fredrik mentioned (to fetch SSH keys and sync-from) via a kicker instance watching over your service.
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