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
0c589a07
Commit
0c589a07
authored
10 months ago
by
Neda Moeini
Browse files
Options
Downloads
Patches
Plain Diff
Fixed type hinting in get_netdash_equipment function to support older Python versions
parent
7f1acfe9
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
-1
2 additions, 1 deletion
inventory_provider/routes/poller.py
with
2 additions
and
1 deletion
inventory_provider/routes/poller.py
+
2
−
1
View file @
0c589a07
...
@@ -74,6 +74,7 @@ import json
...
@@ -74,6 +74,7 @@ import json
import
logging
import
logging
import
re
import
re
from
functools
import
partial
from
functools
import
partial
from
typing
import
Dict
from
flask
import
Blueprint
,
Response
,
current_app
,
request
,
jsonify
from
flask
import
Blueprint
,
Response
,
current_app
,
request
,
jsonify
...
@@ -914,7 +915,7 @@ def interfaces(hostname=None):
...
@@ -914,7 +915,7 @@ def interfaces(hostname=None):
return
Response
(
result
,
mimetype
=
"
application/json
"
)
return
Response
(
result
,
mimetype
=
"
application/json
"
)
def
get_netdash_equipment
()
->
d
ict
[
str
,
str
]:
def
get_netdash_equipment
()
->
D
ict
[
str
,
str
]:
"""
Get the netdash equipment mapping from redis.
"""
"""
Get the netdash equipment mapping from redis.
"""
current_redis
=
common
.
get_current_redis
()
current_redis
=
common
.
get_current_redis
()
return
json
.
loads
(
current_redis
.
get
(
'
netdash
'
).
decode
(
'
utf-8
'
))
return
json
.
loads
(
current_redis
.
get
(
'
netdash
'
).
decode
(
'
utf-8
'
))
...
...
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