[SDFAB-831] Add UPF meters to UpfProgrammable APIs
UPF meters can be of type session or application.
Also, add meter index to sessions and terminations UPF entities.
Change-Id: I8babfca35341a21b234d8eb6edaa2e1c02684210
(cherry picked from commit b25299afaf824a8d352297224e5b9a1285901d00)
diff --git a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammable.java b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammable.java
index 052084e..2fd718c 100644
--- a/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammable.java
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammable.java
@@ -19,6 +19,7 @@
import com.google.common.annotations.Beta;
import org.onosproject.net.driver.HandlerBehaviour;
import org.onosproject.net.flow.FlowRule;
+import org.onosproject.net.meter.Meter;
/**
* Provides means to update the device forwarding state to implement a 3GPP
@@ -43,4 +44,12 @@
* @return True if the given flow rule has been created by this UPF behaviour, False otherwise.
*/
boolean fromThisUpf(FlowRule flowRule);
+
+ /**
+ * Checks if the given meter has been generated by this UPF behaviour.
+ *
+ * @param meter the meter to check
+ * @return True if the given meter has been created by this UPF behaviour, False otherwise.
+ */
+ boolean fromThisUpf(Meter meter);
}