Adapt TransportPCE code to Chlorine
[transportpce.git] / networkmodel / src / test / java / org / opendaylight / transportpce / networkmodel / util / OpenRoadmOtnTopologyTest.java
index e6c209a407df109fef7a0e9b871eaff013219785..144aef0d48a27a0bf614c3c75c3f78a5e65b08de 100644 (file)
@@ -35,35 +35,35 @@ 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.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.opendaylight.transportpce.networkutils.rev220630.OtnLinkType;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.Network;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.Mapping;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.MappingBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.mapping.MappingKey;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.Nodes;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.NodesBuilder;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220316.network.nodes.NodeInfoBuilder;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Node1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.TerminationPoint1;
 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;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev200327.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingList;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev200529.OpenroadmLinkType;
-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;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.networks.network.node.SwitchingPools;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.If100GE;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.If100GEODU4;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.If10GE;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev200327.If10GEODU2;
-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.rev210511.OtnLinkType;
-import org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.TerminationPoint1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev201211.xpdr.odu.switching.pools.OduSwitchingPools;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.topology.types.rev201211.xpdr.odu.switching.pools.odu.switching.pools.NonBlockingList;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev211210.OpenroadmLinkType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev211210.OpenroadmNodeType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev211210.OpenroadmTpType;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.network.types.rev211210.xpdr.tp.supported.interfaces.SupportedInterfaceCapability;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU2;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU2e;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.common.types.rev210924.ODU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.Link1;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.networks.network.node.SwitchingPools;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.If100GE;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.If100GEODU4;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.If10GE;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.If10GEODU2;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.If10GEODU2e;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.IfOCH;
+import org.opendaylight.yang.gen.v1.http.org.openroadm.port.types.rev201211.IfOCHOTU4ODU4;
 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;
@@ -87,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", "2021-04-26", "network"));
+                    QName.create("http://org/opendaylight/transportpce/portmapping", "2022-03-16", "network"));
             for (Nodes nodes : portMapping.nonnullNodes().values()) {
                 if (nodes.getNodeId().equals("XPDR-A1")) {
                     this.portMappingTpdr = nodes;
@@ -135,7 +135,7 @@ public class OpenRoadmOtnTopologyTest {
         assertEquals(
             Uint16.valueOf(1),
             node.augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.Node1.class)
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.Node1.class)
                 .getXpdrAttributes()
                 .getXpdrNumber());
         //tests list of TPs
@@ -149,69 +149,72 @@ public class OpenRoadmOtnTopologyTest {
         assertEquals("XPDR1-CLIENT1", tps.get(0).getTpId().getValue());
         assertEquals(
             "XPDR1-NETWORK1",
-            tps.get(0).augmentation(TerminationPoint1.class).getAssociatedConnectionMapPort());
+            tps.get(0)
+                    .augmentation(TerminationPoint1.class)
+                    .getAssociatedConnectionMapTp()
+                    .iterator()
+                    .next()
+                    .getValue());
         assertEquals(
             "only If100GE interface capabitily expected",
             1,
             tps.get(0).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getTpSupportedInterfaces()
                 .getSupportedInterfaceCapability()
                 .size());
         assertEquals(
-            If100GE.class.getName(),
+            If100GE.VALUE,
             tps.get(0).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getTpSupportedInterfaces().nonnullSupportedInterfaceCapability()
                 .values().stream().findFirst()
-                .get().getIfCapType().getName());
+                .get().getIfCapType());
         assertEquals(
             "first TP must be of type client",
             OpenroadmTpType.XPONDERCLIENT,
-            tps.get(0).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529
-                        .TerminationPoint1.class)
-                .getTpType());
+            tps.get(0).augmentation(TerminationPoint1.class).getTpType());
         //tests network tp
         assertEquals("XPDR1-NETWORK1", tps.get(2).getTpId().getValue());
         assertEquals(
             "XPDR1-CLIENT1",
-            tps.get(2).augmentation(TerminationPoint1.class).getAssociatedConnectionMapPort());
+            tps.get(2).augmentation(TerminationPoint1.class)
+                    .getAssociatedConnectionMapTp()
+                    .iterator()
+                    .next()
+                    .getValue());
         assertEquals(
             "only IfOCH interface capabitily expected",
             1,
             tps.get(2).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getTpSupportedInterfaces()
                 .getSupportedInterfaceCapability()
                 .size());
         assertEquals(
-            IfOCH.class.getName(),
+            IfOCH.VALUE,
             tps.get(2).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getTpSupportedInterfaces()
                 .getSupportedInterfaceCapability()
                 .values().stream().findFirst()
                 .get()
-                .getIfCapType()
-                .getName());
+                .getIfCapType());
         assertNull(
             "the rate should be null",
             tps.get(2).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getRate());
         assertEquals(
             "third TP must be of type network",
             OpenroadmTpType.XPONDERNETWORK,
-            tps.get(2).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.TerminationPoint1.class)
-                .getTpType());
+            tps.get(2).augmentation(TerminationPoint1.class).getTpType());
     }
 
     @Test
@@ -262,20 +265,20 @@ public class OpenRoadmOtnTopologyTest {
         assertEquals(
             OpenroadmLinkType.OTNLINK,
             sortedLinks.get(0).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
                 .getLinkType());
         assertEquals(
             "opposite link must be present",
             "OTU4-SPDRZ-XPDR1-XPDR1-NETWORK1toSPDRA-XPDR1-XPDR1-NETWORK1",
             sortedLinks.get(0).augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
                 .getOppositeLink()
                 .getValue());
         assertEquals(
             "otn link type should be OTU4",
             OtnLinkType.OTU4,
             sortedLinks.get(0).augmentation(
-                    org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.Link1.class)
+                    org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev220630.Link1.class)
                 .getOtnLinkType());
     }
 
@@ -335,22 +338,22 @@ public class OpenRoadmOtnTopologyTest {
             OpenroadmLinkType.OTNLINK,
             sortedLinks.get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529.Link1.class)
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
                 .getLinkType());
         assertEquals(
             "opposite link must be present",
             "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)
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev211210.Link1.class)
                 .getOppositeLink()
                 .getValue());
         assertEquals(
             "otn link type should be ODTU4",
             OtnLinkType.ODTU4,
             sortedLinks.get(0)
-                .augmentation(
-                    org.opendaylight.yang.gen.v1.http.transportpce.topology.rev210511.Link1.class)
+                .augmentation(org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.networkutils.rev220630
+                        .Link1.class)
                 .getOtnLinkType());
 
         assertEquals("list of TPs should contain 2 updated TPs", 2, topoShard.getTps().size());
@@ -358,7 +361,7 @@ public class OpenRoadmOtnTopologyTest {
             "after ODU4 creation, its termination point should contain a TsPool list",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool());
