Skip to content
Snippets Groups Projects
Commit 9e318382 authored by Erik Reid's avatar Erik Reid
Browse files

dummy mtc response info

parent 26e4d177
No related branches found
No related tags found
No related merge requests found
...@@ -561,6 +561,71 @@ def get_bgp_peer_info(address): ...@@ -561,6 +561,71 @@ def get_bgp_peer_info(address):
return Response(result, mimetype='application/json') return Response(result, mimetype='application/json')
@routes.route("/mtc-element-info/<node>/<interface>", methods=['GET', 'POST'])
@common.require_accepts_json
def get_mtc_interface_info(node, interface):
"""
Handler for /classifier/mtc-interface-info that
returns metadata for as MTC port.
The response will be formatted according to the following schema:
.. asjson::
inventory_provider.routes.classifier_schema.MTC_INTERFACE_INFO_RESPONSE_SCHEMA
:param node:
:param element:
:return: element info
"""
dummy_response = {
"contacts": [
"NOC-RENATER@NOC.RENATER.FR",
"NOC@GEANT.ORG",
"NOC@RESTENA.LU",
"OC@GEANT.ORG",
"SUPPORT@OC.GEANT.NET"
],
"locations": [
{
"a": {
"abbreviation": "LON",
"equipment": node,
"name": "LONDON"
}
}
],
"related-services": [
{
"circuit_type": "service",
"name": "RENATER_AP2_CLS",
"project": "RENATER",
"status": "operational"
}
],
"services": [
{
"card_id": "",
"circuit_type": "circuit",
"equipment": node,
"id": 669120,
"logical_unit": "",
"name": "AMS-LON_EEX_ESNET_1424",
"other_end_equipment": "",
"other_end_pop_abbreviation": "",
"other_end_pop_name": "",
"other_end_port": "",
"pop_abbreviation": "LON",
"pop_name": "LONDON",
"port": interface,
"project": "RENATER",
"service_type": "ETHERNET",
"status": "operational"
}
]
}
return Response(json.dumps(dummy_response), mimetype='application/json')
@routes.route("/infinera-lambda-info/" @routes.route("/infinera-lambda-info/"
"<source_equipment>/<interface>/<circuit_id>", "<source_equipment>/<interface>/<circuit_id>",
methods=['GET', 'POST']) methods=['GET', 'POST'])
...@@ -568,7 +633,7 @@ def get_bgp_peer_info(address): ...@@ -568,7 +633,7 @@ def get_bgp_peer_info(address):
def get_infinera_lambda_info(source_equipment, interface, circuit_id): def get_infinera_lambda_info(source_equipment, interface, circuit_id):
""" """
Handler for /classifier/infinera-lambda-info that Handler for /classifier/infinera-lambda-info that
returns metadata for as DTNX port. returns metadata for a DTNX port.
The response will be formatted according to the following schema: The response will be formatted according to the following schema:
......
...@@ -439,6 +439,8 @@ INFINERA_LAMBDA_INFO_RESPONSE_SCHEMA = { ...@@ -439,6 +439,8 @@ INFINERA_LAMBDA_INFO_RESPONSE_SCHEMA = {
"additionalProperties": False "additionalProperties": False
} }
MTC_INTERFACE_INFO_RESPONSE_SCHEMA = INFINERA_LAMBDA_INFO_RESPONSE_SCHEMA
CORIANT_INFO_RESPONSE_SCHEMA = { CORIANT_INFO_RESPONSE_SCHEMA = {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"type": "object", "type": "object",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment