Skip to content
Snippets Groups Projects
Commit 534bbf11 authored by Robert Latta's avatar Robert Latta
Browse files

added extra properties to response

parent 5c8be61a
No related branches found
No related tags found
No related merge requests found
......@@ -43,14 +43,19 @@ ALL_DATA_SCHEMA = {
"properties": {
"id": {"type": "integer"},
"sid": {"type": "string"},
"status": {"type": "string"},
"name": {"type": "string"},
"service_type": {"type": "string"},
"contacts": {
"type": "array",
"items": {"type": "string"}
},
"planned_work_contacts": {
"type": "array",
"items": {"type": "string"}
}
},
"required": ["id", "sid", "name", "service_type", "contacts"], # noqa E501
"required": ["id", "sid", "status", "name", "service_type", "contacts", "planned_work_contacts"], # noqa E501
"additionalProperties": False
}
}
......@@ -82,13 +87,15 @@ def get_everything():
def _get_formatted_rs(_d):
for rs in _d['related-services']:
if rs['status'] == 'operational':
if rs['status'] != 'operational':
yield {
'id': rs['id'],
'sid': rs.get('sid', ''),
'status': rs['status'],
'name': rs['name'],
'service_type': rs['service_type'],
'contacts': rs['contacts']
'contacts': rs['contacts'],
'planned_work_contacts': rs['planned_work_contacts']
}
key_pattern = "ims:interface_services:*"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment