#This function pulls those IPs out of the txt file and puts them into a #Pull the IPs.txt is a list of the IPs we want to connect to #This will be a list of the devices we want to SSH to #this is probably supposed to be lineips = get_ip(line) #with does all the cleanup and prework of file open for you ![]() Return netmiko.ConnectHandler(device_type='cisco_ios', ip=ip, #!/usr/bin/pythonĭef make_connection (ip, username, password): When I print my variable it is showing empty for all iterations through the For loop. I have tested the following Regex strings on ,īut in my code they do not seem to be working. Both Processor Board ID and System Serial Number. ![]() Also I need to search through multiple areas for the serial number. Currently I am only getting back the active switches serial number. Maybe there is any easier way, but I am trying to return all the serial numbers for devices in a stack. ![]() I am parsing the show version command for a series of information.
0 Comments
Leave a Reply. |