cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
272
Views
0
Helpful
3
Replies

How to implement SHARED route policy in NSO?

Elvin J
Level 1
Level 1

Hi, I want to create one shared route policy  that multiple services can use. With my current implementation, this shared policy gets rewritten every time, which is not what I want. I want it to be extended with each request instead. Even if I can manage shared RPL to be extended , I think the other connected services will get out of sync. Do you have any ideas or suggestions on how to do this?

1 Accepted Solution

Accepted Solutions

After some conversation with Elvin, we now have this small NSO example package.

https://github.com/StefanoNovello/shared-route-policy/

 

View solution in original post

3 Replies 3

snovello
Cisco Employee
Cisco Employee

The issue here is you are probaly using the IOS-XR CLI NED that models a route policy as a name and a single leaf with the policy definition. If the policy definition has a structure and different services for example can add a 'match' in the policy, then the way to do this is to have a service dedicated to managing the route policy. You model that service as you need, for exampl with a leaf-list of matches. The create callback of your services goes through the list of matches and build the required policy string.

Then the services that require a match to be added, specify that match in the template by adding a match under the service that manages the route policy. That's an example of the stacked services pattern, where the template of a service is specifying what it's intent is, in terms of a lower level service.

Thanks for the answer, could you please show example code?

After some conversation with Elvin, we now have this small NSO example package.

https://github.com/StefanoNovello/shared-route-policy/