Fix bug in setting rate of tp in network module
[transportpce.git] / networkmodel / src / test / java / org / opendaylight / transportpce / networkmodel / util / OpenRoadmOtnTopologyTest.java
index df155cebfc60c23e271c5a1f6e529fb20e97d19e..e6c209a407df109fef7a0e9b871eaff013219785 100644 (file)
@@ -35,13 +35,13 @@ import org.junit.Test;
 import org.opendaylight.transportpce.networkmodel.dto.TopologyShard;
 import org.opendaylight.transportpce.networkmodel.util.test.JsonUtil;
 import org.opendaylight.transportpce.networkmodel.util.test.NetworkmodelTestUtil;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.Network;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.network.Nodes;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.network.NodesBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.network.nodes.Mapping;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.network.nodes.MappingBuilder;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.network.nodes.MappingKey;
-import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev201012.network.nodes.NodeInfoBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.Network;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.mapping.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.mapping.MappingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.mapping.MappingKey;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.network.NodesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev210426.network.nodes.NodeInfoBuilder;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Node1;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.device.types.rev191129.NodeTypes;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.OduSwitchingPools;
@@ -50,6 +50,7 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.O
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmNodeType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmTpType;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.xpdr.tp.supported.interfaces.SupportedInterfaceCapability;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU2;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU2e;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev200327.ODU4;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.Link1;
@@ -61,8 +62,8 @@ import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.If10
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.If10GEODU2e;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.IfOCH;
 import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.IfOCHOTU4ODU4;
-import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.OtnLinkType;
-import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.TerminationPoint1;
+import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.OtnLinkType;
+import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.TerminationPoint1;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.Node;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.networks.network.node.SupportingNode;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.TpId;
@@ -86,7 +87,7 @@ public class OpenRoadmOtnTopologyTest {
         try (Reader reader = new FileReader("src/test/resources/portMapping.json", StandardCharsets.UTF_8);
                 JsonReader portMappingReader = new JsonReader(reader)) {
             Network portMapping = (Network) JsonUtil.getInstance().getDataObjectFromJson(portMappingReader,
-                    QName.create("http://org/opendaylight/transportpce/portmapping", "2020-10-12", "network"));
+                    QName.create("http://org/opendaylight/transportpce/portmapping", "2021-04-26", "network"));
             for (Nodes nodes : portMapping.nonnullNodes().values()) {
                 if (nodes.getNodeId().equals("XPDR-A1")) {
                     this.portMappingTpdr = nodes;
@@ -274,7 +275,7 @@ public class OpenRoadmOtnTopologyTest {
             "otn link type should be OTU4",
             OtnLinkType.OTU4,
             sortedLinks.get(0).augmentation(
-                    org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.Link1.class)
+                    org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.Link1.class)
                 .getOtnLinkType());
     }
 
@@ -294,8 +295,8 @@ public class OpenRoadmOtnTopologyTest {
     public void createOtnLinksForODU4NormalTest() {
         TopologyShard topoShard = OpenRoadmOtnTopology
             .createOtnLinks(
-                NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, 100000),
-                NetworkmodelTestUtil.createTpList(false));
+                NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(100000)),
+                NetworkmodelTestUtil.createTpList(false), OtnLinkType.ODTU4);
         assertNotNull("TopologyShard should never be null", topoShard);
         assertNull("list of nodes should be null", topoShard.getNodes());
         List<Link> sortedLinks = topoShard.getLinks().stream()
@@ -313,10 +314,10 @@ public class OpenRoadmOtnTopologyTest {
             sortedLinks.get(2).augmentation(Link1.class).getUsedBandwidth());
 
         assertEquals(
-            "ODU4-SPDRA-XPDR1-XPDR1-NETWORK1toSPDRZ-XPDR1-XPDR1-NETWORK1",
+            "ODTU4-SPDRA-XPDR1-XPDR1-NETWORK1toSPDRZ-XPDR1-XPDR1-NETWORK1",
             sortedLinks.get(0).getLinkId().getValue());
         assertEquals(
-            "ODU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
+            "ODTU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
             sortedLinks.get(1).getLinkId().getValue());
         assertEquals("SPDRA-XPDR1", sortedLinks.get(0).getSource().getSourceNode().getValue());
         assertEquals("SPDRZ-XPDR1", sortedLinks.get(0).getDestination().getDestNode().getValue());
@@ -338,7 +339,7 @@ public class OpenRoadmOtnTopologyTest {
                 .getLinkType());
         assertEquals(
             "opposite link must be present",
-            "ODU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
+            "ODTU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
             sortedLinks.get(0)
                 .augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
@@ -349,7 +350,7 @@ public class OpenRoadmOtnTopologyTest {
             OtnLinkType.ODTU4,
             sortedLinks.get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.transportpce.topology.rev201019.Link1.class)
+                    org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.Link1.class)
                 .getOtnLinkType());
 
         assertEquals("list of TPs should contain 2 updated TPs", 2, topoShard.getTps().size());
@@ -397,13 +398,14 @@ public class OpenRoadmOtnTopologyTest {
 
     @Test
     public void createOtnLinksForODU4WhenOTU4HaveBadBWParamsTest() {
-        List<Link> otu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, 100000);
+        List<Link> otu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(100000));
         List<Link> otu4LinksWithBadBWParam = new ArrayList<>();
         for (Link link : otu4Links) {
             otu4LinksWithBadBWParam.add(new LinkBuilder(link).removeAugmentation(Link1.class).build());
         }
         TopologyShard topoShard =
-            OpenRoadmOtnTopology.createOtnLinks(otu4LinksWithBadBWParam, NetworkmodelTestUtil.createTpList(false));
+            OpenRoadmOtnTopology.createOtnLinks(otu4LinksWithBadBWParam, NetworkmodelTestUtil.createTpList(false),
+                OtnLinkType.OTU4);
         assertNotNull("TopologyShard should never be null", topoShard);
         assertNull("list of nodes should be null", topoShard.getNodes());
         assertNull("list of links should be null", topoShard.getLinks());
@@ -412,8 +414,8 @@ public class OpenRoadmOtnTopologyTest {
         otu4LinksWithBadBWParam.clear();
         topoShard =
             OpenRoadmOtnTopology.createOtnLinks(
-                    NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, 99000),
-                    NetworkmodelTestUtil.createTpList(false));
+                    NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(99000)),
+                    NetworkmodelTestUtil.createTpList(false), OtnLinkType.OTU4);
         assertNull("list of nodes should be null", topoShard.getNodes());
         assertNull("list of links should be null", topoShard.getLinks());
         assertNull("list of tps should be null", topoShard.getTps());
@@ -423,8 +425,8 @@ public class OpenRoadmOtnTopologyTest {
     public void deleteOtnLinksForODU4NormalTest() {
         TopologyShard topoShard =
             OpenRoadmOtnTopology.deleteOtnLinks(
-                    NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, 0),
-                    NetworkmodelTestUtil.createTpList(true));
+                    NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(0)),
+                    NetworkmodelTestUtil.createTpList(true), OtnLinkType.OTU4);
         assertNotNull("TopologyShard should never be null", topoShard);
         assertEquals("list of links should contain 2 links", 2, topoShard.getLinks().size());
         assertEquals(
@@ -457,13 +459,14 @@ public class OpenRoadmOtnTopologyTest {
 
     @Test
     public void deleteOtnLinksForODU4WhenOTU4HaveBadBWParamsTest() {
-        List<Link> otu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, 0);
+        List<Link> otu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.OTU4, Uint32.valueOf(0));
         List<Link> otu4LinksWithBadBWParam = new ArrayList<>();
         for (Link link : otu4Links) {
             otu4LinksWithBadBWParam.add(new LinkBuilder(link).removeAugmentation(Link1.class).build());
         }
         TopologyShard topoShard =
-            OpenRoadmOtnTopology.deleteOtnLinks(otu4LinksWithBadBWParam, NetworkmodelTestUtil.createTpList(true));
+            OpenRoadmOtnTopology.deleteOtnLinks(otu4LinksWithBadBWParam, NetworkmodelTestUtil.createTpList(true),
+                OtnLinkType.OTU4);
         assertNotNull("TopologyShard should never be null", topoShard);
         assertNull("list of nodes should be null", topoShard.getNodes());
         assertNull("list of links should be null", topoShard.getLinks());
@@ -475,16 +478,16 @@ public class OpenRoadmOtnTopologyTest {
         // tests update for 10G creation
         TopologyShard topoShard =
             OpenRoadmOtnTopology.updateOtnLinks(
-                    NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, 100000),
+                    NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(100000)),
                     NetworkmodelTestUtil.createTpList(true),
-                    "10G", (short)1, (short)1, false);
+                    Uint32.valueOf(10), (short)1, (short)1, (short)8, false);
         assertNotNull("TopologyShard should never be null", topoShard);
         assertNull("list of nodes should be null", topoShard.getNodes());
         List<Link> sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         assertEquals("list of links should contain 2 links", 2, sortedLinks.size());
