org.onosproject.net.Link Java Examples

The following examples show how to use org.onosproject.net.Link. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PceWebTopovMessageHandler.java    From onos with Apache License 2.0 6 votes vote down vote up
/**
 * Handles the highlights of selected path.
 */
private void hilightAndSendPaths(Highlights highlights) {
    LinkHighlight lh;
    int linkclr = 0;
    for (Path path : paths) {
        for (Link link : path.links()) {
            lh = new LinkHighlight(TopoUtils.compactLinkString(link), PRIMARY_HIGHLIGHT)
                    .addMod(new Mod(LINK_COLOR[linkclr]));
            highlights.add(lh);
        }
        linkclr = linkclr + 1;
        if (linkclr == LINK_COLOR_MAX) {
            linkclr = 0;
        }
    }

    sendMessage(highlightsMessage(highlights));
}
 
Example #2
Source File: IntentTestsMocks.java    From onos with Apache License 2.0 6 votes vote down vote up
@Override
public Set<Path> getPaths(ElementId src, ElementId dst, LinkWeigher weigher) {
    Set<Path> paths = getPaths(src, dst);

    for (Path path : paths) {
        DeviceId srcDevice = path.src().elementId() instanceof DeviceId ? path.src().deviceId() : null;
        DeviceId dstDevice = path.dst().elementId() instanceof DeviceId ? path.dst().deviceId() : null;
        if (srcDevice != null && dstDevice != null) {
            TopologyVertex srcVertex = new DefaultTopologyVertex(srcDevice);
            TopologyVertex dstVertex = new DefaultTopologyVertex(dstDevice);
            Link link = link(src.toString(), 1, dst.toString(), 1);

            Weight weightValue = weigher.weight(new DefaultTopologyEdge(srcVertex, dstVertex, link));
            if (weightValue.isNegative()) {
                return new HashSet<>();
            }
        }
    }
    return paths;
}
 
Example #3
Source File: DefaultL2TunnelHandler.java    From onos with Apache License 2.0 6 votes vote down vote up
/**
 * Returns the devices existing on a given path.
 *
 * @param path The path to traverse.
 * @return The devices on the path with the order they
 *         are traversed.
 */
private List<DeviceId> getDevicesOnPath(List<Link> path) {

    // iterate over links and get all devices in the order
    // we find them
    List<DeviceId> deviceList = new ArrayList<>();
    for (Link link : path) {
        if (!deviceList.contains(link.src().deviceId())) {
            deviceList.add(link.src().deviceId());
        }
        if (!deviceList.contains(link.dst().deviceId())) {
            deviceList.add(link.dst().deviceId());
        }
    }

    return deviceList;
}
 
Example #4
Source File: AppUiTopovMessageHandler.java    From onos with Apache License 2.0 6 votes vote down vote up
private Highlights fromLinks(Set<Link> links, DeviceId devId) {
    DemoLinkMap linkMap = new DemoLinkMap();
    if (links != null) {
        log.debug("Processing {} links", links.size());
        links.forEach(linkMap::add);
    } else {
        log.debug("No egress links found for device {}", devId);
    }

    Highlights highlights = new Highlights();

    for (DemoLink dlink : linkMap.biLinks()) {
        dlink.makeImportant().setLabel("Yo!");
        highlights.add(dlink.highlight(null));
    }
    return highlights;
}
 
Example #5
Source File: StatisticManager.java    From onos with Apache License 2.0 6 votes vote down vote up
@Override
public Load load(Link link, ApplicationId appId, Optional<GroupId> groupId) {
    checkPermission(STATISTIC_READ);

    Statistics stats = getStatistics(link.src());
    if (!stats.isValid()) {
        return new DefaultLoad();
    }

    ImmutableSet<FlowEntry> current = FluentIterable.from(stats.current())
            .filter(hasApplicationId(appId))
            .filter(hasGroupId(groupId))
            .toSet();
    ImmutableSet<FlowEntry> previous = FluentIterable.from(stats.previous())
            .filter(hasApplicationId(appId))
            .filter(hasGroupId(groupId))
            .toSet();

    return new DefaultLoad(aggregate(current), aggregate(previous));
}
 
Example #6
Source File: SimpleLinkStoreTest.java    From onos with Apache License 2.0 6 votes vote down vote up
@Test
public final void testGetDeviceIngressLinks() {
    LinkKey linkId1 = LinkKey.linkKey(new ConnectPoint(DID1, P1), new ConnectPoint(DID2, P2));
    LinkKey linkId2 = LinkKey.linkKey(new ConnectPoint(DID2, P2), new ConnectPoint(DID1, P1));
    LinkKey linkId3 = LinkKey.linkKey(new ConnectPoint(DID1, P2), new ConnectPoint(DID2, P3));

    putLink(linkId1, DIRECT);
    putLink(linkId2, DIRECT);
    putLink(linkId3, DIRECT);

    // DID1,P1 => DID2,P2
    // DID2,P2 => DID1,P1
    // DID1,P2 => DID2,P3

    Set<Link> links1 = linkStore.getDeviceIngressLinks(DID2);
    assertEquals(2, links1.size());
    // check

    Set<Link> links2 = linkStore.getDeviceIngressLinks(DID1);
    assertEquals(1, links2.size());
    assertLink(linkId2, DIRECT, links2.iterator().next());
}
 
Example #7
Source File: LinksWebResource.java    From onos with Apache License 2.0 6 votes vote down vote up
/**
 * Gets infrastructure links.
 * Returns array of all links, or links for the specified device or port.
 * @onos.rsModel LinksGet
 * @param deviceId  (optional) device identifier
 * @param port      (optional) port number
 * @param direction (optional) direction qualifier
 * @return 200 OK with array of all links, or links for the specified device or port
 */
@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getLinks(@QueryParam("device") String deviceId,
                         @QueryParam("port") String port,
                         @QueryParam("direction") String direction) {
    LinkService service = get(LinkService.class);
    Iterable<Link> links;

    if (deviceId != null && port != null) {
        links = getConnectPointLinks(new ConnectPoint(deviceId(deviceId),
                                                      portNumber(port)),
                                     direction, service);
    } else if (deviceId != null) {
        links = getDeviceLinks(deviceId(deviceId), direction, service);
    } else {
        links = service.getLinks();
    }
    return ok(encodeArray(Link.class, "links", links)).build();
}
 
Example #8
Source File: CreateNullLink.java    From onos with Apache License 2.0 6 votes vote down vote up
@Override
protected void doExecute() {
    NullProviders service = get(NullProviders.class);

    TopologySimulator simulator = service.currentSimulator();
    if (!(simulator instanceof CustomTopologySimulator)) {
        error("Custom topology simulator is not active.");
        return;
    }

    CustomTopologySimulator sim = (CustomTopologySimulator) simulator;
    ConnectPoint one = findAvailablePort(sim.deviceId(src), null);
    ConnectPoint two = findAvailablePort(sim.deviceId(dst), one);
    if (one == null) {
        error("\u001B[1;31mLink not created - no location (free port) available on src %s\u001B[0m", src);
        return;
    } else if (two == null) {
        error("\u001B[1;31mLink not created - no location (free port) available on dst %s\u001B[0m", dst);
        return;
    }
    sim.createLink(one, two, Link.Type.valueOf(type.toUpperCase()), !unidirectional);
}
 
Example #9
Source File: PointToPointIntentCompilerTest.java    From onos with Apache License 2.0 5 votes vote down vote up
/**
 * Tests that requests with suggested path
 * and with sufficient available bandwidth succeed.
 */
@Test
public void testSuggestedPathBandwidthConstrainedIntentSuccess() {
    final double bpsTotal = 1000.0;
    final double bpsToReserve = 100.0;

    final ResourceService resourceService =
            MockResourceService.makeCustomBandwidthResourceService(bpsTotal);
    final List<Constraint> constraints =
            Collections.singletonList(new BandwidthConstraint(Bandwidth.bps(bpsToReserve)));

    String[] suggestedPathHops = {S1, S4, S5, S3};
    List<Link> suggestedPath = NetTestTools.createPath(suggestedPathHops).links();

    final PointToPointIntent intent = makeIntentSuggestedPath(
            new ConnectPoint(DID_1, PORT_1),
            new ConnectPoint(DID_3, PORT_2),
            suggestedPath,
            constraints);

    String[][] hops = {{S1, S2, S3}, suggestedPathHops};
    final PointToPointIntentCompiler compiler = makeCompilerSuggestedPath(hops,
                                                             resourceService);

    final List<Intent> compiledIntents = compiler.compile(intent, null);

    assertThat(compiledIntents, Matchers.notNullValue());
    assertThat(compiledIntents, hasSize(1));

    assertThat("key is inherited",
               compiledIntents.stream().map(Intent::key).collect(Collectors.toList()),
               everyItem(is(intent.key())));

}
 
Example #10
Source File: PointToPointIntentCompiler.java    From onos with Apache License 2.0 5 votes vote down vote up
/**
 * Deletes intents from the given list if the ports or links the intent
 * relies on are no longer viable. The failover flow rule intent is never
 * deleted -- only its contents are updated.
 *
 * @param oldInstallables  list of intents to examine
 * @return                 list of reusable installable intents
 */
private List<Intent> filterInvalidSubIntents(List<Intent> oldInstallables,
                                             PointToPointIntent pointIntent) {
    List<Intent> intentList = new ArrayList<>();
    intentList.addAll(oldInstallables);

    Iterator<Intent> iterator = intentList.iterator();
    while (iterator.hasNext()) {
        Intent intent = iterator.next();
        intent.resources().forEach(resource -> {
            if (resource instanceof Link) {
                Link link = (Link) resource;
                if (link.state() == Link.State.INACTIVE) {
                    setPathsToRemove(intent);
                } else if (link instanceof EdgeLink) {
                    ConnectPoint connectPoint = (link.src().elementId() instanceof DeviceId)
                            ? link.src() : link.dst();
                    Port port = deviceService.getPort(connectPoint.deviceId(), connectPoint.port());
                    if (port == null || !port.isEnabled()) {
                        setPathsToRemove(intent);
                    }
                } else {
                    Port port1 = deviceService.getPort(link.src().deviceId(), link.src().port());
                    Port port2 = deviceService.getPort(link.dst().deviceId(), link.dst().port());
                    if (port1 == null || !port1.isEnabled() || port2 == null || !port2.isEnabled()) {
                        setPathsToRemove(intent);
                    }
                }
            }
        });
    }
    removeAndUpdateIntents(intentList, pointIntent);

    return intentList;
}
 
Example #11
Source File: HostToHostIntentCompiler.java    From onos with Apache License 2.0 5 votes vote down vote up
private Link reverseLink(Link link) {
    return DefaultLink.builder().providerId(link.providerId())
            .src(link.dst())
            .dst(link.src())
            .type(link.type())
            .state(link.state())
            .isExpected(link.isExpected())
            .build();
}
 
Example #12
Source File: SimpleLinkStore.java    From onos with Apache License 2.0 5 votes vote down vote up
@Override
public LinkEvent removeLink(ConnectPoint src, ConnectPoint dst) {
    final LinkKey key = linkKey(src, dst);
    Map<ProviderId, LinkDescription> descs = getOrCreateLinkDescriptions(key);
    synchronized (descs) {
        Link link = links.remove(key);
        descs.clear();
        if (link != null) {
            srcLinks.remove(link.src().deviceId(), key);
            dstLinks.remove(link.dst().deviceId(), key);
            return new LinkEvent(LINK_REMOVED, link);
        }
        return null;
    }
}
 
Example #13
Source File: ProtectedTransportIntentCompiler.java    From onos with Apache License 2.0 5 votes vote down vote up
/**
 * Test if resources used by specified Intent is intact.
 *
 * @param installed Intent to test
 * @return true if Intent is intact
 */
private boolean isIntact(Intent installed) {
    return installed.resources().stream()
        .filter(Link.class::isInstance)
        .map(Link.class::cast)
        .allMatch(this::isLive);
}
 
Example #14
Source File: PathComputationTest.java    From onos with Apache License 2.0 5 votes vote down vote up
/**
 * Path without constraints.
 */
@Test
public void testpathComputationCase7() {
    Link link1 = addLink(DEVICE1, 10, DEVICE2, 20, true, 50);
    Link link2 = addLink(DEVICE2, 30, DEVICE4, 40, true, 20);
    Link link3 = addLink(DEVICE1, 80, DEVICE3, 70, true, 100);
    Link link4 = addLink(DEVICE3, 60, DEVICE4, 50, true, 80);
    List<Constraint> constraints = new LinkedList<>();
    Set<Path> paths = computePath(link1, link2, link3, link4, constraints);

    assertThat(paths.iterator().next().weight(), is(ScalarWeight.toWeight(2.0)));
}
 
