09-06-2022 11:59 AM
Hello Experts,
I am looking to find a solution for a NSO service reconciliation scenario wherein service config lies under some infra/day0 config tree. My objective is to skip reconciliation of the day0 config while reconciling the service config.
For eg:
My service creates interface instances under "router ospf <name> area <id>". Since the service only creates interface config under "router ospf area", I don't want to reconcile "router ospf area".
09-07-2022 11:54 AM
Hi
To control where the reconciliation is happening, you have to tell your service from where you should begin merging config. In the below example we tell the NSO service, to not create or take ownership of anything above the interface.
<config-template xmlns="http://tail-f.com/ns/config/1.0">
<devices xmlns="http://tail-f.com/ns/ncs">
<device tags="nocreate">
<name>{pe}</name>
<config>
<router xmlns="http://tail-f.com/ned/cisco-ios-xr">
<ospf>
<name>100</name>
<area>
<id>0</id>
<interface tags="merge" >
<name>TenGigE0/2/0/0</name>
<bfd>
<minimum-interval>300</minimum-interval>
<fast-detect/>
<multiplier>3</multiplier>
</bfd>
<cost>10</cost>
</interface>
</area>
</ospf>
</router>
</config>
</device>
</devices>
</config-template>
Just notice that if you don't have the ospf area already configured when you apply the template nothing will be added.
More on info on this topic can be found in the development guide "Chapter 15. Templates" section "Template tag operations" (page 357 in nso_development-5.8.3.pdf)
br.
Kristoffer Larsen
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide