import org.opendaylight.transportpce.common.network.RequestProcessor;
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperations;
import org.opendaylight.transportpce.servicehandler.service.ServiceDataStoreOperationsImpl;
+import org.opendaylight.transportpce.tapi.TapiStringConstants;
import org.opendaylight.transportpce.tapi.connectivity.ConnectivityUtils;
import org.opendaylight.transportpce.tapi.utils.TapiContext;
import org.opendaylight.transportpce.tapi.utils.TapiInitialORMapping;
+import org.opendaylight.transportpce.tapi.utils.TapiLink;
import org.opendaylight.transportpce.tapi.utils.TapiTopologyDataUtils;
import org.opendaylight.transportpce.test.AbstractTest;
import org.opendaylight.transportpce.test.utils.TopologyDataUtils;
public static ConnectivityUtils connectivityUtils;
public static ServiceDataStoreOperations serviceDataStoreOperations;
public static TapiInitialORMapping tapiInitialORMapping;
+ public static TapiLink tapiLink;
@BeforeClass
public static void setUp() throws InterruptedException, ExecutionException {
executorService = MoreExecutors.listeningDecorator(Executors.newFixedThreadPool(NUM_THREADS));
endSignal = new CountDownLatch(1);
TopologyDataUtils.writeTopologyFromFileToDatastore(getDataStoreContextUtil(),
- TapiTopologyDataUtils.OPENROADM_TOPOLOGY_FILE, InstanceIdentifiers.OVERLAY_NETWORK_II);
+ TapiTopologyDataUtils.OPENROADM_TOPOLOGY_FILE, InstanceIdentifiers.OVERLAY_NETWORK_II);
TopologyDataUtils.writeTopologyFromFileToDatastore(getDataStoreContextUtil(),
- TapiTopologyDataUtils.OPENROADM_NETWORK_FILE, InstanceIdentifiers.UNDERLAY_NETWORK_II);
+ TapiTopologyDataUtils.OPENROADM_NETWORK_FILE, InstanceIdentifiers.UNDERLAY_NETWORK_II);
TopologyDataUtils.writeTopologyFromFileToDatastore(getDataStoreContextUtil(),
- TapiTopologyDataUtils.OTN_TOPOLOGY_FILE, InstanceIdentifiers.OTN_NETWORK_II);
+ TapiTopologyDataUtils.OTN_TOPOLOGY_FILE, InstanceIdentifiers.OTN_NETWORK_II);
TopologyDataUtils.writePortmappingFromFileToDatastore(getDataStoreContextUtil(),
- TapiTopologyDataUtils.PORTMAPPING_FILE);
+ TapiTopologyDataUtils.PORTMAPPING_FILE);
networkTransactionService = new NetworkTransactionImpl(
- new RequestProcessor(getDataStoreContextUtil().getDataBroker()));
+ new RequestProcessor(getDataStoreContextUtil().getDataBroker()));
+ tapiLink = new TapiLink(networkTransactionService);
serviceDataStoreOperations = new ServiceDataStoreOperationsImpl(getDataStoreContextUtil().getDataBroker());
tapiContext = new TapiContext(networkTransactionService);
- topologyUtils = new TopologyUtils(networkTransactionService, getDataStoreContextUtil().getDataBroker());
- connectivityUtils = new ConnectivityUtils(serviceDataStoreOperations, new HashMap<>(), tapiContext);
+ topologyUtils = new TopologyUtils(networkTransactionService, getDataStoreContextUtil().getDataBroker(),
+ tapiLink);
+ connectivityUtils = new ConnectivityUtils(serviceDataStoreOperations, new HashMap<>(), tapiContext,
+ networkTransactionService);
tapiInitialORMapping = new TapiInitialORMapping(topologyUtils, connectivityUtils,
- tapiContext, serviceDataStoreOperations);
+ tapiContext, serviceDataStoreOperations);
tapiInitialORMapping.performTopoInitialMapping();
LOG.info("setup done");
}
@Test
public void getTopologyDetailsForTransponder100GTopologyWhenSuccessful()
throws ExecutionException, InterruptedException {
- GetTopologyDetailsInput input = TapiTopologyDataUtils.buildGetTopologyDetailsInput(TopologyUtils.TPDR_100G);
- TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils);
+ GetTopologyDetailsInput input = TapiTopologyDataUtils.buildGetTopologyDetailsInput(
+ TapiStringConstants.TPDR_100G);
+ TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils, tapiLink);
ListenableFuture<RpcResult<GetTopologyDetailsOutput>> result = tapiTopoImpl.getTopologyDetails(input);
result.addListener(new Runnable() {
@Override
@Nullable
Topology topology = rpcResult.getResult().getTopology();
assertNotNull("Topology should not be null", topology);
- Uuid topoUuid = new Uuid(UUID.nameUUIDFromBytes(TopologyUtils.TPDR_100G.getBytes(StandardCharsets.UTF_8))
+ Uuid topoUuid = new Uuid(UUID.nameUUIDFromBytes(TapiStringConstants.TPDR_100G.getBytes(StandardCharsets.UTF_8))
.toString());
assertEquals("incorrect topology uuid", topoUuid, topology.getUuid());
assertEquals("Node list size should be 1", 1, topology.getNode().size());
@Test
public void getTopologyDetailsForOtnTopologyWithOtnLinksWhenSuccessful()
throws ExecutionException, InterruptedException {
- GetTopologyDetailsInput input = TapiTopologyDataUtils.buildGetTopologyDetailsInput(TopologyUtils.T0_MULTILAYER);
- TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils);
+ GetTopologyDetailsInput input = TapiTopologyDataUtils.buildGetTopologyDetailsInput(
+ TapiStringConstants.T0_MULTILAYER);
+ TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils, tapiLink);
ListenableFuture<RpcResult<GetTopologyDetailsOutput>> result = tapiTopoImpl.getTopologyDetails(input);
result.addListener(new Runnable() {
@Override
assertEquals("Node list size should be 13", 13, topology.getNode().size());
long nb1 = topology.getNode().values().stream()
.filter(node -> node.getLayerProtocolName().contains(LayerProtocolName.DSR))
- .filter(node -> node.getName().values().stream().findFirst().get().getValue().equals("XPDR-A1-XPDR1"))
+ .filter(node -> node.getName().get(new NameKey("dsr/odu node name")).getValue()
+ .equals("XPDR-A1-XPDR1+DSR"))
.flatMap(node -> node.getOwnedNodeEdgePoint().values().stream()
.filter(nep -> nep.getName().containsKey(new NameKey("100G-tpdr"))))
.count();
assertEquals("XPDR-A1-XPDR1 should only have one client nep", 1, nb1);
long nb2 = topology.getNode().values().stream()
.filter(node -> node.getLayerProtocolName().contains(LayerProtocolName.DSR))
- .filter(node -> node.getName().values().stream().findFirst().get().getValue().equals("SPDR-SA1-XPDR1"))
+ .filter(node -> node.getName().get(new NameKey("dsr/odu node name")).getValue()
+ .equals("SPDR-SA1-XPDR1+DSR"))
.flatMap(node -> node.getOwnedNodeEdgePoint().values().stream()
.filter(nep -> nep.getName().containsKey(new NameKey("NodeEdgePoint_C"))))
.count();
assertEquals("SPDR-SA1-XPDR1 (mux) should have 4 client neps", 4, nb2);
long nb3 = topology.getNode().values().stream()
.filter(node -> node.getLayerProtocolName().contains(LayerProtocolName.DSR))
- .filter(node -> node.getName().values().stream().findFirst().get().getValue().equals("SPDR-SA1-XPDR1"))
+ .filter(node -> node.getName().get(new NameKey("dsr/odu node name")).getValue()
+ .equals("SPDR-SA1-XPDR1+DSR"))
.flatMap(node -> node.getOwnedNodeEdgePoint().values().stream()
- .filter(nep -> nep.getName().containsKey(new NameKey("NodeEdgePoint_N"))))
+ .filter(nep -> nep.getName().containsKey(new NameKey("iNodeEdgePoint_N"))))
.count();
assertEquals("SPDR-SA1-XPDR1 (mux) should have a single network nep", 1, nb3);
long nb4 = topology.getNode().values().stream()
.filter(node -> node.getLayerProtocolName().contains(LayerProtocolName.DSR))
- .filter(node -> node.getName().values().stream().findFirst().get().getValue().equals("SPDR-SA1-XPDR2"))
+ .filter(node -> node.getName().get(new NameKey("dsr/odu node name")).getValue()
+ .equals("SPDR-SA1-XPDR2+DSR"))
.flatMap(node -> node.getOwnedNodeEdgePoint().values().stream()
.filter(nep -> nep.getName().containsKey(new NameKey("NodeEdgePoint_C"))))
.count();
assertEquals("SPDR-SA1-XPDR2 (switch) should have 4 client neps", 4, nb4);
long nb5 = topology.getNode().values().stream()
.filter(node -> node.getLayerProtocolName().contains(LayerProtocolName.DSR))
- .filter(node -> node.getName().values().stream().findFirst().get().getValue().equals("SPDR-SA1-XPDR2"))
+ .filter(node -> node.getName().get(new NameKey("dsr/odu node name")).getValue()
+ .equals("SPDR-SA1-XPDR2+DSR"))
.flatMap(node -> node.getOwnedNodeEdgePoint().values().stream()
- .filter(nep -> nep.getName().containsKey(new NameKey("NodeEdgePoint_N"))))
+ .filter(nep -> nep.getName().containsKey(new NameKey("iNodeEdgePoint_N"))))
.count();
assertEquals("SPDR-SA1-XPDR2 (switch) should have 2 network neps", 2, nb5);
assertEquals("Link list size should be 18", 18, topology.getLink().size());
.toString());
Uuid node4Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+OTSi".getBytes(StandardCharsets.UTF_8))
.toString());
- Uuid tp1Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+DSR+XPDR1-NETWORK1"
+ Uuid tp1Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+eODU+XPDR1-NETWORK1"
.getBytes(StandardCharsets.UTF_8)).toString());
- Uuid tp2Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+DSR+XPDR1-NETWORK1"
+ Uuid tp2Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+eODU+XPDR1-NETWORK1"
.getBytes(StandardCharsets.UTF_8)).toString());
Uuid tp3Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+iOTSi+XPDR1-NETWORK1"
.getBytes(StandardCharsets.UTF_8)).toString());
Uuid tp4Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+iOTSi+XPDR1-NETWORK1"
.getBytes(StandardCharsets.UTF_8)).toString());
Uuid link1Uuid =
- new Uuid(UUID.nameUUIDFromBytes("ODTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1"
+ new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+iOTSi+XPDR1-NETWORK1toSPDR-SC1-XPDR1+iOTSi+XPDR1-NETWORK1"
.getBytes(StandardCharsets.UTF_8)).toString());
Uuid link2Uuid =
- new Uuid(UUID.nameUUIDFromBytes("OTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1"
+ new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+eODU+XPDR1-NETWORK1toSPDR-SC1-XPDR1+eODU+XPDR1-NETWORK1"
.getBytes(StandardCharsets.UTF_8)).toString());
List<Link> links = topology.nonnullLink().values().stream()
.filter(l -> l.getName().containsKey(new NameKey("otn link name")))
.sorted((l1, l2) -> l1.getUuid().getValue().compareTo(l2.getUuid().getValue()))
.collect(Collectors.toList());
- checkOtnLink(links.get(0), topoUuid, node1Uuid, node2Uuid, tp1Uuid, tp2Uuid, link1Uuid,
- "ODTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1");
- checkOtnLink(links.get(1), topoUuid, node3Uuid, node4Uuid, tp3Uuid, tp4Uuid, link2Uuid,
- "OTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1");
+ checkOtnLink(links.get(0), topoUuid, node3Uuid, node4Uuid, tp3Uuid, tp4Uuid, link1Uuid,
+ "SPDR-SA1-XPDR1+iOTSi+XPDR1-NETWORK1toSPDR-SC1-XPDR1+iOTSi+XPDR1-NETWORK1");
+ checkOtnLink(links.get(1), topoUuid, node1Uuid, node2Uuid, tp1Uuid, tp2Uuid, link2Uuid,
+ "SPDR-SA1-XPDR1+eODU+XPDR1-NETWORK1toSPDR-SC1-XPDR1+eODU+XPDR1-NETWORK1");
}
@Test
public void getTopologyDetailsForFullTapiTopologyWithLinksWhenSuccessful()
throws ExecutionException, InterruptedException {
GetTopologyDetailsInput input = TapiTopologyDataUtils.buildGetTopologyDetailsInput(
- TopologyUtils.T0_FULL_MULTILAYER);
- TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils);
+ TapiStringConstants.T0_FULL_MULTILAYER);
+ TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils, tapiLink);
ListenableFuture<RpcResult<GetTopologyDetailsOutput>> result = tapiTopoImpl.getTopologyDetails(input);
result.addListener(new Runnable() {
@Override
.flatMap(node -> node.getOwnedNodeEdgePoint().values().stream()
.filter(nep -> nep.getName().containsKey(new NameKey("eNodeEdgePoint_N"))))
.count();
- assertEquals("SPDR-SA1-XPDR1+DSR (mux) should have a single external network nep", 1, enb3);
+ assertEquals("SPDR-SA1-XPDR1+DSR (mux) should have 4 external network nep", 4, enb3);
long nb4 = topology.getNode().values().stream()
.filter(node -> node.getLayerProtocolName().contains(LayerProtocolName.DSR))
.filter(node -> node.getName().values().stream().findFirst().get().getValue().equals("SPDR-SA1-XPDR2+DSR"))
// Links in openroadm topology which include Roadm-to-Roadm and Xpdr-to-Roadm (ortopo / 2)
// + transitional links -> 1 per network port of Xpdr + OTN links / 2
- assertEquals("Link list size should be 27", 27, topology.getLink().size());
+ assertEquals("Link list size should be 25", 25, topology.getLink().size());
Uuid topoUuid = new Uuid(UUID.nameUUIDFromBytes("T0 - Full Multi-layer topology".getBytes()).toString());
assertEquals("incorrect topology uuid", topoUuid, topology.getUuid());
assertEquals("topology name should be T0 - Full Multi-layer topology",
// Xpdr-to-Roadm
long nbOmsLinks1 = topology.getLink().values().stream()
.filter(l -> l.getName().containsKey(new NameKey("XPDR-RDM link name"))).count();
- long nbOtnLinks = topology.getLink().values().stream()
- .filter(l -> l.getName().containsKey(new NameKey("otn link name"))).count();
// 1 transitional link per NETWORK port
assertEquals("Link list should contain 16 transitional links", 16, nbTransititionalLinks);
// 1 OMS per ROADM-to-ROADM link + Existing XPDR-tp-ROADM link in openroadm topology
assertEquals("Link list should contain 9 OMS links", 9, nbOmsLinks + nbOmsLinks1);
- // Should we consider OTN links as links or connections??
- assertEquals("Link list should contain 2 OTN links", 2, nbOtnLinks);
-
- Uuid node1Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+DSR".getBytes(StandardCharsets.UTF_8))
- .toString());
- Uuid node2Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+DSR".getBytes(StandardCharsets.UTF_8))
- .toString());
- Uuid node3Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+OTSi".getBytes(StandardCharsets.UTF_8))
- .toString());
- Uuid node4Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+OTSi".getBytes(StandardCharsets.UTF_8))
- .toString());
- Uuid tp1Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+eODU+XPDR1-NETWORK1"
- .getBytes(StandardCharsets.UTF_8)).toString());
- Uuid tp2Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+eODU+XPDR1-NETWORK1"
- .getBytes(StandardCharsets.UTF_8)).toString());
- Uuid tp3Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SA1-XPDR1+iOTSi+XPDR1-NETWORK1"
- .getBytes(StandardCharsets.UTF_8)).toString());
- Uuid tp4Uuid = new Uuid(UUID.nameUUIDFromBytes("SPDR-SC1-XPDR1+iOTSi+XPDR1-NETWORK1"
- .getBytes(StandardCharsets.UTF_8)).toString());
- Uuid link1Uuid =
- new Uuid(UUID.nameUUIDFromBytes("ODTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1"
- .getBytes(StandardCharsets.UTF_8)).toString());
- Uuid link2Uuid =
- new Uuid(UUID.nameUUIDFromBytes("OTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1"
- .getBytes(StandardCharsets.UTF_8)).toString());
-
- List<Link> links = topology.nonnullLink().values().stream()
- .filter(l -> l.getName().containsKey(new NameKey("otn link name")))
- .sorted((l1, l2) -> l1.getUuid().getValue().compareTo(l2.getUuid().getValue()))
- .collect(Collectors.toList());
- checkOtnLink(links.get(0), topoUuid, node1Uuid, node2Uuid, tp1Uuid, tp2Uuid, link1Uuid,
- "ODTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1");
- checkOtnLink(links.get(1), topoUuid, node3Uuid, node4Uuid, tp3Uuid, tp4Uuid, link2Uuid,
- "OTU4-SPDR-SA1-XPDR1-XPDR1-NETWORK1toSPDR-SC1-XPDR1-XPDR1-NETWORK1");
}
@Test
public void getNodeAndNepsDetailsWhenSuccessful()
throws ExecutionException, InterruptedException {
GetTopologyDetailsInput input = TapiTopologyDataUtils.buildGetTopologyDetailsInput(
- TopologyUtils.T0_FULL_MULTILAYER);
- TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils);
+ TapiStringConstants.T0_FULL_MULTILAYER);
+ TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils, tapiLink);
ListenableFuture<RpcResult<GetTopologyDetailsOutput>> result = tapiTopoImpl.getTopologyDetails(input);
result.addListener(new Runnable() {
@Override
for (Node node:topology.getNode().values()) {
String nodeName = node.getName().values().stream().findFirst().get().getValue();
GetNodeDetailsInput input1 = TapiTopologyDataUtils.buildGetNodeDetailsInput(
- TopologyUtils.T0_FULL_MULTILAYER, nodeName);
+ TapiStringConstants.T0_FULL_MULTILAYER, nodeName);
ListenableFuture<RpcResult<GetNodeDetailsOutput>> result1 = tapiTopoImpl.getNodeDetails(input1);
result.addListener(new Runnable() {
@Override
for (OwnedNodeEdgePoint onep:node1.getOwnedNodeEdgePoint().values()) {
String onepName = onep.getName().values().stream().findFirst().get().getValue();
GetNodeEdgePointDetailsInput input2 = TapiTopologyDataUtils.buildGetNodeEdgePointDetailsInput(
- TopologyUtils.T0_FULL_MULTILAYER, nodeName, onepName);
+ TapiStringConstants.T0_FULL_MULTILAYER, nodeName, onepName);
ListenableFuture<RpcResult<GetNodeEdgePointDetailsOutput>> result2
= tapiTopoImpl.getNodeEdgePointDetails(input2);
result.addListener(new Runnable() {
RpcResult<GetNodeEdgePointDetailsOutput> rpcResult2 = result2.get();
org.opendaylight.yang.gen.v1
.urn.onf.otcc.yang.tapi.topology.rev181210.get.node.edge.point.details.output.NodeEdgePoint
- onep1 = rpcResult2.getResult().getNodeEdgePoint();
+ onep1 = rpcResult2.getResult().getNodeEdgePoint();
assertNotNull("Node Edge Point should not be null", onep1);
}
}
public void getLinkDetailsWhenSuccessful()
throws ExecutionException, InterruptedException {
GetTopologyDetailsInput input = TapiTopologyDataUtils.buildGetTopologyDetailsInput(
- TopologyUtils.T0_FULL_MULTILAYER);
- TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils);
+ TapiStringConstants.T0_FULL_MULTILAYER);
+ TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils, tapiLink);
ListenableFuture<RpcResult<GetTopologyDetailsOutput>> result = tapiTopoImpl.getTopologyDetails(input);
result.addListener(new Runnable() {
@Override
for (Link link:topology.getLink().values()) {
String linkName = link.getName().values().stream().findFirst().get().getValue();
GetLinkDetailsInput input1 = TapiTopologyDataUtils.buildGetLinkDetailsInput(
- TopologyUtils.T0_FULL_MULTILAYER, linkName);
+ TapiStringConstants.T0_FULL_MULTILAYER, linkName);
ListenableFuture<RpcResult<GetLinkDetailsOutput>> result1 = tapiTopoImpl.getLinkDetails(input1);
result.addListener(new Runnable() {
@Override
public void getSipDetailsWhenSuccessful()
throws ExecutionException, InterruptedException {
GetServiceInterfacePointListInput input = TapiTopologyDataUtils.buildServiceInterfacePointListInput();
- TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils);
+ TapiTopologyImpl tapiTopoImpl = new TapiTopologyImpl(getDataBroker(), tapiContext, topologyUtils, tapiLink);
ListenableFuture<RpcResult<GetServiceInterfacePointListOutput>> result = tapiTopoImpl
.getServiceInterfacePointList(input);
result.addListener(new Runnable() {
RpcResult<GetServiceInterfacePointDetailsOutput> rpcResult1 = result1.get();
org.opendaylight.yang.gen.v1
.urn.onf.otcc.yang.tapi.common.rev181210.get.service._interface.point.details.output.Sip sip1
- = rpcResult1.getResult().getSip();
+ = rpcResult1.getResult().getSip();
assertNotNull("Sip should not be null", sip1);
}
}
assertEquals("bad name for the link", linkName, link.getName().get(new NameKey("otn link name")).getValue());
assertEquals("bad uuid for link", linkUuid, link.getUuid());
assertEquals("Available capacity unit should be MBPS",
- CapacityUnit.MBPS, link.getAvailableCapacity().getTotalSize().getUnit());
+ CapacityUnit.GBPS, link.getAvailableCapacity().getTotalSize().getUnit());
String prefix = linkName.split("-")[0];
if ("OTU4".equals(prefix)) {
assertEquals("Available capacity -total size value should be 0",
Uint64.valueOf(100), link.getTotalPotentialCapacity().getTotalSize().getValue());
if ("OTU4".equals(prefix)) {
assertEquals("otn link should be between 2 nodes of protocol layers PHOTONIC_MEDIA",
- LayerProtocolName.PHOTONICMEDIA.getName(), link.getLayerProtocolName().get(0).getName());
+ LayerProtocolName.PHOTONICMEDIA.getName(),
+ link.getLayerProtocolName().stream().findFirst().get().getName());
} else if ("ODTU4".equals(prefix)) {
assertEquals("otn link should be between 2 nodes of protocol layers ODU",
- LayerProtocolName.ODU.getName(), link.getLayerProtocolName().get(0).getName());
+ LayerProtocolName.ODU.getName(),
+ link.getLayerProtocolName().stream().findFirst().get().getName());
}
assertEquals("transitional link should be BIDIRECTIONAL",
ForwardingDirection.BIDIRECTIONAL, link.getDirection());