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

added contacts from direct interface

parent 0db76af9
No related branches found
No related tags found
No related merge requests found
......@@ -123,7 +123,8 @@ def get_port_id_services(ds: IMS):
InventoryStatus(circuit['inventorystatusid']), 'unknown'),
'circuit_type': circuit['circuit_type'],
'service_type': products[circuit['productid']],
'project': customers[circuit['customerid']]
'project': customers[circuit['customerid']],
'customerid': circuit['customerid']
}
ports = []
if circuit['internalports']:
......@@ -168,6 +169,7 @@ def get_port_id_services(ds: IMS):
'circuit_type': _get_circuit_type(circuit),
'service_type': products[circuit['productid']],
'project': customers[circuit['customerid']],
'customerid': circuit['customerid'],
'port_a_id': portrelate.get(
'portid',
portrelate.get('internalportid', ''))
......
......@@ -634,6 +634,13 @@ def update_circuit_hierarchy_and_port_id_services(self, use_current=False):
circuits = port_id_services.get(details['port_id'], [])
for circ in circuits:
contacts = set()
contacts.update(
customer_contacts.get(
circ['customerid'],
[]
)
)
circ['fibre-routes'] = \
[{
'id': hierarchy[x]['id'],
......@@ -643,7 +650,6 @@ def update_circuit_hierarchy_and_port_id_services(self, use_current=False):
circ['top-level-services'] = \
get_top_level_services(circ['id'])
contacts = set()
for tlc in circ['top-level-services']:
contacts.update(tlc.pop('contacts'))
circ['contacts'] = sorted(list(contacts))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment