03-30-2022 12:21 AM
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.
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.
But i want output like this.
04-01-2022 11:59 AM
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" } } }
04-01-2022 01:00 PM - edited 04-01-2022 01:01 PM
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
04-01-2022 01:02 PM - edited 04-01-2022 01:07 PM
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
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