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

How to allow out of band config under service config tree

cnicasio
Level 1
Level 1

We have a service that adds a configuration to a device, like in the following example:

 

devices device XX
config
cisco-ios-xr:router bgp 65000

address-family ipv4-unicast
exit
exit
!

 

We need that if an operator manually (thru NSO) adds config in a subtree of the config the service creates, , the service is not taken "out of sync". Is this possible? In the above example, one example could be to add "address-family ipv6 unicast" under bgp.

 

3 Replies 3

rogaglia
Cisco Employee
Cisco Employee

The answer will depend on what is your service doing and what are you considering "out of sync". Remember that in a template, you have different tabs such as "create", "replace", "nocreate", "merge", "delete" and that can help you dealing with the your problem. Moreover, there are even tags to deal with "ordered-by user" lists when you want to either impose a specific check-sync behavior with tags like "insert" and "guard".

 

A typical issue are with lists elements and containers that NSO is creating in the create() code and then you modify out-of-band. The question then raises, what does check-sync means? Does it mean that you have the exact same configuration (no more and no less) that the service created or just checking that the configuration that the service needs is there (which seams the behavior you are looking for)? Please note that some services would not work if you "add configuration" and NSO does not know what is "harmless" config.

 

In the case of "check-sync" it is the former (nothing missing but nothing added) as it run the Fastmap algorithm to compares the output with the device config in NSO.

 

If you know you are interested in modifying the content of a list element or container outside of NSO, you may want to explore creating the list outside of Fastmap into per-modifications logic. That will probably give you the output from "check-sync" that you are expecting for your usecase.

cnicasio
Level 1
Level 1

Thanks a lot for your answer. We will try the suggestions you mentioned...

We did extra tests, but couldn't find a solution. In the case of an XML template that adds a list element with "merge" tags, we found the following behavior:

 

1) If before applying the service template, there exist list elements in CDB, then the "merge" works as expected, the extra list elements do not take the service out of sync. Moreover, if after applying the service template we add extra list elements thru NSO /devices/device, services is kept in-sync.

 

2) In the case the list does no exist before applying the template, if after applyng the service template we add extra list elements thru NSO /devices/device, the service is taken out of sync.

 

What we need is a way to enabling operators to add list elements manually AFTER service deployment....