-1
from netmiko import ConnectHandler

cisco = {
'device_type': 'cisco_ios',
'ip': ip,
'username': username,
'password': password,
}

net_connect = ConnectHandler(**cisco)
net_connect.send_command('wr')
net_connect.send_command('reload')

CLI on cisco switch after issuing 'reload' command, outputs - "Proceed with reload? [confirm]"

I know I have to handle this output, but I don't know how. Please help!

0

1 Answer 1

0
net_connect.send_command('reload', expect_string='confirm')
net_connect.send_command('\n')

I find the solution, but I'm not sure if this is the right way

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.