Update connection and interface name
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / openroadminterfaces / OpenRoadmInterfacesImpl221.java
index 3c8c95a1ab09429de9d2a80afc8ec82d8f106b7a..a0c0d56655f8f687f6ef6b7c5f048d041357628b 100755 (executable)
@@ -113,7 +113,7 @@ public class OpenRoadmInterfacesImpl221 {
                     odu.setMaintTestsignal(maintSignalBuilder.build());
                 }
                 oduBuilder.setOdu(odu.build());
-                ifBuilder.addAugmentation(Interface1.class, oduBuilder.build());
+                ifBuilder.addAugmentation(oduBuilder.build());
             } else if (ifBuilder.getType() == OtnOtu.class) {
                 org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev181019.Interface1Builder
                     otuBuilder =
@@ -128,9 +128,7 @@ public class OpenRoadmInterfacesImpl221 {
                     otu.setMaintLoopback(maintLoopBackBuilder.build());
                 }
                 otuBuilder.setOtu(otu.build());
-                ifBuilder.addAugmentation(
-                    org.opendaylight.yang.gen.v1.http.org.openroadm.otn.otu.interfaces.rev181019.Interface1.class,
-                    otuBuilder.build());
+                ifBuilder.addAugmentation(otuBuilder.build());
             }
             ifBuilder.setAdministrativeState(AdminStates.OutOfService);
             // post interface with updated admin state
@@ -199,12 +197,12 @@ public class OpenRoadmInterfacesImpl221 {
         boolean change = false;
         if (activate) {
             if (cpBldr.getEquipmentState() != null
-                    && !cpBldr.getEquipmentState().getName().equals(States.NotReservedInuse)) {
+                    && !States.NotReservedInuse.equals(cpBldr.getEquipmentState())) {
                 cpBldr.setEquipmentState(States.NotReservedInuse);
                 change = true;
             }
         } else if ((cpBldr.getEquipmentState() != null
-                && !cpBldr.getEquipmentState().getName().equals(States.NotReservedAvailable))) {
+                && !States.NotReservedAvailable.equals(cpBldr.getEquipmentState()))) {
             cpBldr.setEquipmentState(States.NotReservedAvailable);
             change = true;
         }