Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rm-pythonScripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
network-tools
rm-pythonScripts
Commits
e781fc2b
"content" did not exist on "master"
Commit
e781fc2b
authored
2 years ago
by
rick.mollard
Browse files
Options
Downloads
Patches
Plain Diff
update
parent
ce48d715
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
findfails.py
+6
-7
6 additions, 7 deletions
findfails.py
unkSwitches-cx.txt
+1
-1
1 addition, 1 deletion
unkSwitches-cx.txt
with
7 additions
and
8 deletions
findfails.py
+
6
−
7
View file @
e781fc2b
...
...
@@ -6,16 +6,20 @@ import re
import
time
import
getpass
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:
"
)
campus
=
input
()
print
(
f
"
Campus Selected:
{
campus
}
"
)
print
(
"
----------------------------------
"
)
print
(
"
----------------------------------
"
)
print
(
"
1 =
test
\n
Select Role:
"
)
print
(
"
1 =
Find Failed ports
\n
Select Role:
"
)
role
=
input
()
if
campus
==
"
1
"
:
file
=
[
line
.
strip
()
for
line
in
open
(
"
unlCitySwitches-cx.txt
"
,
'
r
'
)]
...
...
@@ -50,9 +54,6 @@ for selectIP in file:
password
=
Apassword
,
)
# create sessions object
###############################################################################
output
=
net_connect
.
send_command
(
f
"
show port-access clients
"
)
to1
=
output
.
split
(
"
\n
"
)
...
...
@@ -69,6 +70,4 @@ for selectIP in file:
to
=
to
.
split
(
"
"
)[
0
]
net_connect
.
disconnect
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
unkSwitches-cx.txt
+
1
−
1
View file @
e781fc2b
10.171.0.53
\ No newline at end of file
10.171.0.19
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment