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
4e20c917
Commit
4e20c917
authored
3 years ago
by
Erik Reid
Browse files
Options
Downloads
Patches
Plain Diff
pep8
parent
660f6c85
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
inventory_provider/routes/classifier.py
+2
-1
2 additions, 1 deletion
inventory_provider/routes/classifier.py
test/test_classifier_routes.py
+2
-2
2 additions, 2 deletions
test/test_classifier_routes.py
with
4 additions
and
3 deletions
inventory_provider/routes/classifier.py
+
2
−
1
View file @
4e20c917
...
@@ -561,7 +561,8 @@ def get_bgp_peer_info(address):
...
@@ -561,7 +561,8 @@ def get_bgp_peer_info(address):
return
Response
(
result
,
mimetype
=
'
application/json
'
)
return
Response
(
result
,
mimetype
=
'
application/json
'
)
@routes.route
(
"
/mtc-interface-info/<node>/<interface>
"
,
methods
=
[
'
GET
'
,
'
POST
'
])
@routes.route
(
"
/mtc-interface-info/<node>/<interface>
"
,
methods
=
[
'
GET
'
,
'
POST
'
])
@common.require_accepts_json
@common.require_accepts_json
def
get_mtc_interface_info
(
node
,
interface
):
def
get_mtc_interface_info
(
node
,
interface
):
"""
"""
...
...
This diff is collapsed.
Click to expand it.
test/test_classifier_routes.py
+
2
−
2
View file @
4e20c917
...
@@ -4,8 +4,7 @@ import jsonschema
...
@@ -4,8 +4,7 @@ import jsonschema
import
pytest
import
pytest
from
inventory_provider.routes.classifier_schema
import
\
from
inventory_provider.routes.classifier_schema
import
\
JUNIPER_LINK_RESPONSE_SCHEMA
,
PEER_INFO_RESPONSE_SCHEMA
,
\
JUNIPER_LINK_RESPONSE_SCHEMA
,
PEER_INFO_RESPONSE_SCHEMA
MTC_INTERFACE_INFO_RESPONSE_SCHEMA
DEFAULT_REQUEST_HEADERS
=
{
DEFAULT_REQUEST_HEADERS
=
{
"
Content-type
"
:
"
application/json
"
,
"
Content-type
"
:
"
application/json
"
,
...
@@ -228,6 +227,7 @@ def test_mtc_info(client):
...
@@ -228,6 +227,7 @@ def test_mtc_info(client):
assert
rv
.
status_code
==
200
assert
rv
.
status_code
==
200
assert
rv
.
is_json
assert
rv
.
is_json
response_data
=
json
.
loads
(
rv
.
data
.
decode
(
'
utf-8
'
))
response_data
=
json
.
loads
(
rv
.
data
.
decode
(
'
utf-8
'
))
assert
response_data
# schema seems wrong ...
# schema seems wrong ...
# jsonschema.validate(response_data, MTC_INTERFACE_INFO_RESPONSE_SCHEMA)
# jsonschema.validate(response_data, MTC_INTERFACE_INFO_RESPONSE_SCHEMA)
...
...
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