diff options
Diffstat (limited to 'l3/impl/src')
4 files changed, 19 insertions, 4 deletions
diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv4WriterFactory.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv4WriterFactory.java index cc784bb9e..dec6e93db 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv4WriterFactory.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv4WriterFactory.java @@ -17,7 +17,9 @@ package io.fd.hc2vpp.l3.write.factory; import static io.fd.hc2vpp.v3po.factory.InterfacesWriterFactory.IFC_ID; +import static io.fd.hc2vpp.v3po.factory.InterfacesWriterFactory.VPP_IFC_AUG_ID; +import com.google.common.collect.ImmutableSet; import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.hc2vpp.common.translate.util.NamingContext; @@ -34,6 +36,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev14061 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv4; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv4.Neighbor; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170315.interfaces._interface.Routing; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class Ipv4WriterFactory implements WriterFactory { @@ -52,8 +55,9 @@ public class Ipv4WriterFactory implements WriterFactory { // Ipv4(after interface) final InstanceIdentifier<Ipv4> ipv4Id = ifc1AugId.child(Ipv4.class); + // changing ip table for interface that has ip address assigned is illegal action(internal vpp behaviour) registry.addAfter(new GenericWriter<>(ipv4Id, new Ipv4Customizer(jvpp)), - IFC_ID); + ImmutableSet.of(IFC_ID, VPP_IFC_AUG_ID.child(Routing.class))); // Address(after Ipv4) = final InstanceIdentifier<Address> ipv4AddressId = ipv4Id.child(Address.class); registry.addAfter(new GenericListWriter<>(ipv4AddressId, new Ipv4AddressCustomizer(jvpp, ifcNamingContext)), diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv6WriterFactory.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv6WriterFactory.java index d9bee8177..1793450c4 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv6WriterFactory.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/Ipv6WriterFactory.java @@ -17,7 +17,9 @@ package io.fd.hc2vpp.l3.write.factory; import static io.fd.hc2vpp.v3po.factory.InterfacesWriterFactory.IFC_ID; +import static io.fd.hc2vpp.v3po.factory.InterfacesWriterFactory.VPP_IFC_AUG_ID; +import com.google.common.collect.ImmutableSet; import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.hc2vpp.common.translate.util.NamingContext; @@ -37,6 +39,7 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev14061 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.Ipv6; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv6.Address; import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.ip.rev140616.interfaces._interface.ipv6.Neighbor; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev170315.interfaces._interface.Routing; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nd.proxy.rev170315.NdProxyIp6Augmentation; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nd.proxy.rev170315.interfaces._interface.ipv6.NdProxies; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.nd.proxy.rev170315.interfaces._interface.ipv6.nd.proxies.NdProxy; @@ -59,7 +62,9 @@ public class Ipv6WriterFactory implements WriterFactory { // Ipv6(after interface) = final InstanceIdentifier<Ipv6> ipv6Id = ifc1AugId.child(Ipv6.class); - registry.addAfter(new GenericWriter<>(ipv6Id, new Ipv6Customizer(jvpp)), IFC_ID); + // changing ip table for interface that has ip address assigned is illegal action(internal vpp behaviour) + registry.addAfter(new GenericWriter<>(ipv6Id, new Ipv6Customizer(jvpp)), ImmutableSet + .of(IFC_ID, VPP_IFC_AUG_ID.child(Routing.class))); final InstanceIdentifier<Address> ipv6AddressId = ipv6Id.child(Address.class); 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 fedb8eec5..44e08b724 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 @@ -20,6 +20,7 @@ package io.fd.hc2vpp.l3.write.factory; import static io.fd.hc2vpp.v3po.factory.SubinterfaceAugmentationWriterFactory.L2_ID; import static io.fd.hc2vpp.v3po.factory.SubinterfaceAugmentationWriterFactory.SUB_IFC_ID; +import com.google.common.collect.ImmutableSet; import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.hc2vpp.common.translate.util.NamingContext; @@ -34,6 +35,7 @@ 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.rev170509.sub._interface.ip4.attributes.Ipv4; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.ip4.attributes.ipv4.Address; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.ip4.attributes.ipv4.Neighbor; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.routing.attributes.Routing; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class SubInterfaceIpv4WriterFactory implements WriterFactory{ @@ -53,7 +55,8 @@ 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)), rewriteId); + new SubInterfaceIpv4AddressCustomizer(jvpp, 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); diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv6WriterFactory.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv6WriterFactory.java index b4d019164..ab02d25cc 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv6WriterFactory.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/factory/SubInterfaceIpv6WriterFactory.java @@ -20,6 +20,7 @@ package io.fd.hc2vpp.l3.write.factory; import static io.fd.hc2vpp.v3po.factory.SubinterfaceAugmentationWriterFactory.L2_ID; import static io.fd.hc2vpp.v3po.factory.SubinterfaceAugmentationWriterFactory.SUB_IFC_ID; +import com.google.common.collect.ImmutableSet; import com.google.inject.Inject; import com.google.inject.name.Named; import io.fd.hc2vpp.common.translate.util.NamingContext; @@ -33,6 +34,7 @@ import javax.annotation.Nonnull; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.base.attributes.l2.Rewrite; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.ip6.attributes.Ipv6; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.ip6.attributes.ipv6.Address; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.routing.attributes.Routing; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public class SubInterfaceIpv6WriterFactory implements WriterFactory { @@ -54,7 +56,8 @@ public class SubInterfaceIpv6WriterFactory implements WriterFactory { ipv6SubifcAddressId = SUB_IFC_ID.child(Ipv6.class) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.ip6.attributes.ipv6.Address.class); registry.addAfter(new GenericListWriter<>(ipv6SubifcAddressId, - new SubInterfaceIpv6AddressCustomizer(jvpp, ifcNamingContext)), rewriteId); + new SubInterfaceIpv6AddressCustomizer(jvpp, ifcNamingContext)), ImmutableSet + .of(rewriteId, SUB_IFC_ID.child(Routing.class))); final InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.ip6.attributes.ipv6.Neighbor> ipv6NeighborId = SUB_IFC_ID.child(Ipv6.class) .child(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.vlan.rev170509.sub._interface.ip6.attributes.ipv6.Neighbor.class); |