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

only add contact details for monitored services

parent 969d2d59
No related branches found
No related tags found
No related merge requests found
......@@ -847,7 +847,8 @@ def _extract_ims_data(ims_api_url, ims_username, ims_password):
executor.submit(_populate_hierarchy): 'hierarchy',
executor.submit(_populate_port_id_details): 'port_id_details',
executor.submit(_populate_circuit_info): 'circuit_info',
executor.submit(_populate_flexils_data): 'flexils_data'
executor.submit(_populate_flexils_data): 'flexils_data',
executor.submit(_populate_customers): 'customers'
}
for future in concurrent.futures.as_completed(futures):
......@@ -1089,8 +1090,13 @@ def transform_ims_data(data):
for tlc in circ['related-services']:
# why were these removed?
# contacts.update(tlc.pop('contacts'))
contacts.update(tlc.get('contacts'))
pw_contacts.update(tlc.get('planned_work_contacts', []))
if circ['status'] == 'operational' \
and circ['id'] in circuit_ids_to_monitor \
and tlc['status'] == 'operational' \
and tlc['id'] in circuit_ids_to_monitor:
contacts.update(tlc.get('contacts'))
pw_contacts.update(
tlc.get('planned_work_contacts', []))
circ['contacts'] = sorted(list(contacts))
circ['planned_work_contacts'] = sorted(list(pw_contacts))
......
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