From 55e274d6df5b50140a738c258eb9f9aae81931ca Mon Sep 17 00:00:00 2001 From: Hongjun Ni Date: Fri, 22 Jul 2016 19:20:18 +0800 Subject: HONEYCOMB-83: Add Gre Feature within HC PatchSet 7: refactor code PatchSet 6: Refactor based on new code organization PatchSet 5: consolidate review comments PatchSet 4: refactor to support reader registry PatchSet 3: rebuild PatchSet 2: update outer-fib-id in v3po.yang. PatchSet 1: Add GRE feature and support IPv6. Change-Id: I1fc064b618f161eaef06395380949277e2f9f060 Signed-off-by: Hongjun Ni --- .../yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java | 8 ++++++++ .../v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'v3po/v3po2vpp/src/main/java/org') diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java index c3e56ef80..d0a868319 100644 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java +++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java @@ -8,6 +8,7 @@ import io.fd.honeycomb.translate.impl.write.GenericListWriter; import io.fd.honeycomb.translate.impl.write.GenericWriter; import io.fd.honeycomb.translate.v3po.interfaces.AclCustomizer; import io.fd.honeycomb.translate.v3po.interfaces.EthernetCustomizer; +import io.fd.honeycomb.translate.v3po.interfaces.GreCustomizer; import io.fd.honeycomb.translate.v3po.interfaces.InterfaceCustomizer; import io.fd.honeycomb.translate.v3po.interfaces.L2Customizer; import io.fd.honeycomb.translate.v3po.interfaces.RoutingCustomizer; @@ -42,6 +43,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VhostUser; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Vxlan; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.VxlanGpe; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces._interface.Gre; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.future.FutureJVpp; @@ -151,6 +153,12 @@ public class InterfacesHoneycombWriterModule extends registry.addBefore(new GenericWriter<>(tapId, new TapCustomizer(jvpp, ifcContext)), ifcId); + // Gre(Needs to be executed before Interface customizer) = + final InstanceIdentifier greId = VPP_IFC_AUG_ID.child(Gre.class); + registry.addBefore(new GenericWriter<>(greId, new GreCustomizer(jvpp, ifcContext)), + ifcId); + + final Set> specificIfcTypes = Sets.newHashSet(vhostId, vxlanGpeId, vxlanGpeId, tapId); // Ethernet(No dependency, customizer not finished TODO) = diff --git a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java index e2fd01cd2..5b4450a91 100644 --- a/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java +++ b/v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesStateHoneycombReaderModule.java @@ -7,6 +7,7 @@ import io.fd.honeycomb.translate.read.ReaderFactory; import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; import io.fd.honeycomb.translate.v3po.interfacesstate.AclCustomizer; import io.fd.honeycomb.translate.v3po.interfacesstate.EthernetCustomizer; +import io.fd.honeycomb.translate.v3po.interfacesstate.GreCustomizer; import io.fd.honeycomb.translate.v3po.interfacesstate.InterfaceCustomizer; import io.fd.honeycomb.translate.v3po.interfacesstate.L2Customizer; import io.fd.honeycomb.translate.v3po.interfacesstate.TapCustomizer; @@ -41,6 +42,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.VxlanGpe; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.future.FutureJVpp; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.interfaces.state._interface.Gre; +import org.opendaylight.yangtools.yang.binding.Augmentation; +import org.opendaylight.yangtools.yang.binding.ChildOf; public class InterfacesStateHoneycombReaderModule extends org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.v3po2vpp.rev160406.AbstractInterfacesStateHoneycombReaderModule { @@ -141,6 +145,8 @@ public class InterfacesStateHoneycombReaderModule extends registry.add(new GenericReader<>(vppIfcAugId.child(Vxlan.class), new VxlanCustomizer(jvpp, ifcCtx))); // VxlanGpe registry.add(new GenericReader<>(vppIfcAugId.child(VxlanGpe.class), new VxlanGpeCustomizer(jvpp, ifcCtx))); + // Gre + registry.add(new GenericReader<>(vppIfcAugId.child(Gre.class), new GreCustomizer(jvpp, ifcCtx))); // L2 registry.add(new GenericReader<>(vppIfcAugId.child(L2.class), new L2Customizer(jvpp, ifcCtx, bdCtx))); // Acl(Subtree) -- cgit 1.2.3-korg