def findPaths(self, source_stp, dest_stp, bandwidth, exclude_networks=None):

        source_port = self.getNetwork(source_stp.network).getPort(source_stp.port)
        dest_port   = self.getNetwork(dest_stp.network).getPort(dest_stp.port)

        if source_port.isBidirectional() or dest_port.isBidirectional():
            # at least one of the stps are bidirectional
            if not source_port.isBidirectional():
                raise error.TopologyError('Cannot connect bidirectional source with unidirectional destination')
            if not dest_port.isBidirectional():
                raise error.TopologyError('Cannot connect bidirectional destination with unidirectional source')
        else:
            # both ports are unidirectional
            if not ( (INGRESS, EGRESS), (EGRESS, INGRESS) ) in (source_port.orientation, dest_port.orientation):
                raise error.TopologyError('Cannot connect STPs of same unidirectional direction (%s -> %s)' % (source_port.orientation, dest_port.orientation))

        # these are only really interesting for the initial call, afterwards they just prune
        if not source_port.canMatchLabel(source_stp.label):
            raise error.TopologyError('Source port %s (label %s) cannot match label for source STP (%s)' % (source_port.id_, source_port.label(), source_stp.label))
        if not dest_port.canMatchLabel(dest_stp.label):
            raise error.TopologyError('Desitination port %s (label %s) cannot match label for destination STP %s' % (dest_port.id_, dest_port.label(), dest_stp.label))
#        if not source_port.canProvideBandwidth(bandwidth):
#            raise error.BandwidthUnavailableError('Source port cannot provide enough bandwidth (%i)' % bandwidth)
#        if not dest_port.canProvideBandwidth(bandwidth):
#            raise error.BandwidthUnavailableError('Destination port cannot provide enough bandwidth (%i)' % bandwidth)

        return self._findPathsRecurse(source_stp, dest_stp, bandwidth)
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/topology/nml.py/Topology.findPaths/swapped operands of `in`