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
No related branches found
No related tags found
No related merge requests found
......@@ -595,10 +595,12 @@ Any non-empty responses are JSON formatted messages.
"circuit": {
"type": "object",
"properties": {
"name": {"type": "string"},
"status": {"type": "string"},
"type": {"type": "string"},
"id": {"type": "integer"}
},
"required": ["type", "id"],
"required": ["name", "status", "type", "id"],
"additionalProperties": False
}
},
......
......@@ -68,9 +68,12 @@ def poller_interface_oids(hostname):
'opsdb:interface_services:%s:%s' % (hostname, ifc['name']))
if 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)
......
......@@ -16,10 +16,12 @@ def test_router_interfaces(router, client_with_mocked_data):
"circuit": {
"type": "object",
"properties": {
"name": {"type": "string"},
"status": {"type": "string"},
"type": {"type": "string"},
"id": {"type": "integer"}
},
"required": ["type", "id"],
"required": ["name", "status", "type", "id"],
"additionalProperties": False
}
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment