From d24625fbd1775a45ed0f262faf62cb6452aabb45 Mon Sep 17 00:00:00 2001 From: Sagar Srivastav Date: Sun, 20 Nov 2016 20:06:02 -0800 Subject: 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 --- .../jvpp/io/fd/vpp/jvpp/ioamtrace/test/IoamTraceApiTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'plugins/ioam-plugin/ioam/jvpp') 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..."); } } -- cgit 1.2.3-korg