Commit adb8ab41 authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

PathComp Frontend:

- Fix unit test K-Disjoint paths
parent c62fe1bf
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -63,9 +63,9 @@ class KDisjointPathAlgorithm(_Algorithm):
                elif kind == 'endpoint_location':
                    endpoint_id = constraint.endpoint_location.endpoint_id
                    device_uuid = endpoint_id.device_id.device_uuid.uuid
                    device_uuid = self.device_name_mapping.get(device_uuid, device_uuid)
                    device_uuid = self.device_uuid_mapping.get(device_uuid, device_uuid)
                    endpoint_uuid = endpoint_id.endpoint_uuid.uuid
                    endpoint_uuid = self.endpoint_name_mapping.get((device_uuid, endpoint_uuid), endpoint_uuid)
                    endpoint_uuid = self.endpoint_uuid_mapping.get((device_uuid, endpoint_uuid), endpoint_uuid)
                    location_kind = constraint.endpoint_location.location.WhichOneof('location')
                    if location_kind != 'region':
                        MSG = 'Unsupported LocationType({:s}) in Constraint({:s})'
@@ -76,9 +76,9 @@ class KDisjointPathAlgorithm(_Algorithm):
                elif kind == 'endpoint_priority':
                    endpoint_id = constraint.endpoint_priority.endpoint_id
                    device_uuid = endpoint_id.device_id.device_uuid.uuid
                    device_uuid = self.device_name_mapping.get(device_uuid, device_uuid)
                    device_uuid = self.device_uuid_mapping.get(device_uuid, device_uuid)
                    endpoint_uuid = endpoint_id.endpoint_uuid.uuid
                    endpoint_uuid = self.endpoint_name_mapping.get((device_uuid, endpoint_uuid), endpoint_uuid)
                    endpoint_uuid = self.endpoint_uuid_mapping.get((device_uuid, endpoint_uuid), endpoint_uuid)
                    priority = constraint.endpoint_priority.priority
                    endpoints.setdefault((device_uuid, endpoint_uuid), dict())['priority'] = priority