09-19-2022 06:30 AM
Hi, I have a Service that config two Devices, one GPON access node (OLT) and one GPON CPE (ONU) (Is a special device that require direct config via telnet besides the config to the OLT).
Due to some bug in the CPE (No DHCP Discovery retries), I need that the config to the OLT to go first.
Is there any way to chose which device config first? Even if I use two separe template, since is one transaction, NSO choose which device config first (in alphabetic order I guess).
I suppose Nano services is the only way to do this, but maybe there is an easy way.
Thanks
Solved! Go to Solution.
09-19-2022 07:09 AM
You are correct inside a single transaction you have no control over the ordering of devices. Actually unless you run out of threads (in which case threads will do multiple devices in sequence) the devices will all be provisioned in parallel all at once.
Nano services as you suggest is one way to go, its a relatively simple plan with two steps no pre-post conditions etc. Note that a nano-service is an asynchronous construct, when you create it from an API, that API returns after the first commit, so you get a +ve response in your case once the OLT is configured. The CPE configuration then happens asychronously and you may want to wait for it to coplete.
An alternative when calling from an API that you want to keep synchronous is to use a flag, say you have a boolean leaf configure-cpe You make one call with the value set to false to configure the OLT, then you make same call with value set to true to configure the CPE.
09-19-2022 07:09 AM
You are correct inside a single transaction you have no control over the ordering of devices. Actually unless you run out of threads (in which case threads will do multiple devices in sequence) the devices will all be provisioned in parallel all at once.
Nano services as you suggest is one way to go, its a relatively simple plan with two steps no pre-post conditions etc. Note that a nano-service is an asynchronous construct, when you create it from an API, that API returns after the first commit, so you get a +ve response in your case once the OLT is configured. The CPE configuration then happens asychronously and you may want to wait for it to coplete.
An alternative when calling from an API that you want to keep synchronous is to use a flag, say you have a boolean leaf configure-cpe You make one call with the value set to false to configure the OLT, then you make same call with value set to true to configure the CPE.
09-19-2022 07:17 AM
Hi, Thanks for the answer!
I will try the nano service with the flag.
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