change roadm app to support EDFA/ROADM/OPS devices, add OPS PowerConfig/LambdaQuery behaviour

Change-Id: Ieb6de727e766fdeb63740c0704f83fd11e44b935
diff --git a/apps/roadm/src/main/java/org/onosproject/roadm/RoadmService.java b/apps/roadm/src/main/java/org/onosproject/roadm/RoadmService.java
index 19334ae..792484f 100644
--- a/apps/roadm/src/main/java/org/onosproject/roadm/RoadmService.java
+++ b/apps/roadm/src/main/java/org/onosproject/roadm/RoadmService.java
@@ -43,6 +43,23 @@
 public interface RoadmService {
 
     /**
+     * Attempts to manually switch working path to the one specified by {@code index}.
+     *
+     * @param deviceId DeviceId of the device to configure
+     * @param index working path index to switch to
+     */
+    void setProtectionSwitchWorkingPath(DeviceId deviceId, int index);
+
+    /**
+     * Retrieves protection switch specified port's service status.
+     *
+     * @param deviceId DeviceId of the device to configure
+     * @param portNumber the port
+     * @return port service status
+     */
+    String getProtectionSwitchPortState(DeviceId deviceId, PortNumber portNumber);
+
+    /**
      * Set target power for a port if the port has configurable target power.
      *
      * @param deviceId DeviceId of the device to configure
@@ -69,8 +86,7 @@
      * @param ochSignal channel to set attenuation for
      * @param attenuation attenuation value to set to
      */
-    void setAttenuation(DeviceId deviceId, PortNumber portNumber, OchSignal ochSignal,
-                        long attenuation);
+    void setAttenuation(DeviceId deviceId, PortNumber portNumber, OchSignal ochSignal, long attenuation);
 
     /**
      * Returns the attenuation of a connection.
@@ -99,8 +115,7 @@
      * @param ochSignal channel to search for
      * @return channel power if found, null otherwise
      */
-    Long getCurrentChannelPower(DeviceId deviceId, PortNumber portNumber,
-                                OchSignal ochSignal);
+    Long getCurrentChannelPower(DeviceId deviceId, PortNumber portNumber, OchSignal ochSignal);
 
     /**
      * Returns the channels supported by a port.
@@ -117,7 +132,7 @@
      * output port).
      *
      * Connections are represented as flows with an input port, output port, and
-     * channel. Implementation of attenuation is up to the vendor.
+     * channel.
      *
      * @param deviceId DeviceId of the device to create this connection for
      * @param priority priority of the flow
@@ -129,8 +144,7 @@
      * @return FlowId of the FlowRule representing the connection
      */
     FlowId createConnection(DeviceId deviceId, int priority, boolean isPermanent,
-                          int timeout, PortNumber inPort, PortNumber outPort,
-                          OchSignal ochSignal);
+                          int timeout, PortNumber inPort, PortNumber outPort, OchSignal ochSignal);
 
     /**
      * Creates a new internal connection on a device with attenuation. This does
@@ -269,8 +283,7 @@
      * @param ochSignal channel to check
      * @return range if found, null otherwise
      */
-    Range<Long> attenuationRange(DeviceId deviceId, PortNumber portNumber,
-                                 OchSignal ochSignal);
+    Range<Long> attenuationRange(DeviceId deviceId, PortNumber portNumber, OchSignal ochSignal);
 
     /**
      * Returns the expected input power range for an input port.