diff --git a/README.md b/README.md index 24411b4897a1f3f9bc64308609db48f25d38df42..a35a2b41b8818b6e75d532d73cfd05ea3f8382a9 100644 --- a/README.md +++ b/README.md @@ -358,6 +358,29 @@ Any non-empty responses are JSON formatted messages. "type": "object", "definitions": { + "location-endpoint": { + "type": "object", + "properties": { + "equipment": {"type": "string"}, + "name": {"type": "string"}, + "abbreviation": {"type": "string"} + }, + "required": ["equipment", "name", "abbreviation"], + "additionalProperties": False + }, + "location": { + "type": "object", + "properties": { + "a": {"$ref": "#/definitions/location-endpoint"}, + "b": {"$ref": "#/definitions/location-endpoint"} + }, + "required": ["a"], + "additionalProperties": False + }, + "locations-list": { + "type": "array", + "items": {"$ref": "#/definitions/location"} + }, "ip-address": { "type": "string", "oneOf": [ @@ -385,7 +408,8 @@ Any non-empty responses are JSON formatted messages. "ipv6": { "type": "array", "items": {"$ref": "#/definitions/ipv6-interface-address"} - } + }, + 'bundle': {"type": "array"} }, "required": ["name", "description", "ipv4", "ipv6"], "additionalProperties": False @@ -393,7 +417,6 @@ Any non-empty responses are JSON formatted messages. "service-info": { "type": "object", "properties": { - "id": {"type": "integer"}, "name": {"type": "string"}, "status": { "type": "string", @@ -403,9 +426,13 @@ Any non-empty responses are JSON formatted messages. "type": "string", "enum": ["path", "service", "l2circuit"] }, - "service_type": {"type": "string"}, - "project": {"type": "string"}, + "project": {"type": "string"} "equipment": {"type": "string"}, + "pop": {"type": "string"}, + "pop_abbreviation": {"type": "string"}, + + "other_end_pop": {"type": "string"}, + "other_end_pop_abbreviation": {"type": "string"}, "other_end_equipment": {"type": "string"}, "port": {"type": "string"}, "other_end_port": {"type": "string"}, @@ -431,9 +458,30 @@ Any non-empty responses are JSON formatted messages. "card_id": {"type": "string"}, "other_end_card_id": {"type": "string"}, "interface_name": {"type": "string"}, - "other_end_interface_name": {"type": "string"} + "other_end_interface_name": {"type": "string"}, + + # TODO: check what's changed: added to make tests pass + 'other_end_pop_name': {"type": "string"}, + 'pop_name': {"type": "string"} }, "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 } }, @@ -446,13 +494,22 @@ Any non-empty responses are JSON formatted messages. "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"} }, + # "required": ["interface"], "additionalProperties": False - } + } ``` + - `locations`: info about the `a` (and `b`, if relevant) + ends of the circuit + - `services`: info about the service served by this interface + - `interface`: relevant interface parameters + - `related-services`: all top-level services depending on this interface + + * /classifier/peer-info/*`address`* The `address` parameter should be the ip address of @@ -462,12 +519,35 @@ Any non-empty responses are JSON formatted messages. The response will be formatted according to the following syntax: - ```json - { + ```json + { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "definitions": { + "location-endpoint": { + "type": "object", + "properties": { + "equipment": {"type": "string"}, + "name": {"type": "string"}, + "abbreviation": {"type": "string"} + }, + "required": ["equipment", "name", "abbreviation"], + "additionalProperties": False + }, + "location": { + "type": "object", + "properties": { + "a": {"$ref": "#/definitions/location-endpoint"}, + "b": {"$ref": "#/definitions/location-endpoint"} + }, + "required": ["a"], + "additionalProperties": False + }, + "locations-list": { + "type": "array", + "items": {"$ref": "#/definitions/location"} + }, "ip-address": { "type": "string", "oneOf": [ @@ -552,21 +632,30 @@ Any non-empty responses are JSON formatted messages. } } } + }, "type": "object", "properties": { - "ix-public-peer-info": {"$ref": "#/definitions/ix-public-peer-info"}, + "ix-public-peer-info": { + "$ref": "#/definitions/ix-public-peer-info"}, "vpn-rr-peer-info": {"$ref": "#/definitions/vpn-rr-peer"}, "interfaces": { "type": "array", "items": {"$ref": "#/definitions/interface-lookup-info"} - } + }, + "locations": {"$ref": "#/definitions/locations-list"} }, "additionalProperties": False } ``` + - `locations`: info about the `a` (and `b`, if relevant) + ends of the circuit + - `interfaces`: interfaces involved on either end and service info + - `vpn-rr-peer-info`: peering info + - `ix-public-peer-info`: peering info + * /classifier/infinera-lambda-info/*`source-equipment`*/*`source-interface`* @@ -580,8 +669,31 @@ Any non-empty responses are JSON formatted messages. { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", - + "definitions": { + "location-endpoint": { + "type": "object", + "properties": { + "equipment": {"type": "string"}, + "name": {"type": "string"}, + "abbreviation": {"type": "string"} + }, + "required": ["equipment", "name", "abbreviation"], + "additionalProperties": False + }, + "location": { + "type": "object", + "properties": { + "a": {"$ref": "#/definitions/location-endpoint"}, + "b": {"$ref": "#/definitions/location-endpoint"} + }, + "required": ["a"], + "additionalProperties": False + }, + "locations-list": { + "type": "array", + "items": {"$ref": "#/definitions/location"} + }, "service-info": { "type": "object", "properties": { @@ -597,6 +709,10 @@ Any non-empty responses are JSON formatted messages. }, "service_type": {"type": "string"}, "project": {"type": "string"}, + "pop_name": {"type": "string"}, + "pop_abbreviation": {"type": "string"}, + "other_end_pop_name": {"type": "string"}, + "other_end_pop_abbreviation": {"type": "string"}, "equipment": {"type": "string"}, "other_end_equipment": {"type": "string"}, "port": {"type": "string"}, @@ -627,11 +743,29 @@ Any non-empty responses are JSON formatted messages. }, "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": { "id": {"type": "integer"}, "name": {"type": "string"}, + "project": {"type": "string"}, "status": { "type": "string", "enum": ["operational", "installed", "planned", "ordered"] @@ -640,21 +774,33 @@ Any non-empty responses are JSON formatted messages. "additionalProperties": False } }, - + "type": "object", "properties": { "services": { "type": "array", "items": {"$ref": "#/definitions/service-info"} }, + "related-services": { + "type": "array", + "items": {"$ref": "#/definitions/related-service-info"} + }, "geant-lambda": { "$ref": "#/definitions/geant-lambda" }, + "locations": {"$ref": "#/definitions/locations-list"} }, "additionalProperties": False } ``` + - `locations`: info about the `a` (and `b`, if relevant) + ends of the circuit + - `services`: info about any services that use this port + - `related-services`: any top-level services depending on this circuit + - `geant-lambda`: info about the lambda service using this port + + * /classifier/coriant-info/*`equipment name`*/*`entity name`* Returns information about the effective path @@ -668,6 +814,29 @@ Any non-empty responses are JSON formatted messages. "type": "object", "definitions": { + "location-endpoint": { + "type": "object", + "properties": { + "equipment": {"type": "string"}, + "name": {"type": "string"}, + "abbreviation": {"type": "string"} + }, + "required": ["equipment", "name", "abbreviation"], + "additionalProperties": False + }, + "location": { + "type": "object", + "properties": { + "a": {"$ref": "#/definitions/location-endpoint"}, + "b": {"$ref": "#/definitions/location-endpoint"} + }, + "required": ["a"], + "additionalProperties": False + }, + "locations-list": { + "type": "array", + "items": {"$ref": "#/definitions/location"} + }, "pop-info": { "type": "object", "properties": { @@ -720,6 +889,22 @@ Any non-empty responses are JSON formatted messages. "a", "b"], "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"} + }, + "additionalProperties": False } }, @@ -728,13 +913,21 @@ Any non-empty responses are JSON formatted messages. "equipment name": {"type": "string"}, "card id": {"type": "string"}, "port number": {"type": "string"}, - "path": {"$ref": "#/definitions/path"} + "path": {"$ref": "#/definitions/path"}, + "related-services": { + "type": "array", + "items": {"$ref": "#/definitions/related-service-info"} + }, }, "required": ["equipment name", "card id", "port number"], "additionalProperties": False } ``` + - `locations`: info about the `a` and `b` ends of the circuit + - `path`: detailed path info (included `a` and `b` ends) + - `related-services`: any top-level services depending on this circuit + * /poller/interfaces/*`hostname`*