aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/vpp-api/java')
-rw-r--r--src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackJVppFacadeNotificationExample.java2
-rw-r--r--src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/CallbackNotificationApiExample.java18
-rw-r--r--src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/FutureApiNotificationExample.java2
-rw-r--r--src/vpp-api/java/jvpp-core/io/fd/vpp/jvpp/core/examples/NotificationUtils.java5
-rw-r--r--src/vpp-api/java/jvpp/gen/jvppgen/util.py3
5 files changed, 11 insertions, 19 deletions
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 b8b108b602e..308dad9faa6 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 @@ public class CallbackJVppFacadeNotificationExample {
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 6ee2de31bc8..7d56b7ea292 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.JVppRegistry;
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 @@ public class CallbackNotificationApiExample {
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 @@ public class CallbackNotificationApiExample {
}
@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 f445dcc87e4..7460401e36e 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 @@ public class FutureApiNotificationExample {
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 7791cafe2a7..d3f9dd2c732 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 @@ package io.fd.vpp.jvpp.core.examples;
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 class NotificationUtils {
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 947fc31d48a..42394419737 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 @@ unconventional_naming_rep_req = {
#
# 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 @@ ignored_messages = []
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):