Example #15
Source File: PceManagerTest.java    From onos with Apache License 2.0 5 votes vote down vote up
/**
 * Tests resiliency when L2 link is down.
 */
@Test
public void resiliencyTest1() {
    build4RouterTopo(true, false, false, false, 10);


    List<Constraint> constraints = new LinkedList<Constraint>();
    CostConstraint costConstraint = new CostConstraint(COST);
    constraints.add(costConstraint);
    PceBandwidthConstraint localBwConst = new PceBandwidthConstraint(Bandwidth.bps(10));
    constraints.add(localBwConst);

    //Setup the path , tunnel created
    boolean result = pceManager.setupPath(D1.deviceId(), D4.deviceId(), "T123",
            constraints, WITH_SIGNALLING, null);
    assertThat(result, is(true));
    assertThat(pceStore.getFailedPathInfoCount(), is(0));

    List<Event> reasons = new LinkedList<>();
    final LinkEvent linkEvent = new LinkEvent(LinkEvent.Type.LINK_REMOVED, link2);
    reasons.add(linkEvent);
    final TopologyEvent event = new TopologyEvent(
            TopologyEvent.Type.TOPOLOGY_CHANGED,
            topology,
            reasons);

    //Change Topology : remove link2
    Set<TopologyEdge> tempEdges = new HashSet<>();
    tempEdges.add(new DefaultTopologyEdge(D2, D4, link2));
    topologyService.changeInTopology(getGraph(null,  tempEdges));
    listener.event(event);

    List<Link> links = new LinkedList<>();
    links.add(link3);
    links.add(link4);

    //Path is D1-D3-D4
    assertThat(pathService.paths().iterator().next().links(), is(links));
    assertThat(pathService.paths().iterator().next().weight(), is(ScalarWeight.toWeight(180.0)));
}
 
Example #16
Source File: TopoIntentFilter.java    From onos with Apache License 2.0 5 votes vote down vote up
private boolean pathContainsDevice(Iterable<Link> links, DeviceId id) {
    for (Link link : links) {
        if (link.src().elementId().equals(id) || link.dst().elementId().equals(id)) {
            return true;
        }
    }
    return false;
}
 
Example #17
Source File: TopoIntentFilter.java    From onos with Apache License 2.0 5 votes vote down vote up
private Link getFirstLink(ConnectPoint point, boolean ingress) {
    for (Link link : linkService.getLinks(point)) {
        if (point.equals(ingress ? link.src() : link.dst())) {
            return link;
        }
    }
    return null;
}
 
Example #18
Source File: DefaultGroupHandler.java    From onos with Apache License 2.0 5 votes vote down vote up
private void populateNeighborMaps() {
    Set<Link> outgoingLinks = linkService.getDeviceEgressLinks(deviceId);
    for (Link link : outgoingLinks) {
        if (link.type() != Link.Type.DIRECT) {
            continue;
        }
        addNeighborAtPort(link.dst().deviceId(), link.src().port());
    }
}
 
Example #19
Source File: PointToPointIntent.java    From onos with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new point-to-point intent with the supplied ingress/egress
 * ports and constraints.
 *
 * @param appId             application identifier
 * @param key               key of the intent
 * @param selector          traffic selector
 * @param treatment         treatment
 * @param ingressPoint      filtered ingress port
 * @param egressPoint       filtered egress port
 * @param constraints       optional list of constraints
 * @param priority          priority to use for flows generated by this intent
 * @param suggestedPath     suggested path
 * @throws NullPointerException if {@code ingressPoint} or
 *        {@code egressPoints} or {@code appId} is null or {@code path} is null.
 */
