Python newbie here. I am writing a script in Python and I am able to get one of the hard coded commands working from it. Now I want the script to bring up a menu where user will see a numbered list with the options against each number and each number will be associated to a specific command, for example:
1- show version
2- show interface status
3- show switch
4- show logging
I couldn't find any guide or reference to achieve what I am looking for.
Below is the script:
#!/usr/bin/python
import os
import errno
import datetime
from netmiko import ConnectHandler
backup_dir = '/root/scripts'
host = raw_input("IP Address: ")
Dell-N3000 = {
'device_type': 'cisco_ios',
'host': host,
'username': 'myuser',
'password': '*****',
'port': 22,
'verbose': False
}
net_connect = ConnectHandler(**Dell-N3000)
output = net_connect.send_command("show switch")
print(output)