-        assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODU4-"));
+        assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
             "after 10G creation, available BW of supported ODU4 should be 90000",
             Uint32.valueOf(90000),
@@ -548,13 +551,13 @@ public class OpenRoadmOtnTopologyTest {
 
         // tests update for 10G deletion
         sortedLinks.clear();
-        topoShard = OpenRoadmOtnTopology.updateOtnLinks(topoShard.getLinks(), topoShard.getTps(), "10G", (short)1,
-            (short)1, true);
+        topoShard = OpenRoadmOtnTopology.updateOtnLinks(topoShard.getLinks(), topoShard.getTps(), Uint32.valueOf(10),
+            (short)1, (short)1, (short)8, true);
         sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         assertEquals("list of links should contain 2 links", 2, sortedLinks.size());
-        assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODU4-"));
+        assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
             "after 10G deletion, available BW of supported ODU4 should be 100 000",
             Uint32.valueOf(100000),
@@ -613,16 +616,16 @@ public class OpenRoadmOtnTopologyTest {
         // tests update for 1G creation
         TopologyShard topoShard =
             OpenRoadmOtnTopology.updateOtnLinks(
-                    NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, 100000),
+                    NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(100000)),
                     NetworkmodelTestUtil.createTpList(true),
-                    "1G", (short)1, (short)1, false);
+                    Uint32.valueOf(1), (short)1, (short)1, (short)1, false);
         assertNotNull("TopologyShard should never be null", topoShard);
         assertNull("list of nodes should be null", topoShard.getNodes());
         List<Link> sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         assertEquals("list of links should contain 2 links", 2, sortedLinks.size());
-        assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODU4-"));
+        assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
             "after 1G creation, available BW of supported ODU4 should be 99000",
             Uint32.valueOf(99000),
@@ -689,12 +692,12 @@ public class OpenRoadmOtnTopologyTest {
             OpenRoadmOtnTopology.updateOtnLinks(
                     topoShard.getLinks(),
                     topoShard.getTps(),
-                    "1G", (short)1, (short)1, true);
+                    Uint32.valueOf(1), (short)1, (short)1, (short)1, true);
         sortedLinks = topoShard.getLinks().stream()
             .sorted((l1, l2) -> l1.getLinkId().getValue().compareTo(l2.getLinkId().getValue()))
             .collect(Collectors.toList());
         assertEquals("list of links should contain 2 links", 2, sortedLinks.size());