private PointToPointIntent(ApplicationId appId,
                           Key key,
                           TrafficSelector selector,
                           TrafficTreatment treatment,
                           FilteredConnectPoint ingressPoint,
                           FilteredConnectPoint egressPoint,
                           List<Constraint> constraints,
                           int priority,
                           List<Link> suggestedPath,
                           ResourceGroup resourceGroup) {
    super(appId,
          key,
          suggestedPath != null ? resources(suggestedPath) : Collections.emptyList(),
          selector,
          treatment,
          constraints,
          priority,
          resourceGroup);

    checkArgument(!ingressPoint.equals(egressPoint),
            "ingress and egress should be different (ingress: %s, egress: %s)", ingressPoint, egressPoint);

    this.ingressPoint = checkNotNull(ingressPoint);
    this.egressPoint = checkNotNull(egressPoint);
    this.suggestedPath = suggestedPath;

}
 
Example #20
Source File: MQEventHandlerTest.java    From onos with Apache License 2.0 5 votes vote down vote up
private void submitTopologyGraph() {
    Set<Device> devices = of(device("a"), device("b"), device("c"),
                             device("d"), device("e"), device("f"));
    Set<Link> links = of(link("a", 1, "b", 1), link("b", 1, "a", 1),
                         link("b", 2, "c", 1), link("c", 1, "b", 2),
                         link("c", 2, "d", 1), link("d", 1, "c", 2),
                         link("d", 2, "a", 2), link("a", 2, "d", 2),
                         link("e", 1, "f", 1), link("f", 1, "e", 1));
    GraphDescription data = new DefaultGraphDescription(4321L,
                                 System.currentTimeMillis(),
                                 devices, links);
    providerService.topologyChanged(data, null);
}
 
Example #21
Source File: VirtualLinkCodec.java    From onos with Apache License 2.0 5 votes vote down vote up
@Override
public ObjectNode encode(VirtualLink vLink, CodecContext context) {
    checkNotNull(vLink, NULL_OBJECT_MSG);

    ObjectNode result = context.mapper().createObjectNode()
            .put(NETWORK_ID, vLink.networkId().toString());
    JsonCodec<Link> codec = context.codec(Link.class);
    ObjectNode linkResult = codec.encode(vLink, context);
    result.setAll(linkResult);
    return result;
}
 
Example #22
Source File: TrafficLinkTest.java    From onos with Apache License 2.0 5 votes vote down vote up
private TrafficLink createALink() {
    Link linkIngress = DefaultEdgeLink.createEdgeLink(SRC1, true);
    LinkKey key = TopoUtils.canonicalLinkKey(checkNotNull(linkIngress));
    TrafficLink tl = new TrafficLink(key, linkIngress);
    Link linkEgress = DefaultEdgeLink.createEdgeLink(SRC1, false);
    tl.setOther(linkEgress);
    return tl;
}
 
Example #23
Source File: PathComputationTest.java    From onos with Apache License 2.0 5 votes vote down vote up
/**
 * Path which satisfy bandwidth as a constraint with 10bps.
 */
@Test
public void testpathComputationCase3() {
    Link link1 = addLink(DEVICE1, 10, DEVICE2, 20, true, 50);
    Link link2 = addLink(DEVICE2, 30, DEVICE4, 40, true, 20);
    Link link3 = addLink(DEVICE1, 80, DEVICE3, 70, true, 100);
    Link link4 = addLink(DEVICE3, 60, DEVICE4, 50, true, 50);

    Set<Double> unreserved = new HashSet<>();
    unreserved.add(new Double(50));

    bandwidthMgmtService.addUnreservedBw(LinkKey.linkKey(link1), unreserved);
    bandwidthMgmtService.allocLocalReservedBw(LinkKey.linkKey(link1), new Double(0));

    bandwidthMgmtService.addUnreservedBw(LinkKey.linkKey(link2), unreserved);
    bandwidthMgmtService.allocLocalReservedBw(LinkKey.linkKey(link2), new Double(0));

    unreserved.remove(new Double(50));
    unreserved.add(new Double(100));
    bandwidthMgmtService.addUnreservedBw(LinkKey.linkKey(link3), unreserved);
    bandwidthMgmtService.allocLocalReservedBw(LinkKey.linkKey(link3), new Double(0));

    bandwidthMgmtService.addUnreservedBw(LinkKey.linkKey(link4), unreserved);
    bandwidthMgmtService.allocLocalReservedBw(LinkKey.linkKey(link4), new Double(0));

    PceBandwidthConstraint bandwidthConst = new PceBandwidthConstraint(Bandwidth.bps(10.0));

    List<Constraint> constraints = new LinkedList<>();
    constraints.add(bandwidthConst);

    Set<Path> paths = computePath(link1, link2, link3, link4, constraints);

    assertThat(paths.iterator().next().weight(), is(ScalarWeight.toWeight(2.0)));
}
 
Example #24
Source File: ECLinkStoreTest.java    From onos with Apache License 2.0 5 votes vote down vote up
@Test
public final void testGetLink() {
    ConnectPoint src = new ConnectPoint(DID1, P1);
    ConnectPoint dst = new ConnectPoint(DID2, P2);
    LinkKey linkId1 = LinkKey.linkKey(src, dst);

    putLink(linkId1, DIRECT);

    Link link = linkStore.getLink(src, dst);
    assertLink(linkId1, DIRECT, link);

    assertNull("There shouldn't be reverese link",
            linkStore.getLink(dst, src));
}
 
Example #25
Source File: PointToPointIntentTest.java    From onos with Apache License 2.0 5 votes vote down vote up
protected PointToPointIntent createWithSuggestedPath(List<Link> suggestedPath) {
    return PointToPointIntent.builder()
            .appId(APPID)
            .selector(MATCH)
            .treatment(NOP)
            .filteredIngressPoint(FP1)
            .filteredEgressPoint(FP2)
            .suggestedPath(suggestedPath)
            .build();
}
 
Example #26
Source File: ModelCache.java    From onos with Apache License 2.0 5 votes vote down vote up
void removeDeviceLink(Link link) {
    UiLinkId id = uiLinkId(link);
    UiDeviceLink uiDeviceLink = uiTopology.findDeviceLink(id);
    if (uiDeviceLink != null) {
        boolean remaining = uiDeviceLink.detachBackingLink(link);
        if (remaining) {
            postEvent(LINK_ADDED_OR_UPDATED, uiDeviceLink, MEMO_UPDATED);
        } else {
            uiTopology.remove(uiDeviceLink);
            postEvent(LINK_REMOVED, uiDeviceLink, MEMO_REMOVED);
        }
    } else {
        log.warn(E_NO_ELEMENT, "Device link", id);
    }
}
 
Example #27
Source File: TrafficMonitorBase.java    From onos with Apache License 2.0 5 votes vote down vote up
protected Iterable<Link> addEdgeLinksIfNeeded(Intent parentIntent,
                                              Collection<Link> links) {
    if (parentIntent instanceof HostToHostIntent) {
        links = new HashSet<>(links);
        HostToHostIntent h2h = (HostToHostIntent) parentIntent;
        Host h1 = services.host().getHost(h2h.one());
        Host h2 = services.host().getHost(h2h.two());
        links.add(createEdgeLink(h1, true));
        links.add(createEdgeLink(h2, true));
    }
    return links;
}
 
Example #28
Source File: BandwidthManager.java    From onos with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isBandwidthAvailable(Link link, Double bandwidth) {
    checkNotNull(link);
    checkNotNull(bandwidth);

    LinkKey linkKey = LinkKey.linkKey(link);
    Double localAllocBw = getAllocatedLocalReservedBw(linkKey);

    Set<Double> unResvBw = getUnreservedBw(linkKey);
    Double prirZeroBw = unResvBw.iterator().next();

    return (bandwidth <= prirZeroBw -  (localAllocBw != null ? localAllocBw : 0));
}
 
Example #29
Source File: LinkTypeCompleter.java    From onos with Apache License 2.0 5 votes vote down vote up
@Override
protected List<String> choices() {
    return EnumSet.allOf(Link.Type.class).stream()
            .sorted(Comparator.comparingInt(Enum::ordinal))
            .map(Enum::name)
            .collect(Collectors.toList());
}
 
Example #30
Source File: McastUtils.java    From onos with Apache License 2.0 5 votes vote down vote up
private Set<List<Link>> getAffectedPathsByDevice(Set<List<Link>> paths, Object failedElement) {
    DeviceId affectedDevice = (DeviceId) failedElement;
    Set<List<Link>> affectedPaths = Sets.newHashSet();
    paths.forEach(path -> {
        if (path.stream().anyMatch(link -> link.src().deviceId().equals(affectedDevice))) {
            affectedPaths.add(path);
        }
    });
    return affectedPaths;
}