cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
601
Views
5
Helpful
3
Replies

Can i get list of devices which are not in-sync in a service package?

himanss4
Cisco Employee
Cisco Employee

I have deployed a service package in NSO and create a subscription for that services.

Check in  pic I have service package instance with which i have two device attach to check check-sync of them.

NSOserviceinstancesec.png

 

Now i want to run Some api in service package instance which fetch in which device is not in sync or in sync. Currently if i do check-sync in service it is giving in-sync and not in-sync but it is not giving which device is not in chekc sync .

Check below image.

 

checksyncind.png

 

But i want output like this.

 

{
    "ntp:output": {
        "in-sync"true
         devices:[{
                         ios1:{in-sync:true}
                         },
                        {
                          ios2:{in-sync:false}
                        }
                     ]
    }
Means i want device status also to be in that output. Is there is such api?
 
 

 

3 Replies 3

Nabsch
Spotlight
Spotlight

Hello,

 

When using  a check-sync it's only comparing the content of the CDB . It will compare the device config with the configuration that should be generated by your service. It mean that you are considering that the device is in-sync. Otherwise you can also use deep-check-sync.

 

In my example i have a service instance that configure two devices.

 

You can try to execute the action deep-check-sync if you get an empty  data it mean that service configuration are in-sync.

 

 

admin@ncs# vpn l3vpn aa deep-check-sync outformat cli
cli {
    local-node {
        data
    }
}
admin@ncs# vpn l3vpn aa deep-check-sync outformat cli | display json
{
"cli": {
"local-node": {
"data": ""
}
}
}

Otherwise you will get only the device that are out-of-sync

 

 

admin@ncs# vpn l3vpn aa deep-check-sync outformat cli
cli {
    local-node {
        data  devices {
                   device TEST-IOS-XR-3.01 {
                       config {
                           vrf {
                               vrf-list aa {
                                   address-family {
                                       ipv4 {
                                           unicast {
                                               export {
                                                   route-target {
              +                                        address-list 64512:1 {
              +                                        }
                                                   }
                                               }
                                           }
                                       }
                                   }
                               }
                           }
                       }
                   }
               }

    }
}
admin@ncs# vpn l3vpn aa deep-check-sync outformat cli | display json
{
  "cli": {
    "local-node": {
      "data": " devices {\n     device TEST-IOS-XR-3.01 {\n         config {\n             vrf {\n                 vrf-list aa {\n                     address-family {\n                         ipv4 {\n                             unicast {\n                                 export {\n                                     route-target {\n+                                        address-list 64512:1 {\n+
                            }\n                                     }\n                                 }\n                             }\n                         }\n                     }\n
}\n             }\n         }\n     }\n }\n"
    }
  }
}

 

 

 

 

Is there a special command to enable deep-check-sync?

When I tried to run the command, it gives me an error:

admin@ncs# devices device iox-ucs-012 config deep-check-sync
---------------------------------------------^
syntax error: incomplete path 

I am running NSO-5.7.1.

Yan

The deep-check-sync can only be done on service instance not on device.

 

If you want to compare the CDB with the device-config you can use compare-config

 

devices device TOTO compare-config