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

updated with pop & coriant protocol specs

parent 70101fdf
Branches
Tags
No related merge requests found
...@@ -172,7 +172,7 @@ The following resources can be requested from the webservice. ...@@ -172,7 +172,7 @@ The following resources can be requested from the webservice.
Any non-empty responses are JSON formatted messages. Any non-empty responses are JSON formatted messages.
* `/data/version` * /data/version
The response will be an object The response will be an object
containing the module and protocol versions of the containing the module and protocol versions of the
...@@ -241,62 +241,58 @@ Any non-empty responses are JSON formatted messages. ...@@ -241,62 +241,58 @@ Any non-empty responses are JSON formatted messages.
} }
``` ```
* /data/snmp/*`hostname`* * /data/pop/*`name`*
The response will be a list of information about Returns location information for the equipment identified
the interfaces discovered through snmp by `name`.
queries on the requested host
and will be formatted as follows: The response will be formatted as follows:
```json ```json
{ {
"$schema": "http://json-schema.org/draft-07/schema#", "$schema": "http://json-schema.org/draft-07/schema#",
"type": "array", "type": "object",
"items": {
"type": "object",
"properties": {
"index": {"type": "string"},
"name": {"type": "string"}
},
"required": ["index", "name"],
"additionalProperties": False
}
}
```
* /data/bgp/*`hostname`* "definitions": {
"pop-info": {
"type": "object",
"properties": {
"name": {"type": "string"},
"abbreviation": {"type": "string"},
"country": {"type": "string"},
"city": {"type": "string"},
"longitude": {"type": "number"},
"latitude": {"type": "number"}
},
"required": [
"name",
"abbreviation",
"country",
"city",
"longitude",
"latitude"
],
"additionalProperties": False
},
"equipment-info": {
"type": "object",
"properties": {
'equipment-name': {"type": "string"},
'status': {"type": "string"},
'pop': {"$ref": "#/definitions/pop-info"}
},
"required": [
"equipment-name",
"status",
"pop"
],
"additionalProperties": False
The response will be a list of information about }
the bgp peerings configured for the requested host },
and will be formatted as follows:
```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "array", "type": "array",
"items": { "items": {"$ref": "#/definitions/equipment-info"}
"type": "object",
"properties": {
"description": {"type": "string"},
"as": {
"type": "object",
"properties": {
"peer": {
"type": "string",
"pattern": r'^\d+$'
},
"local": {
"type": "string",
"pattern": r'^\d+$'
},
},
"required": ["peer", "local"],
"additionalProperties": False
},
},
"required": ["description", "as"],
"additionalProperties": False
}
} }
``` ```
...@@ -316,7 +312,7 @@ Any non-empty responses are JSON formatted messages. ...@@ -316,7 +312,7 @@ Any non-empty responses are JSON formatted messages.
} }
``` ```
* /jobs/reload-router-config/<equipment-name> * /jobs/reload-router-config/*`equipment-name`*
This resource updates the inventory network data for This resource updates the inventory network data for
the identified juniper device. This function completes the identified juniper device. This function completes
...@@ -324,7 +320,7 @@ Any non-empty responses are JSON formatted messages. ...@@ -324,7 +320,7 @@ Any non-empty responses are JSON formatted messages.
`/jobs/update`, except the return contains exactly `/jobs/update`, except the return contains exactly
one task id. one task id.
* /jobs/check-task-status/<task-id>" * /jobs/check-task-status/*`task-id`*
This resource returns the current status of This resource returns the current status of
an asynchronous task started by `/jobs/update` an asynchronous task started by `/jobs/update`
...@@ -348,13 +344,6 @@ Any non-empty responses are JSON formatted messages. ...@@ -348,13 +344,6 @@ Any non-empty responses are JSON formatted messages.
} }
``` ```
* /jobs/update-interface-statuses
This resource updates the last known statuses of all interfaces extracted
from the external inventory system, status information is retrieved from the
alarms database
* /classifier/juniper-link-info/*`source-equipment`*/*`source-interface`* * /classifier/juniper-link-info/*`source-equipment`*/*`source-interface`*
The source-equipment is the equipment that causes the trap, not the NMS that The source-equipment is the equipment that causes the trap, not the NMS that
...@@ -666,10 +655,83 @@ Any non-empty responses are JSON formatted messages. ...@@ -666,10 +655,83 @@ Any non-empty responses are JSON formatted messages.
} }
``` ```
* /classifier/coriant-info/*`equipment_name`*/*`card_id`*/*`port_number`*
Returns information about the effective path
of a coriant card/port combination.
The response will be formatted according to the following schema:
```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"definitions": {
"pop-info": {
"type": "object",
"properties": {
"absid": {"type": "integer"},
"name": {"type": "string"},
"abbreviation": {"type": "string"},
"country": {"type": "string"},
"city": {"type": "string"},
"longitude": {"type": "number"},
"latitude": {"type": "number"}
},
"required": [
"absid",
"name",
"abbreviation",
"country",
"city",
"longitude",
"latitude"
],
"additionalProperties": False
},
"endpoint": {
"type": "object",
"properties": {
"name": {"type": "string"},
"card id": {"type": "string"},
"port number": {"type": "string"},
"pop": {"$ref": "#/definitions/pop-info"}
},
"required": ["name", "port number", "pop"],
"additionalProperties": False
}
},
"type": "object",
"properties": {
'absid': {"type": "integer"},
'category': {"type": "string"},
'circuit_type': {"type": "string"},
'service_type': {"type": "string"},
'peering_type': {"type": "string"},
'status': {"type": "string"},
'name': {"type": "string"},
'a': {"$ref": "#/definitions/endpoint"},
'b': {"$ref": "#/definitions/endpoint"}
},
"required": [
"absid",
"category",
"circuit_type",
"service_type",
"peering_type",
"status",
"a",
"b"],
"additionalProperties": False
}
```
* /poller/interfaces/*`hostname`* * /poller/interfaces/*`hostname`*
The response will be the list of active interfaces on the The response will be the list of active interfac`es on the
router `hostname`. router `hostname`.
Each element of the returned list contains information necessary Each element of the returned list contains information necessary
for setting up snmp throughput counter polling. for setting up snmp throughput counter polling.
...@@ -716,7 +778,9 @@ Any non-empty responses are JSON formatted messages. ...@@ -716,7 +778,9 @@ Any non-empty responses are JSON formatted messages.
### Testing utilities ### Testing utilities
The following routes are only available if the server The following routes are only available if the server
was started with the `ENABLE_TESTING_ROUTES` flag. was started with the `ENABLE_TESTING_ROUTES` flag. These routes
are present only for testing, or for deprectated routes that
are intended to be deleted.
* `/testing/flushdb` * `/testing/flushdb`
...@@ -739,6 +803,65 @@ was started with the `ENABLE_TESTING_ROUTES` flag. ...@@ -739,6 +803,65 @@ was started with the `ENABLE_TESTING_ROUTES` flag.
``` ```
* /data/snmp/*`hostname`*
The response will be a list of information about
the interfaces discovered through snmp
queries on the requested host
and will be formatted as follows:
```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {"type": "string"},
"name": {"type": "string"}
},
"required": ["index", "name"],
"additionalProperties": False
}
}
```
* /data/bgp/*`hostname`*
The response will be a list of information about
the bgp peerings configured for the requested host
and will be formatted as follows:
```json
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"description": {"type": "string"},
"as": {
"type": "object",
"properties": {
"peer": {
"type": "string",
"pattern": r'^\d+$'
},
"local": {
"type": "string",
"pattern": r'^\d+$'
},
},
"required": ["peer", "local"],
"additionalProperties": False
},
},
"required": ["description", "as"],
"additionalProperties": False
}
}
```
## Backend (Redis) Storage Schema ## Backend (Redis) Storage Schema
* `netconf:<hostname>` * `netconf:<hostname>`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment