Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory-provider
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
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
geant-swd
dashboardv3
inventory-provider
Commits
c42050b7
Commit
c42050b7
authored
1 year ago
by
Sam Roberts
Browse files
Options
Downloads
Patches
Plain Diff
MR review changes
parent
e427c445
Branches
Branches containing commit
Tags
0.36
Tags containing commit
1 merge request
!19
Feature/pol1 689 router port speeds
This commit is part of merge request
!19
. Comments created here will be created in the context of that merge request.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inventory_provider/juniper.py
+2
-2
2 additions, 2 deletions
inventory_provider/juniper.py
with
2 additions
and
2 deletions
inventory_provider/juniper.py
+
2
−
2
Edit
View file @
c42050b7
...
...
@@ -274,7 +274,6 @@ def list_interfaces(netconf_config):
if
_inactive
(
i
):
continue
info
=
_ifc_info
(
i
)
# TODO: ADD SPEED VALUE TO INFO HERE
yield
info
yield
from
_units
(
info
[
'
name
'
],
i
)
...
...
@@ -486,7 +485,8 @@ def get_interface_speeds(interface_info):
if
len
(
name
)
>
0
:
name
=
name
[
0
].
text
.
strip
()
else
:
name
=
"
NO_NAME_FOUND
"
logger
=
logging
.
getLogger
(
__name__
)
logger
.
warning
(
'
no name entries for interface
'
)
speed
=
physical_interface
.
xpath
(
"
./*[local-name() =
'
speed
'
]
"
)
if
len
(
speed
)
>
0
:
speed
=
speed
[
0
].
text
.
strip
()
...
...
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