cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
394
Views
4
Helpful
3
Replies

inheritance in NSO python service packages

yfherzog
Cisco Employee
Cisco Employee

Hi,

Are there any caveats in using inheritance in NSO service packages (particularly python)?

Suppose that I want all my service packages to use a single topology model, and I want to implement some methods for that purpose.

Currently, we're implementing those in one class and having all services import from this class.

The question is whether instead we can have the service inherit from this class and use the methods implemented by the super class?

Any special considerations needed to be taken comparing to inheritance in other python packages (outside of NSO)?

Thanks,

Yftach

1 Accepted Solution

Accepted Solutions

Yes, many NSO python packages use class hierarchies and inheritance.

View solution in original post

3 Replies 3

frjansso
Cisco Employee
Cisco Employee

Not AFAIK, as long as you get the search paths between the packages correct, which I assume you already have, you should be good.

Yes, many NSO python packages use class hierarchies and inheritance.

yfherzog
Cisco Employee
Cisco Employee

Thank you both for the prompt answers!

Yftach

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: