Skip to content
Snippets Groups Projects
Commit ec8049d6 authored by rick.mollard's avatar rick.mollard
Browse files

Changes to be committed:

	modified:   README.txt
	modified:   flipport.py
 Changes not staged for commit:
	modified:   unkSwitches-cx.txt
parent ec89398d
No related branches found
No related tags found
No related merge requests found
......@@ -6,7 +6,7 @@ pip install requests
_________________________
1. Make sure you are in the "Python-Flip Port on-off" folder
1. Make sure you are in the correct folder where the file is located.
2. Update the text file for your Campus with the switches that you would like to work with.
3. type in "python3 flipport.py"
3. type in "python3 flipport.py" to run the flipport.py script.
4. Enter your information and let the script run.
\ No newline at end of file
......@@ -75,8 +75,13 @@ for selectIP in file:
if re.search("[\d]+/[\d]/[\d]+",to):
print (to)
to2 = to.split("/")
output2 = [f"interface {to2[0]}/{to2[1]}/{to2[2]}","shut","no shut"]
output1 = [f"interface {to2[0]}/{to2[1]}/{to2[2]}","shut"]
net_connect.send_config_set(output1)
time.sleep(1)
output2 = [f"interface {to2[0]}/{to2[1]}/{to2[2]}","no shut"]
net_connect.send_config_set(output2)
net_connect.send_config_set(f"wr mem")
net_connect.disconnect()
print(f"Logged out from Switch!")
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment