diff options
author | Tibor Král <tibor.kral@pantheon.tech> | 2019-02-21 09:48:36 +0100 |
---|---|---|
committer | Tibor Král <tibor.kral@pantheon.tech> | 2019-03-28 13:46:05 +0100 |
commit | c6f69e668dcbbe603e803f7671073af302c05c9a (patch) | |
tree | 9ae6efa952c1e04ea7c4de75afe10fe289f14f71 /l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv4WriterFactory.java | |
parent | a2ba7b3fe8d0cdaa0faead940a064081bcb03975 (diff) |
HC2VPP-384: Validation support for L3 module
Change-Id: I9f4a856dc70a7ac2a3f8e103143ad15f05402f24
Signed-off-by: Tibor Král <tibor.kral@pantheon.tech>
Diffstat (limited to 'l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv4WriterFactory.java')
-rw-r--r-- | l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv4WriterFactory.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv4WriterFactory.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv4WriterFactory.java index f5d7dc553..831b160be 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv4WriterFactory.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv4WriterFactory.java @@ -25,7 +25,9 @@ import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.hc2vpp.common.translate.util.NamingContext; import io.fd.hc2vpp.l3.write.ipv4.subinterface.SubInterfaceIpv4AddressCustomizer; +import io.fd.hc2vpp.l3.write.ipv4.subinterface.SubInterfaceIpv4AddressValidator; import io.fd.hc2vpp.l3.write.ipv4.subinterface.SubInterfaceIpv4NeighbourCustomizer; +import io.fd.hc2vpp.l3.write.ipv4.subinterface.SubInterfaceIpv4NeighbourValidator; import io.fd.honeycomb.translate.impl.write.GenericListWriter; import io.fd.honeycomb.translate.write.WriterFactory; import io.fd.honeycomb.translate.write.registry.ModifiableWriterRegistryBuilder; @@ -38,7 +40,7 @@ import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.su import org.opendaylight.yang.gen.v1.http.fd.io.hc2vpp.yang.vpp.vlan.rev180319.sub._interface.routing.attributes.Routing; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; -public class SubInterfaceIpv4WriterFactory implements WriterFactory{ +public class SubInterfaceIpv4WriterFactory implements WriterFactory { @Inject private FutureJVppCore jvpp; @@ -55,11 +57,13 @@ public class SubInterfaceIpv4WriterFactory implements WriterFactory{ // Ipv4(handled after L2 and L2/rewrite is done) = final InstanceIdentifier<Address> ipv4SubifcAddressId = SUB_IFC_ID.child(Ipv4.class).child(Address.class); registry.addAfter(new GenericListWriter<>(ipv4SubifcAddressId, - new SubInterfaceIpv4AddressCustomizer(jvpp, ifcNamingContext)), + new SubInterfaceIpv4AddressCustomizer(jvpp, ifcNamingContext), + new SubInterfaceIpv4AddressValidator(ifcNamingContext)), ImmutableSet.of(rewriteId, SUB_IFC_ID.child(Routing.class))); final InstanceIdentifier<Neighbor> ipv4NeighborId = SUB_IFC_ID.child(Ipv4.class).child(Neighbor.class); registry.addAfter(new GenericListWriter<>(ipv4NeighborId, - new SubInterfaceIpv4NeighbourCustomizer(jvpp, ifcNamingContext)), rewriteId); + new SubInterfaceIpv4NeighbourCustomizer(jvpp, ifcNamingContext), + new SubInterfaceIpv4NeighbourValidator(ifcNamingContext)), rewriteId); } } |