From b8cf23cd61c2d3f57f9450570236534bce69232e Mon Sep 17 00:00:00 2001 From: Jan Srnicek Date: Tue, 15 Aug 2017 11:30:28 +0200 Subject: HONEYCOMB-386 - Hc2vpp Customizers update Utilizes new default update implementation Change-Id: I9bf8473336274ba5fcfc18804f7b414937b3708e Signed-off-by: Jan Srnicek --- .../java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java | 7 ------- .../src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4Customizer.java | 7 ------- .../java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java | 7 ------- .../main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java | 9 --------- .../java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java | 9 --------- .../ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java | 7 ------- .../ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java | 7 ------- .../java/io/fd/hc2vpp/l3/write/ipv6/Ipv6AddressCustomizer.java | 9 --------- .../src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6Customizer.java | 7 ------- .../java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java | 7 ------- .../java/io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizer.java | 8 -------- .../ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java | 7 ------- .../ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java | 7 ------- .../test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java | 2 +- .../java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java | 2 +- .../io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java | 2 +- .../l3/write/ipv4/SubInterfaceIpv4AddressCustomizerTest.java | 2 +- .../io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizerTest.java | 2 +- 18 files changed, 5 insertions(+), 103 deletions(-) (limited to 'l3') diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java index 1cdd46ef6..b66877ff0 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizer.java @@ -62,13 +62,6 @@ public class Ipv4AddressCustomizer extends FutureJVppCustomizer setAddress(true, id, interfaceName, interfaceIndex, dataAfter, writeContext); } - @Override - public void updateCurrentAttributes(InstanceIdentifier
id, Address dataBefore, Address dataAfter, - WriteContext writeContext) throws WriteFailedException { - throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, - new UnsupportedOperationException("Operation not supported")); - } - @Override public void deleteCurrentAttributes(InstanceIdentifier
id, Address dataBefore, WriteContext writeContext) throws WriteFailedException { diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4Customizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4Customizer.java index e1fdb5914..6b0859ce8 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4Customizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4Customizer.java @@ -40,13 +40,6 @@ public class Ipv4Customizer extends FutureJVppCustomizer implements WriterCustom LOG.debug("Handling Ipv4 leaves (mtu, forwarding) is not supported by VPP API. Ignoring configuration"); } - @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, - @Nonnull final Ipv4 dataBefore, @Nonnull final Ipv4 dataAfter, - @Nonnull final WriteContext writeContext) { - LOG.debug("Handling Ipv4 leaves (mtu, forwarding) is not supported by VPP API. Ignoring configuration"); - } - @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final Ipv4 dataBefore, @Nonnull final WriteContext writeContext) { diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java index af77fedaf..f8edcfb15 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4NeighbourCustomizer.java @@ -72,13 +72,6 @@ public class Ipv4NeighbourCustomizer extends FutureJVppCustomizer LOG.debug("Neighbour {} successfully written", id); } - @Override - public void updateCurrentAttributes(@Nonnull InstanceIdentifier id, @Nonnull Neighbor dataBefore, - @Nonnull Neighbor dataAfter, - @Nonnull WriteContext writeContext) throws WriteFailedException { - throw new UnsupportedOperationException("Operation not supported"); - } - @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier id, @Nonnull Neighbor data, @Nonnull WriteContext writeContext) diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java index ea1cf8d83..7c506e995 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyArpCustomizer.java @@ -54,15 +54,6 @@ public class ProxyArpCustomizer extends FutureJVppCustomizer implements WriterCu LOG.debug("Proxy ARP was successfully enabled on interface {} (id={})", swIfName, swIfIndex); } - @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, - @Nonnull final ProxyArp dataBefore, - @Nonnull final ProxyArp dataAfter, @Nonnull final WriteContext writeContext) - throws WriteFailedException { - throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, - new UnsupportedOperationException("Proxy ARP feature update is not supported.")); - } - @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final ProxyArp dataBefore, diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java index 345cef736..852959807 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/ProxyRangeCustomizer.java @@ -51,15 +51,6 @@ public class ProxyRangeCustomizer extends FutureJVppCustomizer createProxyArp(getProxyArpRequestFuture(dataAfter, (byte) 1 /* 1 is add */), id, dataAfter); } - @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, - @Nonnull final ProxyRange dataBefore, - @Nonnull final ProxyRange dataAfter, @Nonnull final WriteContext writeContext) - throws WriteFailedException { - throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, - new UnsupportedOperationException("ARP proxy range update is not supported")); - } - @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final ProxyRange dataBefore, diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java index ba744efb8..42d6b45c1 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4AddressCustomizer.java @@ -62,13 +62,6 @@ public class SubInterfaceIpv4AddressCustomizer extends FutureJVppCustomizer setAddress(true, id, dataAfter, writeContext); } - @Override - public void updateCurrentAttributes(InstanceIdentifier
id, Address dataBefore, Address dataAfter, - WriteContext writeContext) throws WriteFailedException { - throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, - new UnsupportedOperationException("Operation not supported")); - } - @Override public void deleteCurrentAttributes(InstanceIdentifier
id, Address dataBefore, WriteContext writeContext) throws WriteFailedException { diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java index 818be6d96..67454d376 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv4/subinterface/SubInterfaceIpv4NeighbourCustomizer.java @@ -67,13 +67,6 @@ public class SubInterfaceIpv4NeighbourCustomizer extends FutureJVppCustomizer LOG.debug("Neighbour {} successfully written", id); } - @Override - public void updateCurrentAttributes(@Nonnull InstanceIdentifier id, @Nonnull Neighbor dataBefore, - @Nonnull Neighbor dataAfter, - @Nonnull WriteContext writeContext) throws WriteFailedException { - throw new UnsupportedOperationException("Operation not supported"); - } - @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier id, @Nonnull Neighbor data, @Nonnull WriteContext writeContext) diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6AddressCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6AddressCustomizer.java index d6b357c90..0c66babc4 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6AddressCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6AddressCustomizer.java @@ -69,15 +69,6 @@ public class Ipv6AddressCustomizer extends FutureJVppCustomizer dataAfter.getPrefixLength().byteValue()); } - @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier
id, - @Nonnull final Address dataBefore, - @Nonnull final Address dataAfter, @Nonnull final WriteContext writeContext) - throws WriteFailedException { - throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, - new UnsupportedOperationException("Operation not supported")); - } - @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier
id, @Nonnull final Address dataBefore, diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6Customizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6Customizer.java index 6194dfd4f..7a4c427ea 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6Customizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6Customizer.java @@ -40,13 +40,6 @@ public class Ipv6Customizer extends FutureJVppCustomizer implements WriterCustom LOG.warn("Unsupported, ignoring configuration {}", dataAfter); } - @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, - @Nonnull final Ipv6 dataBefore, @Nonnull final Ipv6 dataAfter, - @Nonnull final WriteContext writeContext) { - LOG.warn("Unsupported, ignoring configuration {}", dataAfter); - } - @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final Ipv6 dataBefore, @Nonnull final WriteContext writeContext) { diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java index 2a9ef03d6..ed06ab08f 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/Ipv6NeighbourCustomizer.java @@ -71,13 +71,6 @@ public class Ipv6NeighbourCustomizer extends FutureJVppCustomizer LOG.debug("Neighbour successfully written"); } - @Override - public void updateCurrentAttributes(@Nonnull InstanceIdentifier id, @Nonnull Neighbor dataBefore, - @Nonnull Neighbor dataAfter, - @Nonnull WriteContext writeContext) throws WriteFailedException { - throw new UnsupportedOperationException("Operation not supported"); - } - @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier id, @Nonnull Neighbor dataBefore, @Nonnull WriteContext writeContext) diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizer.java index 5a57d96d4..fd7a024eb 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizer.java @@ -57,14 +57,6 @@ public final class NdProxyCustomizer extends FutureJVppCustomizer LOG.debug("ND proxy was successfully added for interface {}(id={}): {}", interfaceName, swIfIndex, dataAfter); } - @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier id, - @Nonnull final NdProxy dataBefore, @Nonnull final NdProxy dataAfter, - @Nonnull final WriteContext writeContext) throws WriteFailedException { - throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, - new UnsupportedOperationException("NdProxy update is not supported.")); - } - @Override public void deleteCurrentAttributes(@Nonnull final InstanceIdentifier id, @Nonnull final NdProxy dataBefore, diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java index 455d44777..2a066b417 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/subinterface/SubInterfaceIpv6AddressCustomizer.java @@ -48,13 +48,6 @@ public class SubInterfaceIpv6AddressCustomizer extends FutureJVppCustomizer setAddress(true, id, dataAfter, writeContext); } - @Override - public void updateCurrentAttributes(InstanceIdentifier
id, Address dataBefore, Address dataAfter, - WriteContext writeContext) throws WriteFailedException { - throw new WriteFailedException.UpdateFailedException(id, dataBefore, dataAfter, - new UnsupportedOperationException("Operation not supported")); - } - @Override public void deleteCurrentAttributes(InstanceIdentifier
id, Address dataBefore, WriteContext writeContext) throws WriteFailedException { diff --git a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java index 62818b001..fd9eb90d1 100644 --- a/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java +++ b/l3/impl/src/main/java/io/fd/hc2vpp/l3/write/ipv6/subinterface/SubInterfaceIpv6NeighbourCustomizer.java @@ -67,13 +67,6 @@ public class SubInterfaceIpv6NeighbourCustomizer extends FutureJVppCustomizer LOG.debug("Neighbour {} successfully written", id); } - @Override - public void updateCurrentAttributes(@Nonnull InstanceIdentifier id, @Nonnull Neighbor dataBefore, - @Nonnull Neighbor dataAfter, - @Nonnull WriteContext writeContext) throws WriteFailedException { - throw new UnsupportedOperationException("Operation not supported"); - } - @Override public void deleteCurrentAttributes(@Nonnull InstanceIdentifier id, @Nonnull Neighbor data, @Nonnull WriteContext writeContext) diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java index e604df478..366d181fe 100644 --- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java +++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyArpCustomizerTest.java @@ -68,7 +68,7 @@ public class ProxyArpCustomizerTest extends WriterCustomizerTest implements Byte customizer.writeCurrentAttributes(IID, data, writeContext); } - @Test(expected = WriteFailedException.UpdateFailedException.class) + @Test(expected = UnsupportedOperationException.class) public void testUpdate() throws WriteFailedException { customizer.updateCurrentAttributes(IID, data, data, writeContext); } diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java index 49f4d0bc0..bdc382c40 100644 --- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java +++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ProxyRangeCustomizerTest.java @@ -67,7 +67,7 @@ public class ProxyRangeCustomizerTest extends WriterCustomizerTest implements By customizer.writeCurrentAttributes(IID, RANGE, writeContext); } - @Test(expected = WriteFailedException.UpdateFailedException.class) + @Test(expected = UnsupportedOperationException.class) public void testUpdate() throws WriteFailedException { customizer.updateCurrentAttributes(IID, RANGE, RANGE, writeContext); } diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java index 269781319..74745c485 100644 --- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java +++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/Ipv4AddressCustomizerTest.java @@ -133,7 +133,7 @@ public class Ipv4AddressCustomizerTest extends WriterCustomizerTest { fail("WriteFailedException was expected"); } - @Test(expected = WriteFailedException.UpdateFailedException.class) + @Test(expected = UnsupportedOperationException.class) public void testUpdate() throws Exception { final Address data = mock(Address.class); customizer.updateCurrentAttributes(getAddressId(IFACE_NAME), data, data, writeContext); diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/SubInterfaceIpv4AddressCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/SubInterfaceIpv4AddressCustomizerTest.java index 6416a1d8c..24a58febe 100644 --- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/SubInterfaceIpv4AddressCustomizerTest.java +++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv4/SubInterfaceIpv4AddressCustomizerTest.java @@ -124,7 +124,7 @@ public class SubInterfaceIpv4AddressCustomizerTest extends WriterCustomizerTest return request; } - @Test(expected = WriteFailedException.UpdateFailedException.class) + @Test(expected = UnsupportedOperationException.class) public void testUpdate() throws Exception { final Address address = address(prefixLength()); customizer.updateCurrentAttributes(IID, address, address, writeContext); diff --git a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizerTest.java b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizerTest.java index bf6fe9d2c..e0e506879 100644 --- a/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizerTest.java +++ b/l3/impl/src/test/java/io/fd/hc2vpp/l3/write/ipv6/nd/NdProxyCustomizerTest.java @@ -70,7 +70,7 @@ public class NdProxyCustomizerTest extends WriterCustomizerTest { verify(api).ip6NdProxyAddDel(request); } - @Test(expected = WriteFailedException.UpdateFailedException.class) + @Test(expected = UnsupportedOperationException.class) public void testUpdate() throws WriteFailedException { final Ipv6AddressNoZone address = new Ipv6AddressNoZone("2001::2"); final NdProxy data = new NdProxyBuilder().setAddress(address).build(); -- cgit 1.2.3-korg