From 18f191d706d7b260d75a4a1f04245f6901fe654a 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 --- .../fd/honeycomb/translate/v3po/InterfacesWriterFactory.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java') diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java index cc68d4dda..97f21fbb2 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesWriterFactory.java @@ -42,6 +42,7 @@ import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4Customizer; import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv4NeighbourCustomizer; import io.fd.honeycomb.translate.v3po.interfaces.ip.Ipv6Customizer; import io.fd.honeycomb.translate.v3po.util.NamingContext; +import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; import java.util.Set; @@ -85,7 +86,7 @@ public final class InterfacesWriterFactory implements WriterFactory { private final IetfAClWriter aclWriter; private final NamingContext bdNamingContext; private final NamingContext ifcNamingContext; - private final NamingContext classifyTableNamingContext; + private final VppClassifierContextManager classifyTableContext; private final DisabledInterfacesManager ifcDisableContext; @Inject @@ -93,14 +94,14 @@ public final class InterfacesWriterFactory implements WriterFactory { final IetfAClWriter aclWriter, @Named("bridge-domain-context") final NamingContext bridgeDomainContextDependency, @Named("interface-context") final NamingContext interfaceContextDependency, - @Named("classify-table-context") final NamingContext classifyTableContextDependency, + @Named("classify-table-context") final VppClassifierContextManager classifyTableContext, final DisabledInterfacesManager ifcDisableContext) { this.jvpp = vppJvppIfcDependency; this.aclWriter = aclWriter; this.bdNamingContext = bridgeDomainContextDependency; this.ifcNamingContext = interfaceContextDependency; this.ifcDisableContext = ifcDisableContext; - this.classifyTableNamingContext = classifyTableContextDependency; + this.classifyTableContext = classifyTableContext; } @Override @@ -114,7 +115,7 @@ public final class InterfacesWriterFactory implements WriterFactory { addInterface1AugmentationWriters(IFC_ID, registry); // SubinterfaceAugmentation new SubinterfaceAugmentationWriterFactory(jvpp, aclWriter, ifcNamingContext, bdNamingContext, - classifyTableNamingContext).init(registry); + classifyTableContext).init(registry); } private void addInterface1AugmentationWriters(final InstanceIdentifier ifcId, @@ -183,7 +184,7 @@ public final class InterfacesWriterFactory implements WriterFactory { registry .subtreeAddAfter( Sets.newHashSet(aclId.child(L2Acl.class), aclId.child(Ip4Acl.class), aclId.child(Ip6Acl.class)), - new GenericWriter<>(ACL_ID, new AclCustomizer(jvpp, ifcNamingContext, classifyTableNamingContext)), + new GenericWriter<>(ACL_ID, new AclCustomizer(jvpp, ifcNamingContext, classifyTableContext)), Sets.newHashSet(CLASSIFY_TABLE_ID, CLASSIFY_SESSION_ID)); // IETF-ACL, also handles IetfAcl, AccessLists and Acl: -- cgit 1.2.3-korg