cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1638
Views
5
Helpful
7
Replies

Issue with "no shutdown"

previousqna
Level 5
Level 5

Hi experts,

 

 

Just seeking out your advice on this. As  you know, Cisco interfaces are “shutdown” by default. I’m using NSO for automating link provisioning, but I´m unable to do “no shutdown” via NSO xml template. I added this line on the template:

 

 

<shutdown xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"  nc:operation="disable"/>

 

 

But that doesn’t send the “no shutdown” command. Funny thing is that if I do that via NSO NED interface, I am able to do that.

 

 

admin@ncs(config-if)# devices device GRATSTING config cisco-ios-xr:interface GigabitEthernet 0/0/0/0

 

admin@ncs(config-if)# no shut

 

admin@ncs(config-if)# commit

 

Commit complete.

 

admin@ncs(config-if)#

 

 

And no the NED log I can see NSO it´s actually sending “no shutdown”.

 

 

< 22-Feb-2017::11:05:24.773 INITIALIZED ece54d694505bfb128c14706ee8a3b47

 

>> 22-Feb-2017::11:05:24.774 PREPARE 0:

 

interface GigabitEthernet 0/0/0/0

 

no shutdown

 

exit

 

 

<< 22-Feb-2017::11:05:28.379 PREPARE OK

 

>> 22-Feb-2017::11:05:28.380 COMMIT 0: (Timeout 30)

 

<< 22-Feb-2017::11:05:28.380 COMMIT OK

 

>> 22-Feb-2017::11:05:28.385 PERSIST 0:

 

<< 22-Feb-2017::11:05:28.588 PERSIST OK

 

>> 22-Feb-2017::11:05:28.589 GET_TRANS_ID

 

 

 

Has anyone had this same issue? Im using NSO 4.3 and cisco-iosxr    5.0.2   

 

Shall I TAC it?

7 Replies 7

previousqna
Level 5
Level 5

Just checking are you sure the interfae in not shutdown in the template case? The diff will get rid of the command if the interface is already up.

 

 

Another suggestion , do

 

Commit dry-run | debug template

 

It might show for example if you are not reaching the shutdown line you mention.

I think this should be tags=”delete” instead.

Sorry,

 

 

It was like that

 

 

<shutdown xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="delete"/>

 

 

However I was trying “disable” to see if it made any difference. Still (with proper tag “delete”) it doens do “no shutdown”

 

 

Any advice, please?

My mistake guys. I was using a Juniper template for a Cisco device. The commands are quite similar. Mind the “Netconf” on this xml, Cisco doenst use Netconf:

 

 

<shutdown xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="disable"/>

 

 

And Cisco doens´t use Netconf. Proper command is:

 

 

<shutdown tags="disable"/>

 

 

Sorry for that

 

Sorry for the SPAM,

 

 

For sake of correctness, Cisco command:

 

 

<shutdown tags="delete"/>

This is normally handled by the NED. If you generated the template from ncs, manually test them in the CLI. If the expected command isn't reported in "commit dry-run", you should contact the NED team to investigate.

prathameshket
Cisco Employee
Cisco Employee

I'm using NSO 5.7.1 here..

Instead of using generated XML out of device config, use the below tag, it works for me.   

 

<shutdown tags="delete" />