diff --git a/test/test_classifier_routes.py b/test/test_classifier_routes.py index 56821fcb4056b1107ad9f76fe5d103560525d309..caee5904d1e17a9f09d3b0f681c05a19c36d31d2 100644 --- a/test/test_classifier_routes.py +++ b/test/test_classifier_routes.py @@ -132,6 +132,23 @@ JUNIPER_LINK_METADATA_DEFINITIONS = { # "equipment", "logical_unit", "card_id", "interface_name" # ], "additionalProperties": False + }, + "related-service-info": { + "type": "object", + "properties": { + "name": {"type": "string"}, + "status": { + "type": "string", + "enum": ["operational", "installed", "planned", "ordered"] + }, + "circuit_type": { + "type": "string", + "enum": ["path", "service", "l2circuit"] + }, + "project": {"type": "string"} + }, + "required": ["name", "status", "circuit_type", "project"], + "additionalProperties": False } } @@ -152,7 +169,7 @@ JUNIPER_LINK_METADATA = { "interface": {"$ref": "#/definitions/interface-info"}, "related-services": { "type": "array", - "items": {"$ref": "#/definitions/service-info"} + "items": {"$ref": "#/definitions/related-service-info"} }, "locations": {"$ref": "#/definitions/locations-list"} }, diff --git a/test/test_infinera_classifier.py b/test/test_infinera_classifier.py index d37940287e75cfc9b12c6c723c3438a267a0dcb4..6e0621a08d20abdc737f95415bbbbca1cf8966b8 100644 --- a/test/test_infinera_classifier.py +++ b/test/test_infinera_classifier.py @@ -82,6 +82,23 @@ INFINERA_LINK_METADATA_DEFINITIONS = { }, "additionalProperties": False }, + "related-service-info": { + "type": "object", + "properties": { + "name": {"type": "string"}, + "status": { + "type": "string", + "enum": ["operational", "installed", "planned", "ordered"] + }, + "circuit_type": { + "type": "string", + "enum": ["path", "service", "l2circuit"] + }, + "project": {"type": "string"} + }, + "required": ["name", "status", "circuit_type", "project"], + "additionalProperties": False + }, "geant-lambda": { "type": "object", "properties": { @@ -113,7 +130,7 @@ INFINERA_LINK_METADATA = { }, "related-services": { "type": "array", - "items": {"$ref": "#/definitions/service-info"} + "items": {"$ref": "#/definitions/related-service-info"} }, "geant-lambda": { "$ref": "#/definitions/geant-lambda"