10-08-2017 10:10 PM - edited 03-01-2019 04:01 AM
Hi,
Suppose that I have an action that invokes multiple nested actions, and those nested actions connect to devices to fetch some data (e.g. using exec actions or RPCs). All actions are implemented in python.
The idea is to have modular actions that will be reused in different occasions by different "main" actions.
Is there any way to write the code in such way that will optimize the execution of such actions?
For example, all device calls are usually made to the same device sequentially.
Is there a way to make NSO reuse the same device sessions, rather than establishing new ones?
Any other steps that can optimize such implementation?
Thanks,
Yftach
Solved! Go to Solution.
10-09-2017 07:24 AM
Yes, that one, and this:
- Python API: It was not possible to e.g. call an action from inside
another action or service if they were both registered to the same
ncs.dp.Daemon. This has been fixed.
Point being, you probably want NSO 4.5 for your experiments.
10-09-2017 05:57 AM
There are some improvements in this area in the NSO 4.5 CHANGES file. Have a look.
10-09-2017 06:26 AM
Hi Jan,
Can you point me to the relevant changes in the file?
Is this the one?
"Python API: Service and Action now execute requests in separate threads improving parallelism."
If so, how do we take advantage of that?
Thanks,
Yftach
10-09-2017 07:24 AM
Yes, that one, and this:
- Python API: It was not possible to e.g. call an action from inside
another action or service if they were both registered to the same
ncs.dp.Daemon. This has been fixed.
Point being, you probably want NSO 4.5 for your experiments.
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