05-09-2017 06:32 AM - edited 03-01-2019 03:47 AM
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?
05-09-2017 06:32 AM
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.
05-09-2017 06:32 AM
I think this should be tags=”delete” instead.
05-09-2017 06:32 AM
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?
05-09-2017 06:33 AM
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
05-09-2017 06:33 AM
Sorry for the SPAM,
For sake of correctness, Cisco command:
<shutdown tags="delete"/>
05-09-2017 06:33 AM
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.
05-04-2022 08:29 PM
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" />
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide