cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
460
Views
15
Helpful
2
Replies

Configuration at the service instance deletion

Fantolino
Level 1
Level 1

I use I was required to set a portion of configuration on a Junos device (a static route) when a service instance is deleted (python-and-template package).

Fast-map does not do work, since the package (in creation) does not touch that portion of configuration (if it deleted it it would work).

I managed to save all the required info in proplist but I don't know how to apply the configuration, since I cannot create the required template with the command "template = ncs.template.Template(service)".

How can I do?

 

2 Replies 2

hniska
Cisco Employee
Cisco Employee

The create code isn't executed on delete but you can create a subscriber or kicker that would do something on delete. 

https://developer.cisco.com/docs/nso/guides/#!kicker

https://developer.cisco.com/docs/nso/api/#!ncs-cdb

hniska
Cisco Employee
Cisco Employee

the subscriber or kicker would on delete, execute an action that would then add the route to the juniper router.