I have a function script using netmiko and I want to create a function for the send_command but I really got no idea how to do it.
def estb_conn(ip,uname,pname,instruct):
cisco_ios = {
'device_type': 'cisco_ios',
'ip': ip,
'username': uname,
'password': pname,
}
ios_connect = netmiko.ConnectHandler(**cisco_ios)
display = ios_connect.find_prompt()
**** I want to make this send_command as new function so I can freely call it anywhere when I need a multiple command or for loop****
command = ios_connect.send_command(instruct)
time.sleep(1)