cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1041
Views
0
Helpful
2
Replies

Reading YANG extensions via Python API

dvulovic
Cisco Employee
Cisco Employee

Hi team,

 

how we can use NSO Python APIs (MAAPI and/or Maagic) to read custom-defined YANG extensions in the node, such as:

 

extension my-ext {

 argument "arg1";

}

...

leaf some-leaf {

 ...

 my-ext "arg1value";

}

 

Thanks in advance!

1 Accepted Solution

Accepted Solutions

dvulovic
Cisco Employee
Cisco Employee

Hi Ram,

 

thanks for the answer! I found a workaround with the use of built-in tailf:meta-data extension.

 

Best regards,

Djordje

View solution in original post

2 Replies 2

ramkraja
Cisco Employee
Cisco Employee

Custom extensions are ignored by NSO. They are for your own use, however you intend to do it (using your own tools). 

The module 'tailf-common.yang' defines the extensions that NSO itself uses internally, and only those extensions are parsed/stored in the compiled fxs files. It is ok to have other extensions in your yang models, but they are not stored in the fxs files or exposed via any APIs.

 

Thanks,

Ram

dvulovic
Cisco Employee
Cisco Employee

Hi Ram,

 

thanks for the answer! I found a workaround with the use of built-in tailf:meta-data extension.

 

Best regards,

Djordje