cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
148
Views
0
Helpful
3
Replies
Highlighted
Beginner

CISCO NSO NED ncs-4.7.8-alu-isam-1.2

Hi all,

I'm running NSO services on Nokia 7360 devices and alu-isam NED (ncs-4.7.8-alu-isam-1.2).

I need to investigate when NED software could put a template command in "shutdown".

Taking a look into NED implementation I've found shutdown management in java object IsamNedCli.java.

Besides in MetaDataTransformer.java I find the definition of a meta command SHUTDOWN_BEFORE_DELETE

defined as follows:

...

case SHUTDOWN_BEFORE_DELETE:
/*
* Some list entries must be shutdown properly before they
* can be deleted.
*/
if (!line.trim().startsWith("no ")) {
break;
}
outlines.add(line.replaceAll("no\\s+(.*)$", "$1 shutdown"));
break;

...

My question is simple:

in which cases is it expected that a command is shutdown?

Thanks for help,

 

Giuliana

2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted

Thank you forn the tip!

I've found in the yang model the annotation that you're referring to. At this point, I need to focus on the section "// service / vpls * " and in particular on the leaf "shutdown" which has default value true, because my problem is to understand in which case NED sets this default value (true) instead of setting leaf value "shutdown" to false as setted by service template command. It could be when  NED software has to make a rollback ? A rollback request can be interpreted as delete operation by NED software?

I report below a piece of  NED yang model, thanks for reply!

 

.....

.....

// service / vpls *
list vpls {
tailf:info "Configure a Virtual Private LAN Service";
tailf:cli-recursive-delete;
tailf:meta-data "shutdown-before-delete";
key service-id;
leaf service-id {
type id;
}

.....

.....

// service / vpls * / shutdown
leaf shutdown {
tailf:info "Enable/disable service";
tailf:cli-boolean-no;
tailf:cli-show-with-default;
tailf:ned-default-handling report-all;
type boolean;
default true;
}
}
}

 

 

View solution in original post

Highlighted

Hello,
On rollbacks:
The rollback files if you look at them simply contain an edit of the dB,. Executing a rollback is simply loading that edit. So yes a rollback of a create operation then simply turns into a delete. The NED is unaware if an edit happened because it was created directly by a user or via a rollback. It is working simply on the changes required by the edit transaction, which come from the edit itself plus the logic and templates in any services that were edited i.e. the outcome of fastmap

On your issue with the ISAM NED
I don’t want to discourage you from trying to understand how the NED works, but if you are actually experiencing an issue where the NED is not configuring the device properly, then you should open a TAC case to get it resolved quickly. Then if you are interested in how things work you can look at how the code changed after your issue was fixed.

I looked at the NED code briefly and its just injecting a shutdown command before deleting a list element, you should see these when you do a commit dry run outformat native, or by turning on the trace for the device.

View solution in original post

3 REPLIES 3
Highlighted
Cisco Employee

In the yang model you have an annotation tailf:meta-data "shutdown-before-delete" that controls this behaviour.
Highlighted

Thank you forn the tip!

I've found in the yang model the annotation that you're referring to. At this point, I need to focus on the section "// service / vpls * " and in particular on the leaf "shutdown" which has default value true, because my problem is to understand in which case NED sets this default value (true) instead of setting leaf value "shutdown" to false as setted by service template command. It could be when  NED software has to make a rollback ? A rollback request can be interpreted as delete operation by NED software?

I report below a piece of  NED yang model, thanks for reply!

 

.....

.....

// service / vpls *
list vpls {
tailf:info "Configure a Virtual Private LAN Service";
tailf:cli-recursive-delete;
tailf:meta-data "shutdown-before-delete";
key service-id;
leaf service-id {
type id;
}

.....

.....

// service / vpls * / shutdown
leaf shutdown {
tailf:info "Enable/disable service";
tailf:cli-boolean-no;
tailf:cli-show-with-default;
tailf:ned-default-handling report-all;
type boolean;
default true;
}
}
}

 

 

View solution in original post

Highlighted

Hello,
On rollbacks:
The rollback files if you look at them simply contain an edit of the dB,. Executing a rollback is simply loading that edit. So yes a rollback of a create operation then simply turns into a delete. The NED is unaware if an edit happened because it was created directly by a user or via a rollback. It is working simply on the changes required by the edit transaction, which come from the edit itself plus the logic and templates in any services that were edited i.e. the outcome of fastmap

On your issue with the ISAM NED
I don’t want to discourage you from trying to understand how the NED works, but if you are actually experiencing an issue where the NED is not configuring the device properly, then you should open a TAC case to get it resolved quickly. Then if you are interested in how things work you can look at how the code changed after your issue was fixed.

I looked at the NED code briefly and its just injecting a shutdown command before deleting a list element, you should see these when you do a commit dry run outformat native, or by turning on the trace for the device.

View solution in original post