diff options
author | 2016-04-14 15:22:06 +0200 | |
---|---|---|
committer | 2016-04-15 10:56:42 +0200 | |
commit | 1e37dbc5e73141fb6927ab68304f4ef4671243c7 (patch) | |
tree | 129c15d0236563e6c8cc5bd20b3b314f0397a8a9 /v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1 | |
parent | 83a373b7cb6274e84281519d32417d6eda2a5145 (diff) |
HONEYCOMB-38: Fix vpp interface customizers
The order of execution was not correct
+ CompositeWriter ignored some changes
Change-Id: I53fd9fda4b7a0379e0fa8451fa894865f67ebace
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1')
-rw-r--r-- | v3po/v3po2vpp/src/main/java/org/opendaylight/yang/gen/v1/urn/honeycomb/params/xml/ns/yang/v3po2vpp/rev160406/InterfacesHoneycombWriterModule.java | 18 |
1 files changed, 9 insertions, 9 deletions
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 4710d9e1a..e906167fd 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,12 +8,11 @@ import io.fd.honeycomb.v3po.translate.impl.write.CompositeRootWriter; import io.fd.honeycomb.v3po.translate.util.RWUtils; import io.fd.honeycomb.v3po.translate.util.write.CloseableWriter; import io.fd.honeycomb.v3po.translate.util.write.NoopWriterCustomizer; -import io.fd.honeycomb.v3po.translate.util.write.ReflexiveChildWriterCustomizer; +import io.fd.honeycomb.v3po.translate.util.write.ReflexiveAugmentWriterCustomizer; import io.fd.honeycomb.v3po.translate.v3po.interfaces.EthernetCustomizer; import io.fd.honeycomb.v3po.translate.v3po.interfaces.InterfaceCustomizer; import io.fd.honeycomb.v3po.translate.v3po.interfaces.L2Customizer; import io.fd.honeycomb.v3po.translate.v3po.interfaces.RoutingCustomizer; -import io.fd.honeycomb.v3po.translate.v3po.interfaces.VppInterfaceCustomizer; import io.fd.honeycomb.v3po.translate.v3po.interfaces.VxlanCustomizer; import io.fd.honeycomb.v3po.translate.v3po.interfaces.ip.Ipv4Customizer; import io.fd.honeycomb.v3po.translate.v3po.interfaces.ip.Ipv6Customizer; @@ -52,11 +51,15 @@ public class InterfacesHoneycombWriterModule extends org.opendaylight.yang.gen.v final List<ChildWriter<? extends Augmentation<Interface>>> ifcAugmentations = Lists.newArrayList(); ifcAugmentations.add(getVppIfcAugmentationWriter()); + ifcAugmentations.add(getInterface1AugmentationWriter()); final ChildWriter<Interface> interfaceWriter = new CompositeListWriter<>(Interface.class, RWUtils.<Interface>emptyChildWriterList(), ifcAugmentations, - new InterfaceCustomizer(getVppJapiIfcDependency())); + new InterfaceCustomizer(getVppJapiIfcDependency()), + // It's important that this customizer is handled in a postorder way, because you first have to handle child nodes + // e.g. Vxlan before setting other interface or vppInterfaceAugmentation leaves + TraversalType.POSTORDER); final List<ChildWriter<? extends ChildOf<Interfaces>>> childWriters = new ArrayList<>(); childWriters.add(interfaceWriter); @@ -79,7 +82,7 @@ public class InterfacesHoneycombWriterModule extends org.opendaylight.yang.gen.v interface1ChildWriters.add(ipv6Writer); return new CompositeChildWriter<>(Interface1.class, - interface1ChildWriters, new ReflexiveChildWriterCustomizer<Interface1>()); + interface1ChildWriters, new ReflexiveAugmentWriterCustomizer<Interface1>()); } private ChildWriter<VppInterfaceAugmentation> getVppIfcAugmentationWriter() { @@ -98,17 +101,14 @@ public class InterfacesHoneycombWriterModule extends org.opendaylight.yang.gen.v final List<ChildWriter<? extends ChildOf<VppInterfaceAugmentation>>> vppIfcChildWriters = Lists.newArrayList(); // TODO what's the order here ? - vppIfcChildWriters.add(ethernetWriter); vppIfcChildWriters.add(vxlanWriter); + vppIfcChildWriters.add(ethernetWriter); vppIfcChildWriters.add(l2Writer); vppIfcChildWriters.add(routingWriter); return new CompositeChildWriter<>(VppInterfaceAugmentation.class, vppIfcChildWriters, RWUtils.<VppInterfaceAugmentation>emptyAugWriterList(), - new VppInterfaceCustomizer(getVppJapiIfcDependency()), - // It's important that this customizer is handled in a postorder way, because you first have to handle child nodes - // e.g. Vxlan before setting other interface or vppInterfaceAugmentation leaves - TraversalType.POSTORDER); + new ReflexiveAugmentWriterCustomizer<VppInterfaceAugmentation>()); } } |