Dedicated SW Interface Event

Change-Id: I06a10a4291e61aec3f1396d2514ed6fe3901897a
Signed-off-by: Neale Ranns <neale.ranns@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeNotificationExample.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeNotificationExample.java
index b8b108b..308dad9 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeNotificationExample.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeNotificationExample.java
@@ -36,7 +36,7 @@
             System.out.println("Successfully connected to VPP");
 
             final AutoCloseable notificationListenerReg =
-                jvppCallbackFacade.getNotificationRegistry().registerSwInterfaceSetFlagsNotificationCallback(
+                jvppCallbackFacade.getNotificationRegistry().registerSwInterfaceEventNotificationCallback(
                     NotificationUtils::printNotification
                 );
 
diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackNotificationApiExample.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackNotificationApiExample.java
index 6ee2de3..7d56b7e 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackNotificationApiExample.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackNotificationApiExample.java
@@ -26,10 +26,9 @@
 import io.fd.vpp.jvpp.JVppRegistryImpl;
 import io.fd.vpp.jvpp.VppCallbackException;
 import io.fd.vpp.jvpp.core.JVppCoreImpl;
-import io.fd.vpp.jvpp.core.callback.SwInterfaceSetFlagsCallback;
-import io.fd.vpp.jvpp.core.callback.SwInterfaceSetFlagsNotificationCallback;
+import io.fd.vpp.jvpp.core.callback.SwInterfaceEventNotificationCallback;
 import io.fd.vpp.jvpp.core.callback.WantInterfaceEventsCallback;
-import io.fd.vpp.jvpp.core.dto.SwInterfaceSetFlagsNotification;
+import io.fd.vpp.jvpp.core.dto.SwInterfaceEventNotification;
 import io.fd.vpp.jvpp.core.dto.SwInterfaceSetFlagsReply;
 import io.fd.vpp.jvpp.core.dto.WantInterfaceEventsReply;
 
@@ -65,12 +64,12 @@
         testCallbackApi();
     }
 
-    private static class TestCallback implements SwInterfaceSetFlagsNotificationCallback,
-        WantInterfaceEventsCallback, SwInterfaceSetFlagsCallback {
+    private static class TestCallback implements SwInterfaceEventNotificationCallback,
+        WantInterfaceEventsCallback {
 
         @Override
-        public void onSwInterfaceSetFlagsNotification(
-            final SwInterfaceSetFlagsNotification msg) {
+        public void onSwInterfaceEventNotification(
+            final SwInterfaceEventNotification msg) {
             printNotification(msg);
         }
 
@@ -80,11 +79,6 @@
         }
 
         @Override
-        public void onSwInterfaceSetFlagsReply(final SwInterfaceSetFlagsReply swInterfaceSetFlagsReply) {
-            System.out.println("Interface flags set successfully");
-        }
-
-        @Override
         public void onError(VppCallbackException ex) {
             System.out.printf("Received onError exception in getNodeIndexCallback: call=%s, reply=%d, context=%d%n",
                 ex.getMethodName(), ex.getErrorCode(), ex.getCtxId());
diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiNotificationExample.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiNotificationExample.java
index f445dcc..7460401 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiNotificationExample.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiNotificationExample.java
@@ -33,7 +33,7 @@
              final FutureJVppCoreFacade jvppFacade = new FutureJVppCoreFacade(registry, new JVppCoreImpl());
              final AutoCloseable notificationListenerReg =
                  jvppFacade.getNotificationRegistry()
-                     .registerSwInterfaceSetFlagsNotificationCallback(NotificationUtils::printNotification)) {
+                     .registerSwInterfaceEventNotificationCallback(NotificationUtils::printNotification)) {
             System.out.println("Successfully connected to VPP");
             jvppFacade.wantInterfaceEvents(getEnableInterfaceNotificationsReq()).toCompletableFuture().get();
             System.out.println("Interface events started");
diff --git a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/NotificationUtils.java b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/NotificationUtils.java
index 7791caf..d3f9dd2 100644
--- a/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/NotificationUtils.java
+++ b/src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/NotificationUtils.java
@@ -18,14 +18,14 @@
 
 import java.io.PrintStream;
 import io.fd.vpp.jvpp.core.dto.SwInterfaceSetFlags;
-import io.fd.vpp.jvpp.core.dto.SwInterfaceSetFlagsNotification;
+import io.fd.vpp.jvpp.core.dto.SwInterfaceEventNotification;
 import io.fd.vpp.jvpp.core.dto.WantInterfaceEvents;
 
 final class NotificationUtils {
 
     private NotificationUtils() {}
 
-    static PrintStream printNotification(final SwInterfaceSetFlagsNotification msg) {
+    static PrintStream printNotification(final SwInterfaceEventNotification msg) {
         return System.out.printf("Received interface notification: ifc: %s%n", msg);
     }
 
@@ -33,7 +33,6 @@
         final SwInterfaceSetFlags swInterfaceSetFlags = new SwInterfaceSetFlags();
         swInterfaceSetFlags.swIfIndex = 0;
         swInterfaceSetFlags.adminUpDown = 1;
-        swInterfaceSetFlags.deleted = 0;
         return swInterfaceSetFlags;
     }
 
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/util.py b/src/vpp-api/java/jvpp/gen/jvppgen/util.py
index 947fc31..4239441 100644
--- a/src/vpp-api/java/jvpp/gen/jvppgen/util.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/util.py
@@ -161,7 +161,6 @@
 #
 # FIXME no convention in the naming of events (notifications) in vpe.api
 notifications_message_suffixes = ("event", "counters")
-notification_messages_reused = ["sw_interface_set_flags"]
 
 # messages that must be ignored. These messages are INSUFFICIENTLY marked as disabled in vpe.api
 # FIXME
@@ -170,7 +169,7 @@
 
 def is_notification(name):
     """ Returns true if the structure is a notification regardless of its no other use """
-    return is_just_notification(name) or name.lower() in notification_messages_reused
+    return is_just_notification(name)
 
 
 def is_just_notification(name):