summaryrefslogtreecommitdiffstats
path: root/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory')
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesStateReaderFactory.java29
-rw-r--r--v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceStateAugmentationReaderFactory.java45
2 files changed, 44 insertions, 30 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesStateReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesStateReaderFactory.java
index 44390b41d..eaacb135a 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesStateReaderFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/InterfacesStateReaderFactory.java
@@ -30,6 +30,7 @@ import io.fd.hc2vpp.v3po.interfacesstate.TapCustomizer;
import io.fd.hc2vpp.v3po.interfacesstate.VhostUserCustomizer;
import io.fd.hc2vpp.v3po.interfacesstate.VxlanCustomizer;
import io.fd.hc2vpp.v3po.interfacesstate.VxlanGpeCustomizer;
+import io.fd.hc2vpp.v3po.interfacesstate.cache.InterfaceCacheDumpManager;
import io.fd.hc2vpp.v3po.interfacesstate.pbb.PbbRewriteStateCustomizer;
import io.fd.hc2vpp.v3po.interfacesstate.span.InterfaceMirroredInterfacesCustomizer;
import io.fd.honeycomb.translate.impl.read.GenericInitListReader;
@@ -65,6 +66,7 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
private final NamingContext ifcNamingCtx;
private final NamingContext bdNamingCtx;
private final DisabledInterfacesManager ifcDisableContext;
+ private final InterfaceCacheDumpManager ifaceDumpManager;
private final FutureJVppCore jvpp;
static final InstanceIdentifier<InterfacesState> IFC_STATE_ID =
@@ -75,11 +77,13 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
public InterfacesStateReaderFactory(final FutureJVppCore jvpp,
@Named("interface-context") final NamingContext ifcNamingCtx,
@Named("bridge-domain-context") final NamingContext bdNamingCtx,
- final DisabledInterfacesManager ifcDisableContext) {
+ final DisabledInterfacesManager ifcDisableContext,
+ final InterfaceCacheDumpManager ifaceDumpManager) {
this.jvpp = jvpp;
this.ifcNamingCtx = ifcNamingCtx;
this.bdNamingCtx = bdNamingCtx;
this.ifcDisableContext = ifcDisableContext;
+ this.ifaceDumpManager = ifaceDumpManager;
}
@Override
@@ -87,7 +91,8 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
// InterfacesState(Structural)
registry.addStructuralReader(IFC_STATE_ID, InterfacesStateBuilder.class);
// Interface
- registry.add(new GenericInitListReader<>(IFC_ID, new InterfaceCustomizer(jvpp, ifcNamingCtx, ifcDisableContext)));
+ registry.add(new GenericInitListReader<>(IFC_ID,
+ new InterfaceCustomizer(ifcNamingCtx, ifcDisableContext, ifaceDumpManager)));
// v3po.yang
initVppIfcAugmentationReaders(registry, IFC_ID);
@@ -104,25 +109,28 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
registry.addStructuralReader(vppIfcAugId, VppInterfaceStateAugmentationBuilder.class);
// Ethernet
registry.add(new GenericInitReader<>(vppIfcAugId.child(Ethernet.class),
- new EthernetCustomizer(jvpp, ifcNamingCtx)));
+ new EthernetCustomizer(ifaceDumpManager)));
// Routing
registry.add(new GenericInitReader<>(vppIfcAugId.child(Routing.class),
- new InterfaceRoutingCustomizer(jvpp, ifcNamingCtx)));
+ new InterfaceRoutingCustomizer(jvpp, ifcNamingCtx)));
// Tap
- registry.add(new GenericInitReader<>(vppIfcAugId.child(Tap.class), new TapCustomizer(jvpp, ifcNamingCtx)));
+ registry.add(new GenericInitReader<>(vppIfcAugId.child(Tap.class),
+ new TapCustomizer(jvpp, ifcNamingCtx, ifaceDumpManager)));
// VhostUser
registry.add(new GenericInitReader<>(vppIfcAugId.child(VhostUser.class),
- new VhostUserCustomizer(jvpp, ifcNamingCtx)));
+ new VhostUserCustomizer(jvpp, ifcNamingCtx, ifaceDumpManager)));
// Vxlan
- registry.add(new GenericInitReader<>(vppIfcAugId.child(Vxlan.class), new VxlanCustomizer(jvpp, ifcNamingCtx)));
+ registry.add(new GenericInitReader<>(vppIfcAugId.child(Vxlan.class),
+ new VxlanCustomizer(jvpp, ifcNamingCtx, ifaceDumpManager)));
// VxlanGpe
registry.add(new GenericInitReader<>(vppIfcAugId.child(VxlanGpe.class),
- new VxlanGpeCustomizer(jvpp, ifcNamingCtx)));
+ new VxlanGpeCustomizer(jvpp, ifcNamingCtx, ifaceDumpManager)));
// Gre
- registry.add(new GenericInitReader<>(vppIfcAugId.child(Gre.class), new GreCustomizer(jvpp, ifcNamingCtx)));
+ registry.add(new GenericInitReader<>(vppIfcAugId.child(Gre.class),
+ new GreCustomizer(jvpp, ifcNamingCtx, ifaceDumpManager)));
// L2
registry.add(new GenericInitReader<>(vppIfcAugId.child(L2.class),
- new L2Customizer(jvpp, ifcNamingCtx, bdNamingCtx)));
+ new L2Customizer(jvpp, ifcNamingCtx, bdNamingCtx, ifaceDumpManager)));
// Span
final InstanceIdentifier<Span> spanId = vppIfcAugId.child(Span.class);
registry.addStructuralReader(spanId, SpanBuilder.class);
@@ -141,5 +149,4 @@ public final class InterfacesStateReaderFactory implements ReaderFactory {
registry.add(new GenericReader<>(ifcId.augmentation(PbbRewriteStateInterfaceAugmentation.class).child(
PbbRewriteState.class), new PbbRewriteStateCustomizer(jvpp)));
}
-
}
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceStateAugmentationReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceStateAugmentationReaderFactory.java
index de91a067b..a041bc820 100644
--- a/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceStateAugmentationReaderFactory.java
+++ b/v3po/v3po2vpp/src/main/java/io/fd/hc2vpp/v3po/factory/SubinterfaceStateAugmentationReaderFactory.java
@@ -24,6 +24,7 @@ import io.fd.hc2vpp.v3po.interfacesstate.RewriteCustomizer;
import io.fd.hc2vpp.v3po.interfacesstate.SubInterfaceCustomizer;
import io.fd.hc2vpp.v3po.interfacesstate.SubInterfaceL2Customizer;
import io.fd.hc2vpp.v3po.interfacesstate.SubInterfaceRoutingCustomizer;
+import io.fd.hc2vpp.v3po.interfacesstate.cache.InterfaceCacheDumpManager;
import io.fd.hc2vpp.v3po.interfacesstate.span.SubInterfaceMirroredInterfacesCustomizer;
import io.fd.honeycomb.translate.impl.read.GenericInitListReader;
import io.fd.honeycomb.translate.impl.read.GenericInitReader;
@@ -36,7 +37,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.subinter
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.subinterface.span.rev170607.VppSubinterfaceSpanStateAugmentationBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.subinterface.span.rev170607.interfaces.state._interface.sub.interfaces.sub._interface.SpanState;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.subinterface.span.rev170607.interfaces.state._interface.sub.interfaces.sub._interface.SpanStateBuilder;
-
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170607.span.state.attributes.MirroredInterfaces;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.SubinterfaceStateAugmentation;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.SubinterfaceStateAugmentationBuilder;
@@ -45,12 +45,11 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.interfaces.state._interface.sub.interfaces.SubInterface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.match.attributes.match.type.vlan.tagged.VlanTagged;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.rewrite.attributes.Rewrite;
-import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.sub._interface.l2.state.attributes.L2;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.sub._interface.base.attributes.Match;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.sub._interface.base.attributes.Tags;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.sub._interface.base.attributes.tags.Tag;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.sub._interface.l2.state.attributes.L2;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.sub._interface.routing.attributes.Routing;
-
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170607.tag.rewrite.PushTags;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
@@ -59,21 +58,24 @@ public final class SubinterfaceStateAugmentationReaderFactory implements ReaderF
private final FutureJVppCore jvpp;
private final NamingContext ifcCtx;
private final NamingContext bdCtx;
+ private final InterfaceCacheDumpManager ifaceDumpManager;
@Inject
public SubinterfaceStateAugmentationReaderFactory(final FutureJVppCore jvpp,
@Named("interface-context") final NamingContext ifcCtx,
- @Named("bridge-domain-context") final NamingContext bdCtx) {
+ @Named("bridge-domain-context") final NamingContext bdCtx,
+ final InterfaceCacheDumpManager ifaceDumpManager) {
this.jvpp = jvpp;
this.ifcCtx = ifcCtx;
this.bdCtx = bdCtx;
+ this.ifaceDumpManager = ifaceDumpManager;
}
@Override
public void init(final ModifiableReaderRegistryBuilder registry) {
// SubinterfaceStateAugmentation(Structural)
final InstanceIdentifier<SubinterfaceStateAugmentation> subIfcAugId =
- InterfacesStateReaderFactory.IFC_ID.augmentation(SubinterfaceStateAugmentation.class);
+ InterfacesStateReaderFactory.IFC_ID.augmentation(SubinterfaceStateAugmentation.class);
registry.addStructuralReader(subIfcAugId, SubinterfaceStateAugmentationBuilder.class);
// SubInterfaces(Structural)
final InstanceIdentifier<SubInterfaces> subIfcsId = subIfcAugId.child(SubInterfaces.class);
@@ -81,26 +83,30 @@ public final class SubinterfaceStateAugmentationReaderFactory implements ReaderF
// SubInterface(Subtree)
final InstanceIdentifier<SubInterface> subIfcId = subIfcsId.child(SubInterface.class);
registry.subtreeAdd(Sets.newHashSet(
- InstanceIdentifier.create(SubInterface.class).child(Tags.class),
- InstanceIdentifier.create(SubInterface.class).child(Tags.class).child(Tag.class),
- InstanceIdentifier.create(SubInterface.class).child(Tags.class).child(Tag.class).child(Dot1qTag.class),
- InstanceIdentifier.create(SubInterface.class).child(Match.class),
- InstanceIdentifier.create(SubInterface.class).child(Match.class).child(VlanTagged.class)),
- new GenericInitListReader<>(subIfcId, new SubInterfaceCustomizer(jvpp, ifcCtx)));
+ InstanceIdentifier.create(SubInterface.class).child(Tags.class),
+ InstanceIdentifier.create(SubInterface.class).child(Tags.class).child(Tag.class),
+ InstanceIdentifier.create(SubInterface.class).child(Tags.class).child(Tag.class).child(Dot1qTag.class),
+ InstanceIdentifier.create(SubInterface.class).child(Match.class),
+ InstanceIdentifier.create(SubInterface.class).child(Match.class).child(VlanTagged.class)),
+ new GenericInitListReader<>(subIfcId,
+ new SubInterfaceCustomizer(jvpp, ifcCtx, ifaceDumpManager)));
// L2
final InstanceIdentifier<L2> l2Id = subIfcId.child(L2.class);
- registry.add(new GenericInitReader<>(l2Id, new SubInterfaceL2Customizer(jvpp, ifcCtx, bdCtx)));
+ registry.add(new GenericInitReader<>(l2Id,
+ new SubInterfaceL2Customizer(jvpp, ifcCtx, bdCtx, ifaceDumpManager)));
// Rewrite(Subtree)
registry.subtreeAdd(Sets.newHashSet(
- InstanceIdentifier.create(Rewrite.class).child(PushTags.class),
- InstanceIdentifier.create(Rewrite.class).child(PushTags.class)
- .child(
- org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.Dot1qTag.class)),
- new GenericReader<>(l2Id.child(Rewrite.class), new RewriteCustomizer(jvpp, ifcCtx)));
+ InstanceIdentifier.create(Rewrite.class).child(PushTags.class),
+ InstanceIdentifier.create(Rewrite.class).child(PushTags.class)
+ .child(
+ org.opendaylight.yang.gen.v1.urn.ieee.params.xml.ns.yang.dot1q.types.rev150626.dot1q.tag.Dot1qTag.class)),
+ new GenericReader<>(l2Id.child(Rewrite.class),
+ new RewriteCustomizer(ifaceDumpManager)));
final InstanceIdentifier<Routing> routingId = subIfcId.child(Routing.class);
registry.add(new GenericReader<>(routingId, new SubInterfaceRoutingCustomizer(jvpp, ifcCtx)));
- final InstanceIdentifier<VppSubinterfaceSpanStateAugmentation> spanStateAugId = subIfcId.augmentation(VppSubinterfaceSpanStateAugmentation.class);
+ final InstanceIdentifier<VppSubinterfaceSpanStateAugmentation> spanStateAugId =
+ subIfcId.augmentation(VppSubinterfaceSpanStateAugmentation.class);
registry.addStructuralReader(spanStateAugId, VppSubinterfaceSpanStateAugmentationBuilder.class);
final InstanceIdentifier<SpanState> spanStateId = spanStateAugId
@@ -108,6 +114,7 @@ public final class SubinterfaceStateAugmentationReaderFactory implements ReaderF
registry.addStructuralReader(spanStateId, SpanStateBuilder.class);
final InstanceIdentifier<MirroredInterfaces> mirroredInterfacesId = spanStateId.child(MirroredInterfaces.class);
- registry.add(new GenericInitReader<>(mirroredInterfacesId, new SubInterfaceMirroredInterfacesCustomizer(jvpp, ifcCtx)));
+ registry.add(new GenericInitReader<>(mirroredInterfacesId,
+ new SubInterfaceMirroredInterfacesCustomizer(jvpp, ifcCtx)));
}
}