cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
712
Views
1
Helpful
2
Replies

Need to understand operation on yang in transactioncallback.

previousqna
Level 5
Level 5

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.

1 Accepted Solution

Accepted Solutions

previousqna
Level 5
Level 5

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.

View solution in original post

2 Replies 2

previousqna
Level 5
Level 5

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.

Thanks for the quick turnaround. I am exploring to see device service list and abort delete operation. Thanks for the valuable inputs.