cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
434
Views
10
Helpful
1
Replies

Reconciliation of NSO service while skipping infra/day0 config

vipsinha
Cisco Employee
Cisco Employee

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". 

devices device DU01-Core-ASR9k-1

cisco-ios-xr:router ospf 100   <-- Skip reconciliation
 area 0    <-- Skip reconciliation
  interface TenGigE0/2/0/0  <-- Need to reconcile from here onwards
   bfd minimum-interval 300
   bfd fast-detect
   bfd multiplier 3
   cost 10
  exit
 
1 Reply 1

radioman
Spotlight
Spotlight

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