cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1433
Views
0
Helpful
6
Replies

Sequencing of operations - NSO

me.sarath
Level 1
Level 1

How does the service mapping handle the sequencing of steps in NSO?

 

For example, I am developing an NMS application to create a LA(Link Aggregation) which, I have defined as a service.

 

 There are a sequence of operations expected from device side in the following order for LA creation becoming operational.

 

- Enable LA in the switch
- Create LA
- Associate port to LA
- Associate VLAN to LA

 

As I have defined a single service to create the LA, the above operation need to be in sequence.

Can it be achieved through NSO?

 

Thus far,

- I am thinking about breaking up the LA creation services to 4 different services

- Or using Reactive Fastmap for each of the above steps.

 

Can anyone give advantage/disadvantage/better option?

 

Regards

Sarath

1 Accepted Solution

Accepted Solutions

Hi Sarath,

NED ordering can be analyzed in the /package/src/yang/-.yang files. Specifically the 'tailf-ned-package-name.yang' or for example: packages/cisco-ios/src/yang/tailf-ned-cisco-ios.yang.

Go into the file and check how the YANG model is configured per command. One example would be:

container policy-class {
tailf:info "Specify classs for policy-based tunnel selection";
choice policy-class-choice {
leaf-list values {
tailf:cli-drop-node-name;
tailf:cli-flat-list-syntax;
tailf:cli-remove-before-change;
ordered-by user;
type uint8 {
tailf:info "<1-7>;;Tunnel policy class Value(s)";
range "1..7";

In the above example from an cisco-ios-xr package, the ordering would be determined by the user via 'ordered-by user'. For more yang information, feel free to reference https://tools.ietf.org/html/rfc6020#section-4.1 for any and everything about yang configurations and how it works.

View solution in original post

6 Replies 6

KJ Rossavik
Cisco Employee
Cisco Employee
The NED should ensure that the commands are applied in the right order. So you should be able to do all of this in one transaction, and without considering ordering in your application.

hniska
Cisco Employee
Cisco Employee

If the ordering is required by the device then the NED will send the commands in the right order (or should, if not you should file a bug report). 

 

If the ordering is just for your own/external needs then you should probably look in to have a reactive FASTMAP loop. 

Thanks Rossavik and hniska for the reply.

Curious to know how the NED will order the sequencing.

 

Should the data model(In my case, Yang) contain the ordering dependencies ?

If yes, how is such dependency added in a YANG.

 

Regards

Sarath

Hi Sarath,

NED ordering can be analyzed in the /package/src/yang/-.yang files. Specifically the 'tailf-ned-package-name.yang' or for example: packages/cisco-ios/src/yang/tailf-ned-cisco-ios.yang.

Go into the file and check how the YANG model is configured per command. One example would be:

container policy-class {
tailf:info "Specify classs for policy-based tunnel selection";
choice policy-class-choice {
leaf-list values {
tailf:cli-drop-node-name;
tailf:cli-flat-list-syntax;
tailf:cli-remove-before-change;
ordered-by user;
type uint8 {
tailf:info "<1-7>;;Tunnel policy class Value(s)";
range "1..7";

In the above example from an cisco-ios-xr package, the ordering would be determined by the user via 'ordered-by user'. For more yang information, feel free to reference https://tools.ietf.org/html/rfc6020#section-4.1 for any and everything about yang configurations and how it works.

Thanks Joepak for the reply.

 

Isn't ordered-by only applicable to a leaf list? 

I could not get around how it could have an impact on this use case.

 

For e.g., 

- Enable LA in the switch
- Create LA

 

When I create an LA(Set a list of attributes), it requires that the Enable LA(boolean value) is set to true.

If I create a service with attributes required for both these operations(Enable LA and Create LA), how can we sequence it so that Enable LA is executed first and then the Create LA.

I am sorry if the question is naive. I am a beginner. :-)

 

Regards

Sarath

I would refer to an existing tail-f NED and see how they compile their yang modeling/structures for when certain reqs are mandatory to configure. Search for a particular function that has prerequisites to be configured such as LACP/Port channeling in the cisco-ios NED.

I hope that reference will provide clarity.

Thank you :)