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

lookup interface info for peers

parent 9a3ae307
Branches
Tags
No related merge requests found
......@@ -374,7 +374,7 @@ Any non-empty responses are JSON formatted messages.
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.
404 is returned (or 422 if the address can't be parsed)
The response will be formatted according to the following syntax:
......@@ -391,6 +391,13 @@ Any non-empty responses are JSON formatted messages.
{"pattern": r'^([a-f\d]{4}:){7}[a-f\d]{4}$'}
]
},
"interface-address": {
"type": "string",
"oneOf": [
{"pattern": r'^(\d+\.){3}\d+/\d+$'},
{"pattern": r'^[a-f\d:]+/\d+$'}
]
},
"vpn-rr-peer": {
"type": "object",
"properties": {
......@@ -425,7 +432,19 @@ Any non-empty responses are JSON formatted messages.
"type": "array",
"items": {"$ref": "#/definitions/ip-address"}
},
"interface-info": {
"type": "object",
"properties": {
"name": {"$ref": "#/definitions/ip-address"},
"interface address": {
"$ref": "#/definitions/interface-address"},
"interface name": {"type": "string"},
"router": {"type": "string"}
},
"required": [
"name", "interface address", "interface name", "router"],
"additionalProperties": False
}
},
"type": "object",
......@@ -433,7 +452,11 @@ Any non-empty responses are JSON formatted messages.
"ix-public-peer-info": {"$ref": "#/definitions/ix-public-peer"},
"ix-public-peer-group": {
"$ref": "#/definitions/ix-public-peer-group"},
"vpn-rr-peer-info": {"$ref": "#/definitions/vpn-rr-peer"}
"vpn-rr-peer-info": {"$ref": "#/definitions/vpn-rr-peer"},
"interfaces": {
"type": "array",
"items": {"$ref": "#/definitions/interface-info"}
}
},
"additionalProperties": False
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment