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

Finished feature add-poller-service-status.

parents 8ba29404 fb14811f
Branches
Tags
No related merge requests found
...@@ -595,10 +595,12 @@ Any non-empty responses are JSON formatted messages. ...@@ -595,10 +595,12 @@ Any non-empty responses are JSON formatted messages.
"circuit": { "circuit": {
"type": "object", "type": "object",
"properties": { "properties": {
"name": {"type": "string"},
"status": {"type": "string"},
"type": {"type": "string"}, "type": {"type": "string"},
"id": {"type": "integer"} "id": {"type": "integer"}
}, },
"required": ["type", "id"], "required": ["name", "status", "type", "id"],
"additionalProperties": False "additionalProperties": False
} }
}, },
......
...@@ -68,9 +68,12 @@ def poller_interface_oids(hostname): ...@@ -68,9 +68,12 @@ def poller_interface_oids(hostname):
'opsdb:interface_services:%s:%s' % (hostname, ifc['name'])) 'opsdb:interface_services:%s:%s' % (hostname, ifc['name']))
if circuits: if circuits:
ifc_data['circuits'] = [ ifc_data['circuits'] = [
{'type': c['circuit_type'], 'id': c['id']} {
for c in json.loads(circuits.decode('utf-8')) 'id': c['id'],
'name': c['name'],
'type': c['service_type'],
'status': c['status']
} for c in json.loads(circuits.decode('utf-8'))
] ]
result.append(ifc_data) result.append(ifc_data)
......
...@@ -16,10 +16,12 @@ def test_router_interfaces(router, client_with_mocked_data): ...@@ -16,10 +16,12 @@ def test_router_interfaces(router, client_with_mocked_data):
"circuit": { "circuit": {
"type": "object", "type": "object",
"properties": { "properties": {
"name": {"type": "string"},
"status": {"type": "string"},
"type": {"type": "string"}, "type": {"type": "string"},
"id": {"type": "integer"} "id": {"type": "integer"}
}, },
"required": ["type", "id"], "required": ["name", "status", "type", "id"],
"additionalProperties": False "additionalProperties": False
} }
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment