Skip to content
Snippets Groups Projects

[DBOARD3-676]: Adding circuit types to the list of mic data

Merged Saket Agrahari requested to merge feature/DBOARD3-676 into develop
2 files
+ 21
0
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -1383,6 +1383,19 @@ def populate_mic_cache(interface_services, r):
'third_party_id': rs.get('third_party_id', '')
}
def _get_formatted_interface_service(_is):
if _is['status'] == 'operational':
return {
'id': _is['id'],
'sid': _is.get('sid', ''),
'status': _is['status'],
'name': _is['name'],
'service_type': 'circuit_type',
'contacts': _is['contacts'],
'planned_work_contacts': _is['planned_work_contacts'],
'third_party_id': _is.get('third_party_id', '')
}
for services in interface_services.values():
if services:
current_interface_services = []
@@ -1393,6 +1406,11 @@ def populate_mic_cache(interface_services, r):
if rs['id'] not in seen_ids:
current_interface_services.append(rs)
seen_ids.add(rs['id'])
if (str(d.get('id')) + 'circuit') not in seen_ids:
_is = _get_formatted_interface_service(d)
if _is:
current_interface_services.append(_is)
seen_ids.add(str(d.get('id')) + 'circuit')
if current_interface_services:
site = f'{services[0]["pop_name"]} ' \
Loading