Fix a few compilation warnings
[transportpce.git] / common / src / main / java / org / opendaylight / transportpce / common / openroadminterfaces / OpenRoadmInterfaces.java
index fa45f1913f300518d0272300c9a4186febdd680c..8d4cd73bd3af30df7ef23482380b3959d471140a 100644 (file)
@@ -10,9 +10,6 @@ package org.opendaylight.transportpce.common.openroadminterfaces;
 
 import java.util.Optional;
 
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.Interface;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev170206.interfaces.grp.InterfaceBuilder;
-
 public interface OpenRoadmInterfaces {
 
     /**
@@ -26,13 +23,13 @@ public interface OpenRoadmInterfaces {
      * </p>
      *
      * @param nodeId node ID
-     *
      * @param ifBuilder Builder object containing the data to post.
+     * @param <T> generic
      *
      * @throws OpenRoadmInterfaceException OpenRoadm Interface Exception
      *
      */
-    void postInterface(String nodeId, InterfaceBuilder ifBuilder) throws OpenRoadmInterfaceException;
+    <T> void postInterface(String nodeId, T ifBuilder) throws OpenRoadmInterfaceException;
 
     /**
      * This methods does an edit-config operation on the openROADM device in
@@ -57,12 +54,14 @@ public interface OpenRoadmInterfaces {
      *
      * @param interfaceName
      *            Name of the interface
+     * @param <T>
+     *            generic
      *
      * @return Optional of Interface from datastore
      *
      * @throws OpenRoadmInterfaceException OpenRoadm Interface Exception
      */
-    Optional<Interface> getInterface(String nodeId, String interfaceName) throws OpenRoadmInterfaceException;
+    <T> Optional<T> getInterface(String nodeId, String interfaceName) throws OpenRoadmInterfaceException;
 
     /**
      * This methods does an edit-config operation on the openROADM device in
@@ -82,4 +81,29 @@ public interface OpenRoadmInterfaces {
      */
     void deleteInterface(String nodeId, String interfaceName) throws OpenRoadmInterfaceException;
 
+    /**
+     * This methods does an edit-config operation on the openROADM device in
+     * order to create the OTN given interface.
+     *
+     * @param <T> specified type of object
+     * @param nodeId node ID
+     * @param ifBuilder Builder object containing the data to post
+     * @throws OpenRoadmInterfaceException OpenRoadm Interface Exception
+     */
+    <T> void postOTNInterface(String nodeId, T ifBuilder) throws OpenRoadmInterfaceException;
+
+    /**
+     * This methods does an edit-config operation on the openROADM device in
+     * order to manages the equipment-state status of the circuit pack on which
+     * OTN interfaces are created.
+     *
+     * @param nodeId node ID
+     * @param circuitPackName Circtuit-Pack name
+     * @param activate activate or not
+     *
+     * @throws OpenRoadmInterfaceException OpenRoadm Interface Exception
+     */
+    void postOTNEquipmentState(String nodeId, String circuitPackName, boolean activate)
+        throws OpenRoadmInterfaceException;
+
 }