[SDFAB-187] Add UpfProgrammable interface in ONOS core

Change-Id: Icef23a14015bb0ebe33ebe57eadecaaadc8eebd3
(cherry picked from commit 5e66f98ebb5541ba7c7fbe2b7b7cb5f7beb8d885)
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
new file mode 100644
index 0000000..6dcce30
--- /dev/null
+++ b/core/api/src/main/java/org/onosproject/net/behaviour/upf/UpfProgrammable.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2021-present Open Networking Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.net.behaviour.upf;
+
+import com.google.common.annotations.Beta;
+import org.onosproject.net.driver.HandlerBehaviour;
+
+
+/**
+ * Provides means to update the device forwarding state to implement a 3GPP
+ * User Plane Function. An implementation of this API should not write state
+ * directly to the device, but instead, always rely on core ONOS subsystems
+ * (e.g., FlowRuleService, GroupService, etc).
+ */
+@Beta
+public interface UpfProgrammable extends HandlerBehaviour, UpfDevice {
+    /**
+     * Apps are expected to call this method as the first one when they are ready
+     * to install PDRs and FARs.
+     *
+     * @return True if initialized, false otherwise.
+     */
+    boolean init();
+}