- private void checkTransitionalLink(
- org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Link link, Uuid node1Uuid,
- Uuid node2Uuid, String tp1, String tp2, String ietfNodeId) {
- Uuid linkUuid = new Uuid(UUID.nameUUIDFromBytes((tp1 + "to" + tp2).getBytes(Charset.forName("UTF-8")))
- .toString());
- assertEquals(linkUuid, link.getUuid(), "bad uuid for link between DSR node " + tp1 + " and iOTSI port " + tp2);
- assertEquals(CapacityUnit.GBPS, link.getAvailableCapacity().getTotalSize().getUnit(),
- "Available capacity unit should be GBPS");
- assertEquals(Uint64.valueOf(100), link.getAvailableCapacity().getTotalSize().getValue(),
- "Available capacity -total size value should be 100");
- assertEquals(2, link.getTransitionedLayerProtocolName().size(),
- "transitional link should be between 2 nodes of protocol layers ODU and PHOTONIC_MEDIA");
- assertThat("transitional link should be between 2 nodes of protocol layers ODU and PHOTONIC_MEDIA",
- link.getTransitionedLayerProtocolName(),
- hasItems(LayerProtocolName.ODU.getName(), LayerProtocolName.PHOTONICMEDIA.getName()));
- assertEquals(ForwardingDirection.BIDIRECTIONAL, link.getDirection(),
- "transitional link should be BIDIRECTIONAL");
- List<org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210
- .link.NodeEdgePoint> nodeEdgePointList = new ArrayList<>(link.nonnullNodeEdgePoint().values());
- assertEquals(topologyUuid, nodeEdgePointList.get(0).getTopologyUuid(),
- "topology uuid should be the same for the two termination point of the link");
- assertEquals(topologyUuid, nodeEdgePointList.get(1).getTopologyUuid(),
- "topology uuid should be the same for the two termination point of the link");
- assertThat("transitional links should terminate on DSR node and Photonic node",
- nodeEdgePointList.get(0).getNodeUuid().getValue(),
- either(containsString(node1Uuid.getValue())).or(containsString(node2Uuid.getValue())));
- assertThat("transitional links should terminate on DSR node and Photonic node",
- nodeEdgePointList.get(1).getNodeUuid().getValue(),
- either(containsString(node1Uuid.getValue())).or(containsString(node2Uuid.getValue())));
- Uuid nep1Uuid = new Uuid(UUID.nameUUIDFromBytes(tp1.getBytes(Charset.forName("UTF-8"))).toString());
- Uuid nep2Uuid = new Uuid(UUID.nameUUIDFromBytes(tp2.getBytes(Charset.forName("UTF-8"))).toString());
- assertThat("transitional links should terminate on " + tp1 + " and " + tp2 + " neps",
- nodeEdgePointList.get(0).getNodeEdgePointUuid().getValue(),
- either(containsString(nep1Uuid.getValue())).or(containsString(nep2Uuid.getValue())));
- assertThat("transitional links should terminate on DSR node and Photonic node",
- nodeEdgePointList.get(1).getNodeEdgePointUuid().getValue(),
- either(containsString(nep1Uuid.getValue())).or(containsString(nep2Uuid.getValue())));
- }
-
- private void checkOmsLink(org.opendaylight.yang.gen.v1.urn.onf.otcc.yang.tapi.topology.rev181210.topology.Link link,