Fix bugs to make renderer functional tests running
[transportpce.git] / renderer / src / main / java / org / opendaylight / transportpce / renderer / openroadminterface / OpenRoadmInterface221.java
index 232b75518d6c74ad0f862d3f7c879cef03e6282d..a540f6e62c91bd95eb18fc0982e0054ca86aa710 100644 (file)
@@ -14,6 +14,7 @@ import java.util.List;
 import java.util.Optional;
 
 import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
+import org.opendaylight.transportpce.common.StringConstants;
 import org.opendaylight.transportpce.common.Timeouts;
 import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
 import org.opendaylight.transportpce.common.fixedflex.FixedFlexInterface;
@@ -98,6 +99,10 @@ public class OpenRoadmInterface221 {
 
         // Post interface on the device
         openRoadmInterfaces.postInterface(nodeId, ethInterfaceBldr);
+
+        // Post the equipment-state change on the device circuit-pack
+        openRoadmInterfaces.postEquipmentState(nodeId, portMap.getSupportingCircuitPackName(), true);
+
         return ethInterfaceBldr.getName();
     }
 
@@ -229,6 +234,12 @@ public class OpenRoadmInterface221 {
 
         // Post interface on the device
         openRoadmInterfaces.postInterface(nodeId, ochInterfaceBldr);
+
+        // Post the equipment-state change on the device circuit-pack if xpdr node
+        if (portMap.getLogicalConnectionPoint().contains(StringConstants.NETWORK_TOKEN)) {
+            this.openRoadmInterfaces.postEquipmentState(nodeId, portMap.getSupportingCircuitPackName(), true);
+        }
+
         return ochInterfaceBldr.getName();
     }