summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-07-20 09:48:14 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-09-13 09:44:50 +0200
commit6509e0875c394fa122e56bbaa93b2f11205d1d67 (patch)
tree4eb29d0f6cef0ce31bae4f25f3a99f25fa64f253 /v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
parent81d2be3f014af6fd453b0be73999c38f7e2f734f (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/InterfacesStateReaderFactory.java')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
index f2936cd9c..c0c0530d3 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java
@@ -38,6 +38,7 @@ import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4Customizer;
import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv4NeighbourCustomizer;
import io.fd.honeycomb.translate.v3po.interfacesstate.ip.Ipv6Customizer;
import io.fd.honeycomb.translate.v3po.util.NamingContext;
+import io.fd.honeycomb.translate.v3po.vppclassifier.VppClassifierContextManager;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesState;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.InterfacesStateBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
@@ -68,7 +69,7 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
private final NamingContext ifcNamingCtx;
private final NamingContext bdNamingCtx;
- private final NamingContext classifyNamingCtx;
+ private final VppClassifierContextManager classifyContext;
private final DisabledInterfacesManager ifcDisableContext;
private final FutureJVppCore jvpp;
@@ -80,12 +81,12 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
public InterfacesStateReaderFactory(final FutureJVppCore jvpp,
@Named("interface-context") final NamingContext ifcNamingCtx,
@Named("bridge-domain-context") final NamingContext bdNamingCtx,
- @Named("classify-table-context") final NamingContext classifyNamingCtx,
+ @Named("classify-table-context") final VppClassifierContextManager classifyContext,
final DisabledInterfacesManager ifcDisableContext) {
this.jvpp = jvpp;
this.ifcNamingCtx = ifcNamingCtx;
this.bdNamingCtx = bdNamingCtx;
- this.classifyNamingCtx = classifyNamingCtx;
+ this.classifyContext = classifyContext;
this.ifcDisableContext = ifcDisableContext;
}
@@ -101,7 +102,7 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
// ietf-ip.yang
initInterface2AugmentationReaders(registry, IFC_ID);
// vpp-vlan.yang
- new SubinterfaceStateAugmentationReaderFactory(jvpp, ifcNamingCtx, bdNamingCtx, classifyNamingCtx).init(registry);
+ new SubinterfaceStateAugmentationReaderFactory(jvpp, ifcNamingCtx, bdNamingCtx, classifyContext).init(registry);
}
private void initInterface2AugmentationReaders(final ModifiableReaderRegistryBuilder registry,
@@ -149,7 +150,7 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
registry.subtreeAdd(
Sets.newHashSet(aclIdRelative.child(L2Acl.class), aclIdRelative.child(Ip4Acl.class), aclIdRelative.child(Ip6Acl.class)),
new GenericReader<>(vppIfcAugId.child(Acl.class), new AclCustomizer(jvpp, ifcNamingCtx,
- classifyNamingCtx)));
+ classifyContext)));
// Proxy ARP
registry.add(new GenericReader<>(vppIfcAugId.child(ProxyArp.class), new ProxyArpCustomizer(jvpp,
ifcNamingCtx)));