Adapt renderer to manage 100GE service on Switch
[transportpce.git] / renderer / src / main / java / org / opendaylight / transportpce / renderer / openroadminterface / OpenRoadmInterfaceFactory.java
index 9e49ca1d13fa679dc32190604e8d9f7899528475..35c031975270a64990c053719c670badc604340f 100644 (file)
@@ -168,6 +168,31 @@ public class OpenRoadmInterfaceFactory {
         }
     }
 
+    /**
+     * This methods creates an ODU interface on the given termination point.
+     *
+     * @param nodeId                 node ID
+     * @param logicalConnPoint       logical connection point
+     * @param isNetworkPort          to distinguish a CTP from a TTP
+     * @param supportingInterface supporting OTU4 or 100GE interface
+     * @return Name of the interface if successful, otherwise return null.
+     * @throws OpenRoadmInterfaceException OpenRoadm interface exception
+     */
+
+    public String createOpenRoadmOdu4HOInterface(String nodeId, String logicalConnPoint, boolean isNetworkPort,
+            String supportingInterface) throws OpenRoadmInterfaceException {
+        switch (mappingUtils.getOpenRoadmVersion(nodeId)) {
+            case StringConstants.OPENROADM_DEVICE_VERSION_1_2_1:
+                LOG.error(OTN_FUNTIONS_ARE_NOT_SUPPORTED_BY_OPENROADM_MODELS_1_2_1_MSG);
+                return null;
+            case StringConstants.OPENROADM_DEVICE_VERSION_2_2_1:
+                return openRoadmInterface221.createOpenRoadmOdu4HOInterface(nodeId, logicalConnPoint, isNetworkPort,
+                    supportingInterface);
+            default:
+                return null;
+        }
+    }
+
     /**
      * This methods creates an OTU interface on the given termination point.
      *