05-09-2017 04:47 AM - edited 03-01-2019 03:47 AM
Hi All,
I am trying to implement a transaction callback to validate delete operation on yang. I need to differentiate between create and delete operation on yang. Is there a way to know the operation from yang?
Appreciate the help.
Solved! Go to Solution.
05-09-2017 04:47 AM
As you’re probably aware, there’s no “delete” callback for a service. This is because fastmap is expected to take care of the delete for you.
If you need to do some things on delete, you have a few options: use other call back points, use a CDB subscriber/kicker to do any post delete tasks, or use a more extensive reactive fastmap based solution.
For the other call backs there are pre_modification and post_modification, that do get passed the operation type as a parameter. If you need to do something simple (such as perform a check on something in the device tree and if it’s there, abort the delete), this is the best option.
I believe that answers your question. If you’re trying to do something more complex than some simple checks – something that has a side effect action such as connecting to another system to do something – then you really should be looking at a CDB subscriber.
If you have something even more extensive, such as a phased delete, I’d suggest investigating Nano Services – but that’s a complex design topic that can’t really be addressed via email - usually preMod and/or kicker can solve the challenges raised by most delete scenarios.
05-09-2017 04:47 AM
As you’re probably aware, there’s no “delete” callback for a service. This is because fastmap is expected to take care of the delete for you.
If you need to do some things on delete, you have a few options: use other call back points, use a CDB subscriber/kicker to do any post delete tasks, or use a more extensive reactive fastmap based solution.
For the other call backs there are pre_modification and post_modification, that do get passed the operation type as a parameter. If you need to do something simple (such as perform a check on something in the device tree and if it’s there, abort the delete), this is the best option.
I believe that answers your question. If you’re trying to do something more complex than some simple checks – something that has a side effect action such as connecting to another system to do something – then you really should be looking at a CDB subscriber.
If you have something even more extensive, such as a phased delete, I’d suggest investigating Nano Services – but that’s a complex design topic that can’t really be addressed via email - usually preMod and/or kicker can solve the challenges raised by most delete scenarios.
05-09-2017 04:47 AM
Thanks for the quick turnaround. I am exploring to see device service list and abort delete operation. Thanks for the valuable inputs.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: