diff options
author | Pavel Kotucek <pkotucek@cisco.com> | 2017-09-07 08:17:31 +0200 |
---|---|---|
committer | Ole Trøan <otroan@employees.org> | 2017-09-12 08:38:25 +0000 |
commit | c29940c58de3e44c0c1dd5c4eda5e0268d963b14 (patch) | |
tree | 4d4f84747757439422aa61ab7c2edaf00246ba54 /src/vpp-api/java/jvpp-acl | |
parent | 6b3a8eff76f27f2b919887582006b2290d12ecfa (diff) |
ACL-plugin add "replace" semantics for adding a new MacIP acl
Change-Id: Ia5c869b2d8b8ad012b9e89fb6720c9c32d9ee065
Signed-off-by: Pavel Kotucek <pkotucek@cisco.com>
Diffstat (limited to 'src/vpp-api/java/jvpp-acl')
-rw-r--r-- | src/vpp-api/java/jvpp-acl/io/fd/vpp/jvpp/acl/examples/AclTestRequests.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vpp-api/java/jvpp-acl/io/fd/vpp/jvpp/acl/examples/AclTestRequests.java b/src/vpp-api/java/jvpp-acl/io/fd/vpp/jvpp/acl/examples/AclTestRequests.java index 1fa4187e064..149ea46ea0a 100644 --- a/src/vpp-api/java/jvpp-acl/io/fd/vpp/jvpp/acl/examples/AclTestRequests.java +++ b/src/vpp-api/java/jvpp-acl/io/fd/vpp/jvpp/acl/examples/AclTestRequests.java @@ -32,6 +32,8 @@ import io.fd.vpp.jvpp.acl.dto.AclInterfaceSetAclList; import io.fd.vpp.jvpp.acl.dto.AclInterfaceSetAclListReply; import io.fd.vpp.jvpp.acl.dto.MacipAclAdd; import io.fd.vpp.jvpp.acl.dto.MacipAclAddReply; +import io.fd.vpp.jvpp.acl.dto.MacipAclAddReplace; +import io.fd.vpp.jvpp.acl.dto.MacipAclAddReplaceReply; import io.fd.vpp.jvpp.acl.dto.MacipAclDel; import io.fd.vpp.jvpp.acl.dto.MacipAclDelReply; import io.fd.vpp.jvpp.acl.dto.MacipAclDetailsReplyDump; @@ -56,6 +58,13 @@ class AclTestRequests { System.out.printf("MacipAclAdd send result = %s%n", reply); } + static void sendMacIpAddReplaceRequest(final FutureJVppAclFacade jvpp) throws InterruptedException, ExecutionException { + final MacipAclAddReplace request = createMacIpAddReplaceRequest(); + System.out.printf("Sending MacipAclAddReplace request %s%n", request.toString()); + final MacipAclAddReplaceReply reply = jvpp.macipAclAddReplace(createMacIpAddReplaceRequest()).toCompletableFuture().get(); + System.out.printf("MacipAclAddReplace send result = %s%n", reply); + } + static void sendMacIpDelRequest(final FutureJVppAclFacade jvpp) throws InterruptedException, ExecutionException { final MacipAclDel request = new MacipAclDel(); request.aclIndex = 0; @@ -130,6 +139,15 @@ class AclTestRequests { return request; } + private static MacipAclAddReplace createMacIpAddReplaceRequest() { + MacipAclAddReplace request = new MacipAclAddReplace(); + + request.count = 2; + request.aclIndex = 0; + request.r = createMacipRules(); + return request; + } + private static AclAddReplace createAclAddRequest() { AclAddReplace request = new AclAddReplace(); |