diff --git a/README.md b/README.md index ba8c48b304ad7ae2cb11432e9c370a2e3265703b..655deb713dd260018965525775d3db14f4199618 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,27 @@ * [Configuration](#configuration) * [Running this module](#running-this-module) * [Protocol Specification](#protocol-specification) + * [/data/version](#dataversion) + * [/data/routers](#datarouters) + * [/data/interfaces](#datainterfaces) + * [/data/pop](#datapop) + * [/jobs/update](#jobsupdate) + * [/jobs/log](#jobslog) + * [/jobs/reload-router-config](#jobsreload-router-config) + * [/jobs/check-task-status](#jobscheck-task-status) + * [/classifier/juniper-link-info](#classifierjuniper-link-info) + * [/classifier/peer-info](#classifierpeer-info) + * [/classifier/infinera-lambda-info](#classifierinfinera-lambda-info) + * [/classifier/coriant-info](#classifiercoriant-info) + * [/poller/interfaces](#pollerinterfaces) + * [/lg/routers](#lgrouters) + * [/msr/access-services](#msraccess-services) + * [/testing/flushdb](#testingflushdb) + * [/testing/infinera-dna-addresses](#testinginfinera-dna-addresses) + * [/testing/coriant-tnms-addresses](#testingcoriant-tnms-addresses) + * [/testing/juniper-server-addresses](#testingjuniper-server-addresses) + * [/data/snmp](#datasnmp) + * [/data/bgp](#databgp) * [Backend (Redis) Storage Schema](#backend-redis-storage-schema) @@ -191,7 +212,9 @@ The following resources can be requested from the webservice. Any non-empty responses are JSON formatted messages. -* /data/version +#### /data/version + + * /data/version The response will be an object containing the module and protocol versions of the @@ -216,7 +239,9 @@ Any non-empty responses are JSON formatted messages. } ``` -* /data/routers +#### /data/routers + + * /data/routers The response will be a list of router hostnames for which information is available and will be @@ -230,7 +255,9 @@ Any non-empty responses are JSON formatted messages. } ``` -* /data/interfaces/*`hostname`* +#### /data/interfaces + + * /data/interfaces</*`hostname`*> The response will be a list of information about the interfaces present on the requested host @@ -261,7 +288,9 @@ Any non-empty responses are JSON formatted messages. } ``` -* /data/pop/*`name`* +#### /data/pop + + * /data/pop/*`name`* Returns location information for the equipment identified by `name`. @@ -316,7 +345,9 @@ Any non-empty responses are JSON formatted messages. } ``` -* /jobs/update +#### /jobs/update + + * /jobs/update This resource updates the inventory network data for juniper devices. The function completes asynchronously and a list of outstanding @@ -332,7 +363,9 @@ Any non-empty responses are JSON formatted messages. } ``` -* /jobs/log +#### /jobs/log + + * /jobs/log This resource returns the state of the previous (or current) tasks associated with a call to `/jobs/update`. The response @@ -353,7 +386,9 @@ Any non-empty responses are JSON formatted messages. } ``` -* /jobs/reload-router-config/*`equipment-name`* +#### /jobs/reload-router-config + + * /jobs/reload-router-config/*`equipment-name`* This resource updates the inventory network data for the identified juniper device. This function completes @@ -361,7 +396,9 @@ Any non-empty responses are JSON formatted messages. `/jobs/update`, except the return contains exactly one task id. -* /jobs/check-task-status/*`task-id`* +#### /jobs/check-task-status + + * /jobs/check-task-status/*`task-id`* This resource returns the current status of an asynchronous task started by `/jobs/update` @@ -385,7 +422,9 @@ Any non-empty responses are JSON formatted messages. } ``` -* /classifier/juniper-link-info/*`source-equipment`*/*`source-interface`* +#### /classifier/juniper-link-info + + * /classifier/juniper-link-info/*`source-equipment`*/*`source-interface`* The source-equipment is the equipment that causes the trap, not the NMS that sends it. @@ -550,7 +589,9 @@ Any non-empty responses are JSON formatted messages. - `related-services`: all top-level services depending on this interface -* /classifier/peer-info/*`address`* +#### /classifier/peer-info + + * /classifier/peer-info/*`address`* The `address` parameter should be the ip address of a remote peer. If this address is found in the system @@ -697,7 +738,9 @@ Any non-empty responses are JSON formatted messages. - `ix-public-peer-info`: peering info -* /classifier/infinera-lambda-info/*`source-equipment`*/*`source-interface`* +#### /classifier/infinera-lambda-info + + * /classifier/infinera-lambda-info/*`source-equipment`*/*`source-interface`* The source-equipment is the equipment that causes the trap, not the NMS that sends it. @@ -841,7 +884,9 @@ Any non-empty responses are JSON formatted messages. - `geant-lambda`: info about the lambda service using this port -* /classifier/coriant-info/*`equipment name`*/*`entity name`* +#### /classifier/coriant-info + + * /classifier/coriant-info/*`equipment name`*/*`entity name`* Returns information about the effective path of a coriant card/port combination. @@ -969,7 +1014,9 @@ Any non-empty responses are JSON formatted messages. - `related-services`: any top-level services depending on this circuit -* /poller/interfaces/*`hostname`* +#### /poller/interfaces + + * /poller/interfaces</*`hostname`*> The response will be the list of active interfaces on the router `hostname`. @@ -983,52 +1030,56 @@ Any non-empty responses are JSON formatted messages. "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { - "circuit": { + "service": { "type": "object", "properties": { + "id": {"type": "integer"}, "name": {"type": "string"}, - "status": {"type": "string"}, "type": {"type": "string"}, - "id": {"type": "integer"} + "status": {"type": "string"}, }, - "required": ["name", "status", "type", "id"], + "required": ["id", "name", "type", "status"], "additionalProperties": False - } + }, + "interface": { + "type": "object", + "properties": { + "router": {"type": "string"}, + "name": {"type": "string"}, + "description": {"type": "string"}, + "snmp-index": { + "type": "integer", + "minimum": 1 + }, + "bundle": { + "type": "array", + "items": {"type": "string"} + }, + "bundle-parents": { + "type": "array", + "items": {"type": "string"} + }, + "circuits": { + "type": "array", + "items": {"$ref": "#/definitions/service"} + } + }, + "required": [ + "router", "name", "description", + "snmp-index", "bundle", "bundle-parents", + "circuits"], + "additionalProperties": False + }, }, "type": "array", - "items": { - "type": "object", - "properties": { - "circuits": { - "type": "array", - "items": {"$ref": "#/definitions/circuit"} - }, - "bundle": { - "type": "array", - "items": {"type": "string"} - }, - "bundle-parents": { - "type": "array", - "items": {"type": "string"} - }, - "description": {"type": "string"}, - "name": {"type": "string"}, - "snmp-index": {"type": "integer"} - }, - "required": [ - "circuits", - "bundle", - "bundle-parents", - "description", - "name", - "snmp-index"], - "additionalProperties": False - } + "items": {"$ref": "#/definitions/interface"} } ``` -* /lg/routers/*`access`* +#### /lg/routers + + * /lg/routers/*`access`* The response will be the list of routers with pop location information. The list will be filtered according to the value of the `access` parameter. @@ -1085,7 +1136,9 @@ Any non-empty responses are JSON formatted messages. ``` -* /msr/access-services +#### /msr/access-services + + * /msr/access-services The response will be the list of services that are of type 'IP Acccess', and will formatted @@ -1131,12 +1184,20 @@ are present only for testing, or for deprectated routes that are intended to be deleted. -* `/testing/flushdb` +#### /testing/flushdb + + * /testing/flushdb This method erases all data in the backend redis database. -* /testing/infinera-dna-addresses, /testing/coriant-tnmp-addresses, /testing/juniper-server-addresses` +#### /testing/infinera-dna-addresses +#### /testing/coriant-tnms-addresses +#### /testing/juniper-server-addresses + + * /testing/infinera-dna-addresses + * /testing/coriant-tnms-addresses + * /testing/juniper-server-addresses All of these resources return lists of source addresses of known senders of snmp traps. Responses will be @@ -1151,7 +1212,9 @@ are intended to be deleted. ``` -* /data/snmp/*`hostname`* +#### /data/snmp + + * /data/snmp/*`hostname`* The response will be a list of information about the interfaces discovered through snmp @@ -1174,7 +1237,9 @@ are intended to be deleted. } ``` -* /data/bgp/*`hostname`* +#### /data/bgp + + * /data/bgp/*`hostname`* The response will be a list of information about the bgp peerings configured for the requested host