diff --git a/README.md b/README.md index 4a2fb44dbbe0fbbbe3322d8c973741d475f7b08e..57ff6af4366489b876c8b3a9b12934216047245f 100644 --- a/README.md +++ b/README.md @@ -355,7 +355,7 @@ Any non-empty responses are JSON formatted messages. alarms database -* /classifier/*`type`*/*`source-equipment`*/*`source-interface`* +* /classifier/trap-metadata/*`source-equipment`*/*`source-interface`* The source-equipment is the equipment that causes the trap, not the NMS that sends it. @@ -369,6 +369,71 @@ Any non-empty responses are JSON formatted messages. } ``` +* /classifier/peer-info/*`address`* + + The `address` parameter should be the ip address of + a remote peer. If this address is found in the system + then information about the interface is returned, otherwise + 404 is returned. + + The resp onse will be formatted according to the following syntax: + + ```json + { + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + + "definitions": { + "ip-address": { + "type": "string", + "oneOf": [ + {"pattern": r'^(\d+\.){3}\d+$'}, + {"pattern": r'^([a-f\d]{4}:){7}[a-f\d]{4}$'} + ] + }, + "vpn-rr-peer": { + "type": "object", + "properties": { + "name": {"$ref": "#/definitions/ip-address"}, + "description": {"type": "string"}, + "peer-as": {"type": "integer"}, + "router": {"type": "string"} + }, + "required": ["name", "description"], + "additionalProperties": False + }, + + "ix-public-peer": { + "type": "object", + "properties": { + "name": {"$ref": "#/definitions/ip-address"}, + "description": {"type": "string"}, + "router": {"type": "string"}, + "as": { + "type": "object", + "properties": { + "local": {"type": "integer"}, + "peer": {"type": "integer"}, + }, + "required": ["local", "peer"], + "additionalProperties": False + } + }, + "required": ["name", "description", "as"], + "additionalProperties": False + } + }, + + "type": "object", + "properties": { + "ix-public-peer-info": {"$ref": "#/definitions/ix-public-peer"}, + "vpn-rr-peer-info": {"$ref": "#/definitions/vpn-rr-peer"} + }, + "additionalProperties": False + } + ``` + + * /poller/interfaces/*`hostname`* The response will be the list of active interfaces on the