diff options
author | Jan Srnicek <jsrnicek@cisco.com> | 2017-08-15 11:30:28 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2017-08-16 08:18:47 +0000 |
commit | b8cf23cd61c2d3f57f9450570236534bce69232e (patch) | |
tree | 1840014acfe504fb58f81787e1ed52841453631f /acl/acl-impl | |
parent | 3a7a67fe142749eb6b41f660d101f3fdffb8b3de (diff) |
HONEYCOMB-386 - Hc2vpp Customizers update
Utilizes new default update implementation
Change-Id: I9bf8473336274ba5fcfc18804f7b414937b3708e
Signed-off-by: Jan Srnicek <jsrnicek@cisco.com>
Diffstat (limited to 'acl/acl-impl')
3 files changed, 1 insertions, 30 deletions
diff --git a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/InterfaceAclMacIpCustomizer.java b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/InterfaceAclMacIpCustomizer.java index 9f9ac5228..fc0acd223 100644 --- a/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/InterfaceAclMacIpCustomizer.java +++ b/acl/acl-impl/src/main/java/io/fd/hc2vpp/acl/write/InterfaceAclMacIpCustomizer.java @@ -56,15 +56,6 @@ public class InterfaceAclMacIpCustomizer extends FutureJVppAclCustomizer impleme } @Override - public void updateCurrentAttributes(@Nonnull final InstanceIdentifier<VppMacipAcl> id, - @Nonnull final VppMacipAcl dataBefore, - @Nonnull final VppMacipAcl 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<VppMacipAcl> id, @Nonnull final VppMacipAcl dataBefore, @Nonnull final WriteContext writeContext) throws WriteFailedException { diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/iface/acl/AclInterfaceAssignmentRequestTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/iface/acl/AclInterfaceAssignmentRequestTest.java index 3427dc7fd..fb5d61458 100644 --- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/iface/acl/AclInterfaceAssignmentRequestTest.java +++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/iface/acl/AclInterfaceAssignmentRequestTest.java @@ -115,7 +115,6 @@ public class AclInterfaceAssignmentRequestTest implements NamingContextHelper, F private void verifyVariant(final AclInterfaceAssignmentRequest request) throws WriteFailedException { verifyCreateFailsWithNullPointer(request); - verifyUpdateFailsWithNullPointer(request); verifyDeleteFailsWithNullPointer(request); } @@ -128,14 +127,6 @@ public class AclInterfaceAssignmentRequestTest implements NamingContextHelper, F } @Test - public void executeAsUpdate() throws Exception { - createValidRequest().executeAsUpdate(api, mock(Acl.class), mock(Acl.class)); - - verify(api).aclInterfaceSetAclList(requestCaptor.capture()); - verifyValidRequest(requestCaptor.getValue()); - } - - @Test public void executeAsDelete() throws Exception { create(mappingContext) .identifier(validIdentifier) @@ -190,16 +181,6 @@ public class AclInterfaceAssignmentRequestTest implements NamingContextHelper, F fail("Test should have thrown null pointer"); } - private void verifyUpdateFailsWithNullPointer(final AclInterfaceAssignmentRequest request) - throws WriteFailedException { - try { - request.executeAsUpdate(api, mock(Acl.class), mock(Acl.class)); - } catch (NullPointerException e) { - return; - } - fail("Test should have thrown null pointer"); - } - private void verifyDeleteFailsWithNullPointer(final AclInterfaceAssignmentRequest request) throws WriteFailedException { try { diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/InterfaceAclMacipCustomizerTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/InterfaceAclMacipCustomizerTest.java index 5bf66d894..b5fa649ca 100644 --- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/InterfaceAclMacipCustomizerTest.java +++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/write/InterfaceAclMacipCustomizerTest.java @@ -24,7 +24,6 @@ import io.fd.hc2vpp.acl.AclTestSchemaContext; import io.fd.hc2vpp.acl.util.AclContextManager; import io.fd.hc2vpp.common.test.write.WriterCustomizerTest; import io.fd.hc2vpp.common.translate.util.NamingContext; -import io.fd.honeycomb.translate.write.WriteFailedException; import io.fd.vpp.jvpp.acl.dto.MacipAclInterfaceAddDel; import io.fd.vpp.jvpp.acl.dto.MacipAclInterfaceAddDelReply; import io.fd.vpp.jvpp.acl.future.FutureJVppAclFacade; @@ -80,7 +79,7 @@ public class InterfaceAclMacipCustomizerTest extends WriterCustomizerTest implem verify(aclApi).macipAclInterfaceAddDel(request); } - @Test(expected = WriteFailedException.UpdateFailedException.class) + @Test(expected = UnsupportedOperationException.class) public void testUpdate() throws Exception { customizer.updateCurrentAttributes(ACL_IID, acl, acl, writeContext); } |