@@ -367,7 +370,7 @@ public class OpenRoadmOtnTopologyTest {
             80,
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool()
@@ -376,7 +379,7 @@ public class OpenRoadmOtnTopologyTest {
             "after ODU4 creation, its termination point should contain a TpnPool list",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool().values().stream().findFirst()
@@ -387,7 +390,7 @@ public class OpenRoadmOtnTopologyTest {
             80,
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool().values().stream().findFirst()
@@ -443,7 +446,7 @@ public class OpenRoadmOtnTopologyTest {
             "after ODU4 deletion, its termination points should not contain any TsPool list",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool());
@@ -451,7 +454,7 @@ public class OpenRoadmOtnTopologyTest {
             "after ODU4 deletion, its termination points should not contain any TpnPool list",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool());
@@ -502,7 +505,7 @@ public class OpenRoadmOtnTopologyTest {
             72,
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool()
@@ -511,7 +514,7 @@ public class OpenRoadmOtnTopologyTest {
             "trib slot 1-8 should no longer be present in Trib slot list",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool(),
@@ -520,7 +523,7 @@ public class OpenRoadmOtnTopologyTest {
             "trib slot 9 should always be present in trib slot list",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool(),
@@ -530,7 +533,7 @@ public class OpenRoadmOtnTopologyTest {
             79,
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool().values().stream().findFirst()
@@ -541,7 +544,7 @@ public class OpenRoadmOtnTopologyTest {
             "trib port 1 should no longer be present",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool().values().stream().findFirst()
@@ -572,7 +575,7 @@ public class OpenRoadmOtnTopologyTest {
             80,
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool()
@@ -581,7 +584,7 @@ public class OpenRoadmOtnTopologyTest {
             "after 10G deletion, trib slot list should contain items 1-8",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool(),
@@ -591,7 +594,7 @@ public class OpenRoadmOtnTopologyTest {
                 80,
                 topoShard.getTps().get(0)
                     .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                     .getXpdrTpPortConnectionAttributes()
                     .getOdtuTpnPool().values().stream().findFirst()
@@ -602,7 +605,7 @@ public class OpenRoadmOtnTopologyTest {
             "after 10G deletion, trib port list should contain items 1",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool().values().stream().findFirst()
@@ -640,7 +643,7 @@ public class OpenRoadmOtnTopologyTest {
             79,
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool()
@@ -649,7 +652,7 @@ public class OpenRoadmOtnTopologyTest {
             "trib slot 1 should no longer be present in Trib slot list",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool(),
@@ -658,7 +661,7 @@ public class OpenRoadmOtnTopologyTest {
             "trib slot 2 should always be present in Trib slot list",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes().getTsPool(),
             hasItem(Uint16.valueOf(2)));
@@ -667,7 +670,7 @@ public class OpenRoadmOtnTopologyTest {
             79,
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool().values().stream().findFirst()
@@ -678,7 +681,7 @@ public class OpenRoadmOtnTopologyTest {
             "trib port 1 should no longer be present in Trib port list",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool().values().stream().findFirst()
@@ -712,7 +715,7 @@ public class OpenRoadmOtnTopologyTest {
             80,
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool()
@@ -721,7 +724,7 @@ public class OpenRoadmOtnTopologyTest {
             "after 1G deletion, trib slot list should contain items 1 and 2",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                     .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getTsPool(),
@@ -731,7 +734,7 @@ public class OpenRoadmOtnTopologyTest {
             80,
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool().values().stream().findFirst()
@@ -742,7 +745,7 @@ public class OpenRoadmOtnTopologyTest {
             "after 1G deletion, trib port list should contain items 1",
             topoShard.getTps().get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getOdtuTpnPool().values().stream().findFirst()
@@ -786,7 +789,7 @@ public class OpenRoadmOtnTopologyTest {
 
     private void checkSpdrNode(Node node) {
         Uint16 xpdrNb = node
-            .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.Node1.class)
+            .augmentation(org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.Node1.class)
             .getXpdrAttributes().getXpdrNumber();
         assertEquals("SPDR-SA1-XPDR" + xpdrNb, node.getNodeId().getValue());
         if (xpdrNb.equals(Uint16.valueOf(1))) {
@@ -808,7 +811,7 @@ public class OpenRoadmOtnTopologyTest {
         checkSpdrSwitchingPools(
             xpdrNb,
             node.augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529.Node1.class)
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210.Node1.class)
                 .getSwitchingPools());
         List<TerminationPoint> tpList = node.augmentation(
                 org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.topology.rev180226.Node1.class)
@@ -887,10 +890,10 @@ public class OpenRoadmOtnTopologyTest {
         LOG.info("tpList = {}", tpList);
         assertEquals(
             "only IfOCHOTU4ODU4 interface capabitily expected",
-            IfOCHOTU4ODU4.class,
+            IfOCHOTU4ODU4.VALUE,
             tpList.get(4)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getTpSupportedInterfaces()
                 .getSupportedInterfaceCapability().values().stream().findFirst()
@@ -898,10 +901,10 @@ public class OpenRoadmOtnTopologyTest {
                 .getIfCapType());
         assertEquals(
             "the rate should be ODU4",
-            ODU4.class,
+            ODU4.VALUE,
             tpList.get(4)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                         .TerminationPoint1.class)
                 .getXpdrTpPortConnectionAttributes()
                 .getRate());
@@ -927,7 +930,7 @@ public class OpenRoadmOtnTopologyTest {
                 2,
                 tpList.get(1)
                     .augmentation(
-                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
                     .getTpSupportedInterfaces()
                     .getSupportedInterfaceCapability().values().size());
@@ -936,60 +939,52 @@ public class OpenRoadmOtnTopologyTest {
                 3,
                 tpList.get(2)
                     .augmentation(
-                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
                     .getTpSupportedInterfaces()
                     .getSupportedInterfaceCapability().values().size());
             List<SupportedInterfaceCapability> sicListClient1 = tpList.get(0)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                     .TerminationPoint1.class)
                 .getTpSupportedInterfaces()
                 .getSupportedInterfaceCapability().values().stream().collect(Collectors.toList());
             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))));
+                    either(containsString(String.valueOf(If10GEODU2e.VALUE)))
+                    .or(containsString(String.valueOf(If10GEODU2.VALUE))));
             }
             List<SupportedInterfaceCapability> sicListClient3 = tpList.get(3)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                     .TerminationPoint1.class)
                 .getTpSupportedInterfaces()
                 .getSupportedInterfaceCapability().values().stream().collect(Collectors.toList());
             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))));
+                    either(containsString(String.valueOf(If10GEODU2e.VALUE)))
+                    .or(containsString(String.valueOf(If10GEODU2.VALUE)))
+                    .or(containsString(String.valueOf(If10GE.VALUE))));
             }
             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
+                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
                     .getXpdrTpPortConnectionAttributes()
                     .getRate()),
-                either(containsString(String.valueOf(ODU2e.class)))
-                .or(containsString(String.valueOf(ODU2.class))));
+                either(containsString(String.valueOf(ODU2e.VALUE)))
+                .or(containsString(String.valueOf(ODU2.VALUE))));
             assertEquals(
                 "TP should be of type client",
                 OpenroadmTpType.XPONDERCLIENT,
-                tpList.get(2)
-                    .augmentation(
-                        org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529
-                            .TerminationPoint1.class)
-                    .getTpType());
+                tpList.get(2).augmentation(TerminationPoint1.class).getTpType());
             assertEquals(
                 "TP should be of type network",
                 OpenroadmTpType.XPONDERNETWORK,
-                tpList.get(4)
-                    .augmentation(
-                        org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529
-                            .TerminationPoint1.class)
-                    .getTpType());
+                tpList.get(4).augmentation(TerminationPoint1.class).getTpType());
         } else if (xpdrNb.equals(Uint16.valueOf(2))) {
             assertEquals("should contain 8 TPs", 8, tpList.size());
             assertEquals("XPDR2-CLIENT1", tpList.get(0).getTpId().getValue());
@@ -998,10 +993,10 @@ public class OpenRoadmOtnTopologyTest {
             assertEquals("XPDR2-NETWORK2", tpList.get(5).getTpId().getValue());
             assertEquals(
                 "only IfOCHOTU4ODU4 interface capabitily expected",
-                IfOCHOTU4ODU4.class,
+                IfOCHOTU4ODU4.VALUE,
                 tpList.get(5)
                     .augmentation(
-                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                                 .TerminationPoint1.class)
                     .getTpSupportedInterfaces()
                     .getSupportedInterfaceCapability().values().stream().findFirst()
@@ -1012,36 +1007,28 @@ public class OpenRoadmOtnTopologyTest {
                 2,
                 tpList.get(2)
                     .augmentation(
-                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                        org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                             .TerminationPoint1.class)
                     .getTpSupportedInterfaces()
                     .getSupportedInterfaceCapability().values().size());
             List<SupportedInterfaceCapability> sicListClient3 = tpList.get(2)
                 .augmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev200529
+                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.network.topology.rev211210
                     .TerminationPoint1.class)
                 .getTpSupportedInterfaces()
                 .getSupportedInterfaceCapability().values().stream().collect(Collectors.toList());
             for (SupportedInterfaceCapability supportedInterfaceCapability : sicListClient3) {
                 assertThat("tp should have 2 if-cap-type: if-100GE-ODU4, if-100GE",
                     String.valueOf(supportedInterfaceCapability.getIfCapType()),
-                    either(containsString(String.valueOf(If100GEODU4.class)))
-                    .or(containsString(String.valueOf(If100GE.class))));
+                    either(containsString(String.valueOf(If100GEODU4.VALUE)))
+                    .or(containsString(String.valueOf(If100GE.VALUE))));
             }
             assertEquals(
                 "TP should be of type client", OpenroadmTpType.XPONDERCLIENT,
-                tpList.get(2)
-                    .augmentation(
-                        org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529
-                            .TerminationPoint1.class)
-                    .getTpType());
+                tpList.get(2).augmentation(TerminationPoint1.class).getTpType());
             assertEquals(
                 "TP should be of type network", OpenroadmTpType.XPONDERNETWORK,
-                tpList.get(6)
-                    .augmentation(
-                        org.opendaylight.yang.gen.v1.http.org.openroadm.common.network.rev200529
-                            .TerminationPoint1.class)
-                    .getTpType());
+                tpList.get(6).augmentation(TerminationPoint1.class).getTpType());
         }
     }
 }