diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-07-20 09:48:14 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-09-13 09:44:50 +0200 |
commit | 6509e0875c394fa122e56bbaa93b2f11205d1d67 (patch) | |
tree | 4eb29d0f6cef0ce31bae4f25f3a99f25fa64f253 /v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java | |
parent | 81d2be3f014af6fd453b0be73999c38f7e2f734f (diff) |
HONEYCOMB-118: extend classifer model to support node names.
* configuration write is supported (updates local cache
with relative node mapping)
* operational read is supported only for nodes with existing
relative node mapping
* ACL support (using vpp-classfier or ietf-acl model)
is not affected by the patch (tables/sessions for access controll
refer to neighbour nodes as packet-handling-action, not vpp-node-name)
Change-Id: Ice0c846803cc7e8960c3571fd2a13ed46ba53702
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java')
-rw-r--r-- | v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java index d29d213ea..a1bdf6aa9 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java @@ -19,10 +19,10 @@ package io.fd.honeycomb.translate.v3po.interfaces; import static com.google.common.base.Preconditions.checkNotNull; import static io.fd.honeycomb.translate.v3po.util.TranslateUtils.booleanToByte; -import io.fd.honeycomb.translate.v3po.util.WriteTimeoutException; import io.fd.honeycomb.translate.MappingContext; -import io.fd.honeycomb.translate.v3po.util.NamingContext; import io.fd.honeycomb.translate.v3po.util.TranslateUtils; +import io.fd.honeycomb.translate.v3po.util.WriteTimeoutException; +import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager; import java.util.concurrent.CompletionStage; import javax.annotation.Nonnegative; import javax.annotation.Nonnull; @@ -40,7 +40,7 @@ interface AclWriter { default void inputAclSetInterface(@Nonnull final FutureJVppCore futureJVppCore, final boolean isAdd, @Nonnull final InstanceIdentifier<?> id, @Nonnull final AclBaseAttributes acl, - @Nonnegative final int ifIndex, @Nonnull final NamingContext classifyTableContext, + @Nonnegative final int ifIndex, @Nonnull final VppClassifierContextManager classifyTableContext, @Nonnull final MappingContext mappingContext) throws VppBaseCallException, WriteTimeoutException { final InputAclSetInterface request = new InputAclSetInterface(); @@ -53,17 +53,17 @@ interface AclWriter { final L2Acl l2Acl = acl.getL2Acl(); if (l2Acl != null) { final String tableName = checkNotNull(l2Acl.getClassifyTable(), "L2 classify table is null"); - request.l2TableIndex = classifyTableContext.getIndex(tableName, mappingContext); + request.l2TableIndex = classifyTableContext.getTableIndex(tableName, mappingContext); } final Ip4Acl ip4Acl = acl.getIp4Acl(); if (ip4Acl != null) { final String tableName = checkNotNull(ip4Acl.getClassifyTable(), "IPv4 classify table is null"); - request.ip4TableIndex = classifyTableContext.getIndex(tableName, mappingContext); + request.ip4TableIndex = classifyTableContext.getTableIndex(tableName, mappingContext); } final Ip6Acl ip6Acl = acl.getIp6Acl(); if (ip6Acl != null) { final String tableName = checkNotNull(ip6Acl.getClassifyTable(), "IPv6 classify table is null"); - request.ip6TableIndex = classifyTableContext.getIndex(tableName, mappingContext); + request.ip6TableIndex = classifyTableContext.getTableIndex(tableName, mappingContext); } final CompletionStage<InputAclSetInterfaceReply> inputAclSetInterfaceReplyCompletionStage = |