05-25-2020 12:51 PM - edited 05-25-2020 12:52 PM
Hi, I have the following problem:
I have a services (service A) that when is created populate his path in another service (Service B). Service B have multiple path of instances of service A.
I want to make an action that read all service path in Service B, and delete the corresponding services A.
Here is the problem, to get the service object in Python from the path string I use:
service_to_delete = ncs.maagic.get_node(t, service_path)
del service_to_delete
But this only delete the Python object service_to_delete, and not the CDB service, as is explained in the nso docs.
If I use:
del ncs.maagic.get_node(t, service_path)
I get an error on package reload:
*** ALARM package-load-failure: [SyntaxError: can't delete function call]
Is there a delete_node() function or a workaround to solve this?
Solved! Go to Solution.