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

update

parent ce48d715
No related branches found
No related tags found
No related merge requests found
...@@ -6,16 +6,20 @@ import re ...@@ -6,16 +6,20 @@ import re
import time import time
import getpass import getpass
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
#
# This script will look to see which ports are in a "failed" state and try to reathenticate the port.
#
#
########################################################################### ###########################################################################
print(" 1 = UNL-City \n 2 = UNL-East \n 3 = UNO \n 4 = UNK \n Select Campus:") print(" 1 = UNL-City \n 2 = UNL-East \n 3 = UNO \n 4 = UNK \n Select Campus:")
campus = input() campus = input()
print(f"Campus Selected: {campus}") print(f"Campus Selected: {campus}")
print("----------------------------------") print("----------------------------------")
print("----------------------------------") print("----------------------------------")
print(" 1 = test \n Select Role:") print(" 1 = Find Failed ports \n Select Role:")
role = input() role = input()
if campus == "1": if campus == "1":
file = [line.strip() for line in open("unlCitySwitches-cx.txt", 'r')] file = [line.strip() for line in open("unlCitySwitches-cx.txt", 'r')]
...@@ -50,9 +54,6 @@ for selectIP in file: ...@@ -50,9 +54,6 @@ for selectIP in file:
password=Apassword, password=Apassword,
) )
# create sessions object
############################################################################### ###############################################################################
output = net_connect.send_command(f"show port-access clients") output = net_connect.send_command(f"show port-access clients")
to1 = output.split("\n") to1 = output.split("\n")
...@@ -69,6 +70,4 @@ for selectIP in file: ...@@ -69,6 +70,4 @@ for selectIP in file:
to = to.split(" ")[0] to = to.split(" ")[0]
net_connect.disconnect() net_connect.disconnect()
\ No newline at end of file
10.171.0.53 10.171.0.19
\ No newline at end of file \ 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