Skip to content
Snippets Groups Projects

Add fix for assigning correct port SIDs to circuits

Merged Bjarke Madsen requested to merge feature/POL1-687-fix-missing-services into develop
1 file
+ 14
4
Compare changes
  • Side-by-side
  • Inline
@@ -1110,16 +1110,26 @@ def transform_ims_data(data):
node_pair_services[
f"{circ['equipment']}/{circ['other_end_equipment']}"
][circ['id']] = circ
try:
# get the physical port circuit, if it exists
# https://jira.software.geant.org/browse/POL1-687
port_circuit = next(
c for c in circuits if c.get('port_type') == 'ports')
except StopIteration:
port_circuit = None
sid = None
if circ['id'] in circuit_ids_and_sids:
sid = circuit_ids_and_sids[circ['id']]
elif 'sid' in details:
if len(circuits) > 1:
# we don't know which circuit
# to give the SID in this case, so skip
continue
if port_circuit != circ:
# if this is not the physical port circuit
# related to this port, then we don't want to
# assign the SID to this circuit, so skip.
continue
# assign the SID from the port to this circuit
sid = details['sid']
if sid is None:
Loading