cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
721
Views
20
Helpful
3
Replies

How to identify changed portion of configuration

Fantolino
Level 1
Level 1

I’ve got a simple list as below

list datalist {

    leaf name {

        type string;

    }

    leaf node {

        type leafref {

            path "/ncs:devices/ncs:device/ncs:name";

         }

    leaf required {

        type int64;

    }

    leaf limit {

        type int64;

    }

I need to apply an algotithm (written in Python) that fires when an item in the list is added or removed. The algotithm is quite taxing so I’d like that it applies only on the changed portion of a configuration. How can I identify the relevant records in the list?

1 Accepted Solution

Accepted Solutions

It might also be worth mentioning that you have persistent opaque data available, if your computations are heavy you might be able to use that to cache partial results. This is the proplist argument for the create callback in python.

View solution in original post

3 Replies 3

hniska
Cisco Employee
Cisco Employee

Kickers or subscribers is the way to go. Both of them are described in the development guide. 

It might also be worth mentioning that you have persistent opaque data available, if your computations are heavy you might be able to use that to cache partial results. This is the proplist argument for the create callback in python.

If you want to run these sort of subscriptions to changes in an external applications, there is aplan to implement RFC 8641 (fresh from last week!) soon.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: