summaryrefslogtreecommitdiffstats
path: root/plugins/ioam-plugin/ioam/jvpp
diff options
context:
space:
mode:
authorSagar Srivastav <sagsriva@cisco.com>2016-11-20 20:06:02 -0800
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-09 20:12:18 +0000
commitd24625fbd1775a45ed0f262faf62cb6452aabb45 (patch)
treeb6c8da0c823f1d2406127d3b610bdb1b0ec24b30 /plugins/ioam-plugin/ioam/jvpp
parent0ebe8d7d76964e07aec89ded7abe9216b90e2f59 (diff)
ioam:trace plugin - trace profile read API
Addition of read API to ioam-trace plugin which returns the current trace profile configured Change-Id: Ibe2baf0f60fb2a74ddc140747b53128aba975aaa Signed-off-by: Sagar Srivastav <sagsriva@cisco.com>
Diffstat (limited to 'plugins/ioam-plugin/ioam/jvpp')
-rw-r--r--plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioamtrace/test/IoamTraceApiTest.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioamtrace/test/IoamTraceApiTest.java b/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioamtrace/test/IoamTraceApiTest.java
index fa5c7ba4dc5..bc8c1c3a51c 100644
--- a/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioamtrace/test/IoamTraceApiTest.java
+++ b/plugins/ioam-plugin/ioam/jvpp/io/fd/vpp/jvpp/ioamtrace/test/IoamTraceApiTest.java
@@ -20,10 +20,13 @@ import io.fd.vpp.jvpp.JVpp;
import io.fd.vpp.jvpp.JVppRegistry;
import io.fd.vpp.jvpp.JVppRegistryImpl;
import io.fd.vpp.jvpp.VppCallbackException;
+import io.fd.vpp.jvpp.ioamtrace.future.FutureJVppIoamtraceFacade;
import io.fd.vpp.jvpp.ioamtrace.JVppIoamtraceImpl;
import io.fd.vpp.jvpp.ioamtrace.callback.TraceProfileAddCallback;
import io.fd.vpp.jvpp.ioamtrace.dto.TraceProfileAdd;
import io.fd.vpp.jvpp.ioamtrace.dto.TraceProfileAddReply;
+import io.fd.vpp.jvpp.ioamtrace.dto.TraceProfileShowConfig;
+import io.fd.vpp.jvpp.ioamtrace.dto.TraceProfileShowConfigReply;
public class IoamTraceApiTest {
@@ -50,7 +53,7 @@ public class IoamTraceApiTest {
System.out.println("Testing Java API for ioam trace plugin");
try (final JVppRegistry registry = new JVppRegistryImpl("ioamTraceApiTest");
final JVpp jvpp = new JVppIoamtraceImpl()) {
- registry.register(jvpp, new IoamTraceTestCallback());
+ FutureJVppIoamtraceFacade ioamtraceJvpp = new FutureJVppIoamtraceFacade(registry,jvpp);
System.out.println("Sending ioam trace profile add request...");
TraceProfileAdd request = new TraceProfileAdd();
@@ -64,6 +67,10 @@ public class IoamTraceApiTest {
Thread.sleep(1000);
+ TraceProfileShowConfig showRequest = new TraceProfileShowConfig();
+ TraceProfileShowConfigReply reply = ioamtraceJvpp.traceProfileShowConfig(showRequest).toCompletableFuture().get();
+ System.out.printf("TraceProfileShowConfig result = "+ reply.toString());
+
System.out.println("Disconnecting...");
}
}