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
db69d5a2
Commit
db69d5a2
authored
3 months ago
by
Robert Latta
Browse files
Options
Downloads
Patches
Plain Diff
flake 8; function name change
parent
add1c23c
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/classifier.py
+4
-4
4 additions, 4 deletions
inventory_provider/routes/classifier.py
with
4 additions
and
4 deletions
inventory_provider/routes/classifier.py
+
4
−
4
View file @
db69d5a2
...
@@ -14,7 +14,7 @@ These endpoints are intended for use by Dashboard V3.
...
@@ -14,7 +14,7 @@ These endpoints are intended for use by Dashboard V3.
/classifier/juniper-link-info
/classifier/juniper-link-info
-----------------------------
-----------------------------
.. autofunction:: inventory_provider.routes.classifier.
get_juniper
_link_info
.. autofunction:: inventory_provider.routes.classifier.
handle
_link_info
_request
/classifier/infinera-fiberlink-info
/classifier/infinera-fiberlink-info
...
@@ -250,7 +250,7 @@ def _link_interface_info(r, hostname, interface):
...
@@ -250,7 +250,7 @@ def _link_interface_info(r, hostname, interface):
Generates the
'
interface
'
field for
Generates the
'
interface
'
field for
the juniper-link-info response payload.
the juniper-link-info response payload.
only called from
get_juniper
_link_info
only called from
handle
_link_info
_request
:param r: redis connection
:param r: redis connection
:param hostname: router hostname
:param hostname: router hostname
...
@@ -380,7 +380,7 @@ def handle_epipe_sap_info_request(source_equipment: str, service_id: str, vpn_id
...
@@ -380,7 +380,7 @@ def handle_epipe_sap_info_request(source_equipment: str, service_id: str, vpn_id
cache_key
=
\
cache_key
=
\
f
'
classifier-cache:epipe_sap:
{
source_equipment
}
:
{
service_id
}
:
{
vpn_id
}
'
f
'
classifier-cache:epipe_sap:
{
source_equipment
}
:
{
service_id
}
:
{
vpn_id
}
'
print
(
f
'
cache_key:
{
cache_key
}
'
)
print
(
f
'
cache_key:
{
cache_key
}
'
)
result
=
_ignore_cache_or_retrieve
(
request
,
cache_key
,
r
)
result
=
_ignore_cache_or_retrieve
(
request
,
cache_key
,
r
)
...
@@ -400,7 +400,7 @@ def handle_epipe_sap_info_request(source_equipment: str, service_id: str, vpn_id
...
@@ -400,7 +400,7 @@ def handle_epipe_sap_info_request(source_equipment: str, service_id: str, vpn_id
result
=
json
.
dumps
(
result
)
result
=
json
.
dumps
(
result
)
# cache this data for the next call
# cache this data for the next call
r
.
set
(
cache_key
,
result
.
encode
(
'
utf-8
'
))
r
.
set
(
cache_key
,
result
.
encode
(
'
utf-8
'
))
return
Response
(
result
,
mimetype
=
"
application/json
"
)
return
Response
(
result
,
mimetype
=
"
application/json
"
)
...
...
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