Fix bugs to make renderer functional tests running
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / openroadminterfaces / OpenRoadmInterfacesImpl221.java
index f4aec0ab25490402f0571fa27c531455c3bd78ae..b1e2a3387c4c9cba8236a89d52084cfceb0bee48 100755 (executable)
@@ -181,7 +181,6 @@ public class OpenRoadmInterfacesImpl221 {
 
     public void postEquipmentState(String nodeId, String circuitPackName, boolean activate)
         throws OpenRoadmInterfaceException {
-
         InstanceIdentifier<CircuitPacks> circuitPackIID = InstanceIdentifier.create(OrgOpenroadmDevice.class).child(
             CircuitPacks.class, new CircuitPacksKey(circuitPackName));
         Optional<CircuitPacks> cpOpt = this.deviceTransactionManager.getDataFromDevice(nodeId,
@@ -197,12 +196,13 @@ public class OpenRoadmInterfacesImpl221 {
         CircuitPacksBuilder cpBldr = new CircuitPacksBuilder(cp);
         boolean change = false;
         if (activate) {
-            if (cpBldr.getEquipmentState() != null && !cpBldr.getEquipmentState().equals(States.NotReservedInuse)) {
+            if (cpBldr.getEquipmentState() != null && !cpBldr.getEquipmentState().getName()
+                .equals(States.NotReservedInuse)) {
                 cpBldr.setEquipmentState(States.NotReservedInuse);
                 change = true;
             }
-        } else if (
-            (cpBldr.getEquipmentState() != null && !cpBldr.getEquipmentState().equals(States.NotReservedAvailable))) {
+        } else if ((cpBldr.getEquipmentState() != null && !cpBldr.getEquipmentState().getName()
+            .equals(States.NotReservedAvailable))) {
             cpBldr.setEquipmentState(States.NotReservedAvailable);
             change = true;
         }