[ONOS-7947] implement PowerConfig methods in Cassini equipment.
This patch is based on patch#21952, which shows optical details in ONOS GUI.
The emulator could be pulled via "docker pull onosproject/oc-cassini:latest".
Currently, there are still some questions unresolved:
1. The power values defined in PowerConfig.java are long, but the values defined in yang should be float.
2. In PowerConfig.java, I need to rename method **currentPower** to **currentOutputPower**.
3. In PowerConfig.java, the **default** in method definition is used to avoid the effect on all implemented class.
This condition should be changed finally.
Change-Id: If5a3ec77d9a906718b80531afa67bc67388bca4f
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/PowerConfig.java b/core/api/src/main/java/org/onosproject/net/behaviour/PowerConfig.java
index d171c17..92bfba6 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/PowerConfig.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/PowerConfig.java
@@ -55,7 +55,7 @@
void setTargetPower(PortNumber port, T component, long power);
/**
- * Get the current power on the component.
+ * Get the current output power on the component.
*
* @param port the port
* @param component the port component
@@ -64,6 +64,16 @@
Optional<Long> currentPower(PortNumber port, T component);
/**
+ * Get the current input power on the component.
+ * @param port the port
+ * @param component the port component
+ * @return power in .01 dBm
+ */
+ default Optional<Long> currentInputPower(PortNumber port, T component) {
+ return Optional.empty();
+ }
+
+ /**
* Get the acceptable target power range for setTargetPower,
* as optical components have different configurable output power ranges.
*