cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2427
Views
0
Helpful
2
Comments
Jan Lindblad
Cisco Employee
Cisco Employee

 

Abstract: RFM services can be hard to implement. Especially the lifecycle management of the delete case of the service can be a challenge. Nano Services uses an executable plan and kickers to supports the full lifecycle of a RFM service.

 

Speaker: Try Ryeng

Comments
Good morning,
my goal is to create a SERVICE in JAVA that must delete, through a template, the instance of a different service and then commit it. We say Service1 the service that must delete and Service2 the service that must be deleted.
Subsequently Service1 must recreate the instance of Service2 with a new json.
All this must be done in Service1 .
The problem is not the cancellation and creation of Service2 but the commit between cancellation and creation.
I open a transaction inside wich I delete Service2 instance and I apply the template:
   maapi.ncsApplyTemplate(tid, "deleteService2-Template", newPath, myVarsDelete, true, true);
  maapi.applyTrans(tid, false);
But I take Aborted: TimeOut on instruction maapi.applyTrans(tid, false);.
 
My question is:
1) is it right way to implement in a single transaction both the operations? (cancellation and creation)
2) If so, do anyone has idea in wich way can I overcome the timeout?
 
Thanks a lot for any contribution 
 
Jan Lindblad
Cisco Employee
Cisco Employee

I have to admit your use case sounds a bit odd. But if this what you need to do, you need to use the RFM or Nano service design patterns. The design you outline above (starting and committing a transaction in create()) has no chance of working.

 

Have a look at the NSO examples collection, e.g.

examples.ncs/service-provider/virtual-mpls-vpn

or

examples.ncs/getting-started/developing-with-ncs/20-nano-services

 

Getting Started

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:

Quick Links