09-23-2021 02:23 AM
on ASR1K (IOSXE). I want to run "hw-module slot 0 reload" via the script , but after apply the command , you need to enter or type "y" Enter to confirm the Change.
SW version: System image file is "bootflash:asr1000rpx86-universalk9.16.09.04.SPA.bin"
<hostname>#hw-module slot 0 reload
Proceed with reload of module? [confirm]y
"hw-module slot 0 reload;y\r" ==> this command is working OK, on Unix. but not on ASR1k, it didn't work.
We suspected the \r is not "Enter" in Cisco. or it might apply "y\r" before waiting for [confirm], on my script cannot run expext on the script or don't have delay or sleep on cli.
Please advise,
Thanks,
09-23-2021 02:29 AM
what script you using can you show the bit of script.
09-24-2021 09:42 PM
I used Virtual Operation (VO) liked a GUI mode based on NodeRed (Javascript) in the backgroup. I think it built by my company, not commercial one.
eg:
I just set
ne = "<device_name>
cmd = "<d>;</d>hw-module slot 0 reload;y\r"
<d>;</d> is to set ";" as delimitor between two cmd.
I did try.
cmd = "<d>;</d>show clock; show version" , it was working OK, but for cmd = "<d>;</d>hw-module slot 0 reload;y\r" , it showed error msg as time out as no confirmation or Enter key.
So I suspected my script sending y\r before the router asking for confirmation or \r not equal Enter key.
I did try to cmd = "<d>;</d>hw-module slot 0 reload;y\r\n" , doesn't work. but using autoexpect in unix, it accept "y\r" and testing VO for unix bash script working fine., but not working for ASR1K.
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