07-26-2024 08:54 AM
We're currently running NSO 5.7, and we're working to upgrade to 6.x and are looking at the required changes to our service packages.
One of my service packages takes advantage of the reference counting in Python by creating a configuration in every instance, but in reality it's only built once and the same config is used by every service, and with the config remaining through service deletes until the last service using it(regardless of it was the originating service) is removed.
In the NSO 6.x documentation it says that this is enabled by default for XML and Python:
Services Deep Dive - Network Services Orchestrator (NSO) v6.1 - Cisco DevNet
"A well-known solution to this kind of problem is reference counting. NSO uses reference counting by default with the XML templates and Python Maagic API, while in Java Maapi and Navu APIs, the sharedCreate()
, sharedSet()
, and sharedSetValues()
functions need to be used."
This would imply that the create() function in Python already does this, similar to the 5.7 functionality. But in the Python API docs, it says the shared_* versions of those functions should be used.
Python API Overview - Network Services Orchestrator (NSO) v6.1 - Cisco DevNet
Can someone clarify if it's required to update all of these function calls to the shared equivalents?
Thanks,
Jason
Solved! Go to Solution.
07-29-2024 03:33 AM - edited 07-29-2024 03:34 AM
Your Python API Overview link points to the low-level Python API, where you must use the shared_* versions in your service code.
The documentation you quote refers to the Python Maagic API, which is used on top of high-level MAAPI.
07-29-2024 03:33 AM - edited 07-29-2024 03:34 AM
Your Python API Overview link points to the low-level Python API, where you must use the shared_* versions in your service code.
The documentation you quote refers to the Python Maagic API, which is used on top of high-level MAAPI.
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