cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
433
Views
0
Helpful
2
Replies

Install new image on C9500 with python

cxu21
Level 1
Level 1

I try to install a new nxos image on the C9500 switch using python.

I am thinking of using netmiko to connect to the device and issue "install all nxos bootflash:nxos.newversion.bin". Ideally, there should have no intervention for the installation, but during the process, there is a step asking if I want to continue, is there a way to automatically enter Y to let the process proceed?

1 Accepted Solution

Accepted Solutions

Thank you for the advice.

I could not find the send_input method online, but while search for it, I found kirk's example for expect_string which help to resolve the issue.

https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md#handling-commands-that-prompt-expect_string

Thank you for your advice

View solution in original post

2 Replies 2

The send_input() method takes a string as a parameter, and it will send that string to the device. Example 

net_connect.send_input('Y')

Hope this helps.

Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Thank you for the advice.

I could not find the send_input method online, but while search for it, I found kirk's example for expect_string which help to resolve the issue.

https://github.com/ktbyers/netmiko/blob/develop/EXAMPLES.md#handling-commands-that-prompt-expect_string

Thank you for your advice