diff options
author | Steve Smokowski <ss835w@att.com> | 2019-01-15 16:09:53 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-01-15 16:09:53 +0000 |
commit | 6e4fe649cb76141b38fa4de2567be06131fe3d8c (patch) | |
tree | 4da514dc1d0313085d6adbe826b873bc159b8763 /common | |
parent | 219acc57ed18ad647e58b44daaabb595229caedd (diff) | |
parent | f17304361afd87a277fc657f9f458c63ed90762f (diff) |
Merge "remove unused uuid parameter"
Diffstat (limited to 'common')
6 files changed, 16 insertions, 20 deletions
diff --git a/common/src/main/java/org/onap/so/client/aai/AAIRestClientI.java b/common/src/main/java/org/onap/so/client/aai/AAIRestClientI.java index 52f15c45c4..785c82bb71 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIRestClientI.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIRestClientI.java @@ -31,7 +31,7 @@ public interface AAIRestClientI { List<Pserver> getPhysicalServerByVnfId(String vnfId) throws IOException; - void updateMaintenceFlagVnfId(String vnfId, boolean inMaint, String transactionLoggingUuid) throws Exception; + void updateMaintenceFlagVnfId(String vnfId, boolean inMaint) throws Exception; GenericVnf getVnfByName(String vnfId); diff --git a/common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java b/common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java index c11b297e97..1c02409b56 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java @@ -65,7 +65,7 @@ public class AAIRestClientImpl implements AAIRestClientI { } @Override - public void updateMaintenceFlagVnfId(String vnfId, boolean inMaint, String transactionLoggingUuid) { + public void updateMaintenceFlagVnfId(String vnfId, boolean inMaint) { GenericVnf genericVnf = new GenericVnf(); genericVnf.setInMaint(inMaint); new AAIResourcesClient() diff --git a/common/src/main/java/org/onap/so/client/aai/AAIUpdator.java b/common/src/main/java/org/onap/so/client/aai/AAIUpdator.java index 8921e4bbbe..f7c9fe8362 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIUpdator.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIUpdator.java @@ -20,12 +20,10 @@ package org.onap.so.client.aai; -import java.io.IOException; - public interface AAIUpdator { - void updateVnfToLocked(String vnfName, String uuid) throws IOException, Exception; + void updateVnfToLocked(String vnfName) throws Exception; - void updateVnfToUnLocked(String vnfName, String uuid) throws IOException, Exception; + void updateVnfToUnLocked(String vnfName) throws Exception; } diff --git a/common/src/main/java/org/onap/so/client/aai/AAIUpdatorImpl.java b/common/src/main/java/org/onap/so/client/aai/AAIUpdatorImpl.java index a971fded0e..2697e4a9e8 100644 --- a/common/src/main/java/org/onap/so/client/aai/AAIUpdatorImpl.java +++ b/common/src/main/java/org/onap/so/client/aai/AAIUpdatorImpl.java @@ -23,7 +23,6 @@ package org.onap.so.client.aai; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; - public class AAIUpdatorImpl implements AAIUpdator { @Autowired @@ -39,13 +38,13 @@ public class AAIUpdatorImpl implements AAIUpdator { } @Override - public void updateVnfToLocked(String vnfId, String uuid) throws Exception { - client.updateMaintenceFlagVnfId(vnfId, true, uuid); + public void updateVnfToLocked(String vnfId) throws Exception { + client.updateMaintenceFlagVnfId(vnfId, true); } @Override - public void updateVnfToUnLocked(String vnfId, String uuid) throws Exception { - client.updateMaintenceFlagVnfId(vnfId, false, uuid); + public void updateVnfToUnLocked(String vnfId) throws Exception { + client.updateMaintenceFlagVnfId(vnfId, false); } } diff --git a/common/src/test/java/org/onap/so/client/aai/AAIUpdatorImplTest.java b/common/src/test/java/org/onap/so/client/aai/AAIUpdatorImplTest.java index 7ba92a1f06..fdfe41f12a 100644 --- a/common/src/test/java/org/onap/so/client/aai/AAIUpdatorImplTest.java +++ b/common/src/test/java/org/onap/so/client/aai/AAIUpdatorImplTest.java @@ -41,13 +41,13 @@ public class AAIUpdatorImplTest { @Test(expected = NullPointerException.class) public void updateVnfToLockedTest() throws Exception { - test.updateVnfToLocked("vnfId","uuId"); + test.updateVnfToLocked("vnfId"); } @Test(expected = NullPointerException.class) public void updateVnfToUnLockedTest() throws Exception { - test.updateVnfToUnLocked("vnfId","uuId"); + test.updateVnfToUnLocked("vnfId"); } } diff --git a/common/src/test/java/org/onap/so/client/aai/AAIUpdatorTest.java b/common/src/test/java/org/onap/so/client/aai/AAIUpdatorTest.java index 8989d6d696..3fc97761a4 100644 --- a/common/src/test/java/org/onap/so/client/aai/AAIUpdatorTest.java +++ b/common/src/test/java/org/onap/so/client/aai/AAIUpdatorTest.java @@ -36,7 +36,6 @@ public class AAIUpdatorTest { @Mock protected AAIRestClientI client; String vnfName = "testVnf"; - String uuid = "UUID"; AAIUpdatorImpl updator; @Before @@ -47,15 +46,15 @@ public class AAIUpdatorTest { @Test public void testUpdateVnfToLocked() throws Exception{ - doNothing().when(client).updateMaintenceFlagVnfId(isA(String.class), isA(Boolean.class), isA(String.class)); - updator.updateVnfToLocked(vnfName, uuid); - verify(client, times(1)).updateMaintenceFlagVnfId(vnfName, true, uuid); + doNothing().when(client).updateMaintenceFlagVnfId(isA(String.class), isA(Boolean.class)); + updator.updateVnfToLocked(vnfName); + verify(client, times(1)).updateMaintenceFlagVnfId(vnfName, true); } @Test public void testUpdateVnfToUnLocked() throws Exception { - doNothing().when(client).updateMaintenceFlagVnfId(isA(String.class), isA(Boolean.class), isA(String.class)); - updator.updateVnfToUnLocked(vnfName, uuid); - verify(client, times(1)).updateMaintenceFlagVnfId(vnfName, false, uuid); + doNothing().when(client).updateMaintenceFlagVnfId(isA(String.class), isA(Boolean.class)); + updator.updateVnfToUnLocked(vnfName); + verify(client, times(1)).updateMaintenceFlagVnfId(vnfName, false); } }
\ No newline at end of file |