-        assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODU4-"));
+        assertTrue(sortedLinks.get(0).getLinkId().getValue().startsWith("ODTU4-"));
         assertEquals(
             "after 1G deletion, available BW of supported ODU4 should be 100 000",
             Uint32.valueOf(100000),
@@ -750,7 +753,7 @@ public class OpenRoadmOtnTopologyTest {
 
     @Test
     public void updateOtnLinksForODU4WhenBWParamsNotPresentTest() {
-        List<Link> odu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, 100000);
+        List<Link> odu4Links = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(100000));
         List<Link> odu4LinksWithBadBWParam = new ArrayList<>();
         for (Link link : odu4Links) {
             odu4LinksWithBadBWParam.add(new LinkBuilder(link).removeAugmentation(Link1.class).build());
@@ -759,7 +762,7 @@ public class OpenRoadmOtnTopologyTest {
             OpenRoadmOtnTopology.updateOtnLinks(
                     odu4LinksWithBadBWParam,
                     NetworkmodelTestUtil.createTpList(true),
-                    "1G", (short)1, (short)1, false);
+                    Uint32.valueOf(1), (short)1, (short)1, (short)10, false);
         assertNotNull("TopologyShard should never be null", topoShard);
         assertNull("list of nodes should be null", topoShard.getNodes());
         assertNull("list of links should be null", topoShard.getLinks());
@@ -768,12 +771,13 @@ public class OpenRoadmOtnTopologyTest {
 
     @Test
     public void updateOtnLinksForODU4WhenAvailBWNotSufficientTest() {
-        List<Link> odu4LinksWithBadBWParam = NetworkmodelTestUtil.createSuppOTNLinks(OtnLinkType.ODTU4, 8000);
+        List<Link> odu4LinksWithBadBWParam = NetworkmodelTestUtil
+            .createSuppOTNLinks(OtnLinkType.ODTU4, Uint32.valueOf(8000));
         TopologyShard topoShard =
             OpenRoadmOtnTopology.updateOtnLinks(
                     odu4LinksWithBadBWParam,
                     NetworkmodelTestUtil.createTpList(true),
-                    "10G", (short)1, (short)1, false);
+                    Uint32.valueOf(10), (short)1, (short)1, (short)10, false);
         assertNotNull("TopologyShard should never be null", topoShard);
         assertNull("list of nodes should be null", topoShard.getNodes());
         assertNull("list of links should be null", topoShard.getLinks());
@@ -880,6 +884,7 @@ public class OpenRoadmOtnTopologyTest {
     }
 
     private void checkSpdrTpList(Uint16 xpdrNb, List<TerminationPoint> tpList) {
+        LOG.info("tpList = {}", tpList);
         assertEquals(
             "only IfOCHOTU4ODU4 interface capabitily expected",
             IfOCHOTU4ODU4.class,
@@ -911,7 +916,7 @@ public class OpenRoadmOtnTopologyTest {
         assertEquals(
             "XPDR" + xpdrNb + "-NETWORK1",
             tpList.get(4).getSupportingTerminationPoint().values().stream().findFirst()
-            .get().getTpRef().toString());
+            .get().getTpRef().getValue());
         if (xpdrNb.equals(Uint16.valueOf(1))) {
             assertEquals("should contain 5 TPs", 5, tpList.size());
             assertEquals("XPDR1-CLIENT1", tpList.get(0).getTpId().getValue());
@@ -927,48 +932,48 @@ public class OpenRoadmOtnTopologyTest {
                     .getTpSupportedInterfaces()
                     .getSupportedInterfaceCapability().values().size());
             assertEquals(
-                "supported interface capability of tp-id XPDR1-CLIENT1 should contain 3 if-cap-type",
+                "supported interface capability of tp-id XPDR1-CLIENT3 should contain 3 if-cap-type",
                 3,
-                tpList.get(0)
+                tpList.get(2)
                     .augmentation(
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
                             .TerminationPoint1.class)
                     .getTpSupportedInterfaces()
                     .getSupportedInterfaceCapability().values().size());
-            List<SupportedInterfaceCapability> sicListClient3 = tpList.get(2)
+            List<SupportedInterfaceCapability> sicListClient1 = tpList.get(0)
                 .augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
                     .TerminationPoint1.class)
                 .getTpSupportedInterfaces()
                 .getSupportedInterfaceCapability().values().stream().collect(Collectors.toList());
-            for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient3) {
+            for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient1) {
                 assertThat("tp should have 2 if-cap-type: if-10GE-ODU2e, if-10GE-ODU2",
                     String.valueOf(supportedInterfaceCapability.getIfCapType()),
                     either(containsString(String.valueOf(If10GEODU2e.class)))
                     .or(containsString(String.valueOf(If10GEODU2.class))));
             }
-            List<SupportedInterfaceCapability> sicListClient1 = tpList.get(0)
+            List<SupportedInterfaceCapability> sicListClient3 = tpList.get(3)
                 .augmentation(
                     org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
                     .TerminationPoint1.class)
                 .getTpSupportedInterfaces()
                 .getSupportedInterfaceCapability().values().stream().collect(Collectors.toList());
-            for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient1) {
+            for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient3) {
                 assertThat("tp should have 3 if-cap-type: if-10GE-ODU2e, if-10GE-ODU2, if-10GE",
                     String.valueOf(supportedInterfaceCapability.getIfCapType()),
                     either(containsString(String.valueOf(If10GEODU2e.class)))
                     .or(containsString(String.valueOf(If10GEODU2.class)))
                     .or(containsString(String.valueOf(If10GE.class))));
             }
-            assertEquals(
-                "the rate should be ODU2e",
-                ODU2e.class,
-                tpList.get(2)
+            assertThat("the rate should be ODU2 or ODU2e",
+                String.valueOf(tpList.get(2)
                     .augmentation(
                         org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
                             .TerminationPoint1.class)
                     .getXpdrTpPortConnectionAttributes()
-                    .getRate());
+                    .getRate()),
+                either(containsString(String.valueOf(ODU2e.class)))
+                .or(containsString(String.valueOf(ODU2.class))));
             assertEquals(
                 "TP should be of type client",
                 OpenroadmTpType.XPONDERCLIENT,