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
3ad6403d
Commit
3ad6403d
authored
3 years ago
by
Robert Latta
Browse files
Options
Downloads
Patches
Plain Diff
Reinstated hostname conversion; removed redundant code
parent
06c5bffb
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inventory_provider/routes/poller.py
+2
-16
2 additions, 16 deletions
inventory_provider/routes/poller.py
with
2 additions
and
16 deletions
inventory_provider/routes/poller.py
+
2
−
16
View file @
3ad6403d
...
@@ -525,20 +525,6 @@ def _get_dashboard_data(ifc):
...
@@ -525,20 +525,6 @@ def _get_dashboard_data(ifc):
}
}
def
_add_dashboards
(
interfaces
):
"""
generator that dashboards to each interfaces.
:param interfaces: result of _load_interfaces
:return: generator with `dashboards` populated in each element
"""
for
ifc
in
interfaces
:
dashboards
=
_get_dashboards
(
ifc
)
ifc
[
'
dashboards
'
]
=
sorted
([
d
.
name
for
d
in
dashboards
])
yield
_get_dashboard_data
(
ifc
)
def
_load_interface_bundles
(
config
,
hostname
=
None
,
use_next_redis
=
False
):
def
_load_interface_bundles
(
config
,
hostname
=
None
,
use_next_redis
=
False
):
result
=
dict
()
result
=
dict
()
...
@@ -569,8 +555,8 @@ def _load_interface_bundles(config, hostname=None, use_next_redis=False):
...
@@ -569,8 +555,8 @@ def _load_interface_bundles(config, hostname=None, use_next_redis=False):
def
_load_services
(
config
,
hostname
=
None
,
use_next_redis
=
False
):
def
_load_services
(
config
,
hostname
=
None
,
use_next_redis
=
False
):
#
if hostname:
if
hostname
:
#
hostname = get_ims_equipment_name(hostname)
hostname
=
get_ims_equipment_name
(
hostname
)
result
=
dict
()
result
=
dict
()
key_pattern
=
f
'
ims:interface_services:
{
hostname
}
:*
'
\
key_pattern
=
f
'
ims:interface_services:
{
hostname
}
:*
'
\
...
...
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