From 6509e0875c394fa122e56bbaa93b2f11205d1d67 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Wed, 20 Jul 2016 09:48:14 +0200 Subject: 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 --- .../io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/interfaces/AclWriter.java') 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 inputAclSetInterfaceReplyCompletionStage = -- cgit 1.2.3-korg