Merge "remove unused parameter in methods"
authorRob Daugherty <rd472p@att.com>
Tue, 27 Nov 2018 21:51:26 +0000 (21:51 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 27 Nov 2018 21:51:26 +0000 (21:51 +0000)
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ReplaceVnfInfra.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleInfraV2.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVnfInfra.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfCmBase.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfConfigUpdate.groovy
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/VnfInPlaceUpdate.groovy
common/src/main/java/org/onap/so/client/aai/AAIRestClientI.java
common/src/main/java/org/onap/so/client/aai/AAIRestClientImpl.java
common/src/main/java/org/onap/so/client/aai/AAIValidator.java
common/src/main/java/org/onap/so/client/aai/AAIValidatorImpl.java
common/src/test/java/org/onap/so/client/aai/AAIValidatorTest.java

index f45e97f..3a20992 100644 (file)
@@ -341,12 +341,11 @@ public class ReplaceVnfInfra extends VnfCmBase {
                msoLogger.trace('Entered ' + method)
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")
-                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId)
                        msoLogger.debug("isInMaint result: " + isInMaint)
                        execution.setVariable('isVnfInMaintenance', isInMaint)
                        
@@ -385,12 +384,11 @@ public class ReplaceVnfInfra extends VnfCmBase {
                execution.setVariable("failedActivity", "AAI")
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")                      
-                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId)
                        msoLogger.debug("areLocked result: " + areLocked)
                        execution.setVariable('arePserversLocked', areLocked)
                        
index 0972ee1..1a8df16 100644 (file)
@@ -285,9 +285,8 @@ public class UpdateVfModuleInfraV2 {
 
                System.out.println("*****************************CheckingPserverFlag*************************")
                String vnfId = (String)execution.getVariable('vnfId')
-               String uuid = (String)execution.getVariable('moduleUuid')
                AAIValidatorImpl aaiVI = new AAIValidatorImpl()
-               boolean flag = aaiVI.isPhysicalServerLocked(vnfId, uuid)
+               boolean flag = aaiVI.isPhysicalServerLocked(vnfId)
        }
 
        //check to see if the VFFlag is locked
@@ -295,9 +294,8 @@ public class UpdateVfModuleInfraV2 {
 
                System.out.print("*****************************VfFlagCheck*************************")
                String vnfId = (String)execution.getVariable('vnfId')
-               String uuid = (String)execution.getVariable('moduleUuid')
                AAIValidatorImpl aaiVI = new AAIValidatorImpl()
-               boolean flag = aaiVI.isVNFLocked(vnfId, uuid)
+               boolean flag = aaiVI.isVNFLocked(vnfId)
 
        }
        //lock the VF Flag
index 4978faf..8c1df9b 100644 (file)
@@ -321,12 +321,11 @@ public class UpdateVnfInfra extends VnfCmBase {
                msoLogger.trace('Entered ' + method)
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")
-                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId)
                        msoLogger.debug("isInMaint result: " + isInMaint)
                        execution.setVariable('isVnfInMaintenance', isInMaint)
                        
@@ -365,12 +364,11 @@ public class UpdateVnfInfra extends VnfCmBase {
                execution.setVariable("failedActivity", "AAI")
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")                      
-                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId)
                        msoLogger.debug("areLocked result: " + areLocked)
                        execution.setVariable('arePserversLocked', areLocked)
                        
index fd9d9cc..ae89fa5 100644 (file)
@@ -167,12 +167,11 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
                msoLogger.trace('Entered ' + method)
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")
-                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId)
                        msoLogger.debug("isInMaint result: " + isInMaint)
                        execution.setVariable('isVnfInMaintenance', isInMaint)
                        
@@ -355,12 +354,11 @@ public abstract class VnfCmBase extends AbstractServiceTaskProcessor {
                execution.setVariable("failedActivity", "AAI")
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")                      
-                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId)
                        msoLogger.debug("areLocked result: " + areLocked)
                        execution.setVariable('arePserversLocked', areLocked)
                        
index 8ca2871..7de3359 100644 (file)
@@ -219,12 +219,11 @@ public class VnfConfigUpdate extends VnfCmBase {
                msoLogger.trace('Entered ' + method)
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")
-                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId)
                        msoLogger.debug("isInMaint result: " + isInMaint)
                        execution.setVariable('isVnfInMaintenance', isInMaint)
                        
@@ -262,12 +261,11 @@ public class VnfConfigUpdate extends VnfCmBase {
                execution.setVariable("failedActivity", "AAI")
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")                      
-                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId)
                        msoLogger.debug("areLocked result: " + areLocked)
                        execution.setVariable('arePserversLocked', areLocked)
                        
index 2c1b66d..f6788fb 100644 (file)
@@ -240,12 +240,11 @@ public class VnfInPlaceUpdate extends VnfCmBase {
                msoLogger.trace('Entered ' + method)
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")
-                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId, transactionLoggingUuid)
+                       boolean isInMaint = aaiValidator.isVNFLocked(vnfId)
                        msoLogger.debug("isInMaint result: " + isInMaint)
                        execution.setVariable('isVnfInMaintenance', isInMaint)
 
@@ -284,12 +283,11 @@ public class VnfInPlaceUpdate extends VnfCmBase {
                execution.setVariable("failedActivity", "AAI")
 
                try {
-                       def transactionLoggingUuid = UUID.randomUUID().toString()
                        AAIRestClientImpl client = new AAIRestClientImpl()
                        AAIValidatorImpl aaiValidator = new AAIValidatorImpl()
                        aaiValidator.setClient(client)
                        def vnfId = execution.getVariable("vnfId")
-                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId, transactionLoggingUuid)
+                       boolean areLocked = aaiValidator.isPhysicalServerLocked(vnfId)
                        msoLogger.debug("areLocked result: " + areLocked)
                        execution.setVariable('arePserversLocked', areLocked)
 
index 831e438..52f15c4 100644 (file)
@@ -33,7 +33,7 @@ public interface AAIRestClientI {
        
        void updateMaintenceFlagVnfId(String vnfId, boolean inMaint, String transactionLoggingUuid) throws Exception;
        
-       GenericVnf getVnfByName(String vnfId,  String transactionLoggingUuid) throws Exception;
+       GenericVnf getVnfByName(String vnfId);
 
        Optional<Pnf> getPnfByName(String pnfId,  String transactionLoggingUuid) throws Exception;
 
index bcc7d8b..813421f 100644 (file)
@@ -75,7 +75,7 @@ public class AAIRestClientImpl implements AAIRestClientI {
     }
 
     @Override
-    public GenericVnf getVnfByName(String vnfId, String transactionLoggingUuid) {
+    public GenericVnf getVnfByName(String vnfId) {
         return new AAIResourcesClient(ENDPOINT_VERSION)
                 .get(GenericVnf.class, AAIUriFactory.createResourceUri(AAIObjectType.GENERIC_VNF, vnfId)).orElse(null);
     }
index bf6485a..18252d5 100644 (file)
@@ -24,9 +24,9 @@ import java.io.IOException;
 
 public interface AAIValidator {
        
-       boolean isPhysicalServerLocked(String hostName, String transactionLoggingUuid) throws IOException;
+       boolean isPhysicalServerLocked(String hostName) throws IOException;
        
-       boolean isVNFLocked(String vnfId, String transactionLoggingUuid) throws IOException, Exception;
+       boolean isVNFLocked(String vnfId);
        
 
 }
\ No newline at end of file
index e416da1..6ece8a2 100644 (file)
@@ -46,7 +46,7 @@ public class AAIValidatorImpl implements AAIValidator {
        }
 
        @Override
-       public boolean isPhysicalServerLocked(String vnfId, String transactionLoggingUuid) throws IOException {
+       public boolean isPhysicalServerLocked(String vnfId) throws IOException {
                List<Pserver> pservers;
                boolean isLocked = false;
                pservers = client.getPhysicalServerByVnfId(vnfId);
@@ -58,9 +58,9 @@ public class AAIValidatorImpl implements AAIValidator {
        }
 
        @Override
-       public boolean isVNFLocked(String vnfId, String transactionLoggingUuid) throws Exception {
+       public boolean isVNFLocked(String vnfId) {
                boolean isLocked = false;
-               GenericVnf genericVnf = client.getVnfByName(vnfId, transactionLoggingUuid);
+               GenericVnf genericVnf = client.getVnfByName(vnfId);
                        if (genericVnf.isInMaint())
                                isLocked = true;
 
index 63c7290..f326331 100644 (file)
@@ -66,28 +66,28 @@ public class AAIValidatorTest {
        @Test
        public void test_IsPhysicalServerLocked_True() throws IOException{              
                when(client.getPhysicalServerByVnfId(vnfName)).thenReturn(getPservers(true));
-               boolean locked = validator.isPhysicalServerLocked(vnfName, uuid);
+               boolean locked = validator.isPhysicalServerLocked(vnfName);
                assertEquals(true, locked);
        }
        
        @Test
        public void test_IsPhysicalServerLocked_False() throws IOException {
                when(client.getPhysicalServerByVnfId(vnfName)).thenReturn(getPservers(false));
-               boolean locked = validator.isPhysicalServerLocked(vnfName, uuid);
+               boolean locked = validator.isPhysicalServerLocked(vnfName);
                assertEquals(false, locked);
        }
        
        @Test
-       public void test_IsVNFLocked_False() throws Exception{
-               when(client.getVnfByName(vnfName,uuid)).thenReturn(createGenericVnfs(false));   
-               boolean locked = validator.isVNFLocked(vnfName, uuid);
+       public void test_IsVNFLocked_False() {
+               when(client.getVnfByName(vnfName)).thenReturn(createGenericVnfs(false));
+               boolean locked = validator.isVNFLocked(vnfName);
                assertEquals(false, locked);
        }
 
        @Test
-       public void test_IsVNFLocked_True() throws Exception{
-               when(client.getVnfByName(vnfName,uuid)).thenReturn(createGenericVnfs(true));    
-               boolean locked = validator.isVNFLocked(vnfName, uuid);
+       public void test_IsVNFLocked_True() {
+               when(client.getVnfByName(vnfName)).thenReturn(createGenericVnfs(true));
+               boolean locked = validator.isVNFLocked(vnfName);
                assertEquals(true,locked );
        }
 }