summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-catalog-db-adapter/pom.xml16
-rw-r--r--adapters/mso-openstack-adapters/pom.xml2
-rw-r--r--adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/AuditDataService.java11
-rw-r--r--adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/audit/AuditDataServiceTest.java23
-rw-r--r--adapters/mso-requests-db-adapter/pom.xml2
-rw-r--r--adapters/mso-sdnc-adapter/pom.xml2
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlockBase.java101
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java86
-rw-r--r--bpmn/so-bpmn-infrastructure-common/pom.xml2
-rw-r--r--bpmn/so-bpmn-tasks/pom.xml2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ConfigBuildingBlocksDataObject.java91
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java28
-rw-r--r--mso-api-handlers/mso-api-handler-infra/pom.xml2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java2
-rw-r--r--pom.xml4
15 files changed, 169 insertions, 205 deletions
diff --git a/adapters/mso-catalog-db-adapter/pom.xml b/adapters/mso-catalog-db-adapter/pom.xml
index 0201dd6776..bfb600f3ba 100644
--- a/adapters/mso-catalog-db-adapter/pom.xml
+++ b/adapters/mso-catalog-db-adapter/pom.xml
@@ -73,14 +73,14 @@
</plugin>
</plugins>
<pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/adapters/mso-openstack-adapters/pom.xml b/adapters/mso-openstack-adapters/pom.xml
index 9cee2882be..893f50c458 100644
--- a/adapters/mso-openstack-adapters/pom.xml
+++ b/adapters/mso-openstack-adapters/pom.xml
@@ -263,7 +263,7 @@
<artifactId>openstack4j-jersey2</artifactId>
<version>3.2.0</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.22.1</version>
diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/AuditDataService.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/AuditDataService.java
index 4e8443bf45..200f6375ea 100644
--- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/AuditDataService.java
+++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/audit/AuditDataService.java
@@ -17,6 +17,8 @@ import com.fasterxml.jackson.databind.JsonMappingException;
@Component
public class AuditDataService {
+ private static final String AUDIT_STACK_DATA = "AuditStackData";
+
@Autowired
private RequestsDbClient requestsDbClient;
@@ -30,7 +32,7 @@ public class AuditDataService {
throws JsonProcessingException {
List<RequestProcessingData> requestProcessingDataList =
requestsDbClient.getRequestProcessingDataByGroupingIdAndNameAndTag(auditInventory.getVfModuleId(),
- auditInventory.getHeatStackName(), "AuditStackData");
+ auditInventory.getHeatStackName(), AUDIT_STACK_DATA);
if (requestProcessingDataList.isEmpty()) {
GraphInventoryCommonObjectMapperProvider objectMapper = new GraphInventoryCommonObjectMapperProvider();
String auditListString = objectMapper.getMapper().writeValueAsString(auditList);;
@@ -39,7 +41,7 @@ public class AuditDataService {
requestProcessingData.setSoRequestId(auditInventory.getMsoRequestId());
requestProcessingData.setGroupingId(auditInventory.getVfModuleId());
requestProcessingData.setName(auditInventory.getHeatStackName());
- requestProcessingData.setTag("AuditStackData");
+ requestProcessingData.setTag(AUDIT_STACK_DATA);
requestProcessingData.setValue(auditListString);
requestsDbClient.saveRequestProcessingData(requestProcessingData);
@@ -53,12 +55,11 @@ public class AuditDataService {
* @throws JsonMappingException
* @throws JsonParseException
*/
- public Optional<AAIObjectAuditList> getStackDataFromRequestDb(AuditInventory auditInventory)
- throws JsonParseException, JsonMappingException, IOException {
+ public Optional<AAIObjectAuditList> getStackDataFromRequestDb(AuditInventory auditInventory) throws IOException {
List<RequestProcessingData> requestProcessingDataList =
requestsDbClient.getRequestProcessingDataByGroupingIdAndNameAndTag(auditInventory.getVfModuleId(),
- auditInventory.getHeatStackName(), "AuditStackData");
+ auditInventory.getHeatStackName(), AUDIT_STACK_DATA);
if (!requestProcessingDataList.isEmpty()) {
RequestProcessingData requestProcessingData = requestProcessingDataList.get(0);
String auditListString = requestProcessingData.getValue();
diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/audit/AuditDataServiceTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/audit/AuditDataServiceTest.java
index fd36995f3d..76e5bbc47f 100644
--- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/audit/AuditDataServiceTest.java
+++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/adapters/tasks/audit/AuditDataServiceTest.java
@@ -1,10 +1,9 @@
package org.onap.so.adapters.tasks.audit;
-import static org.junit.Assert.assertEquals;
-import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.Mockito.when;
+import static org.assertj.core.api.Assertions.assertThat;
import java.util.ArrayList;
import java.util.List;
+import java.util.Optional;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -13,7 +12,6 @@ import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.onap.aai.domain.yang.Vserver;
-import org.onap.so.adapters.tasks.audit.AuditDataService;
import org.onap.so.audit.beans.AuditInventory;
import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider;
import org.onap.so.db.request.beans.RequestProcessingData;
@@ -22,6 +20,7 @@ import org.onap.so.objects.audit.AAIObjectAudit;
import org.onap.so.objects.audit.AAIObjectAuditList;
import com.fasterxml.jackson.core.JsonProcessingException;
+
@RunWith(MockitoJUnitRunner.Silent.class)
public class AuditDataServiceTest {
@@ -56,9 +55,8 @@ public class AuditDataServiceTest {
vserver.setVserverId("testVserverId");
audit.setAaiObject(vserver);
auditList.getAuditList().add(audit);
-
GraphInventoryCommonObjectMapperProvider objectMapper = new GraphInventoryCommonObjectMapperProvider();
- String auditListString = objectMapper.getMapper().writeValueAsString(auditList);;
+ String auditListString = objectMapper.getMapper().writeValueAsString(auditList);
RequestProcessingData requestProcessingData = new RequestProcessingData();
requestProcessingData.setSoRequestId(auditInventory.getMsoRequestId());
@@ -99,4 +97,17 @@ public class AuditDataServiceTest {
"testVnfModuleId", "testVfModuleName1", "AuditStackData");
}
+ @Test
+ public void testGetStackDataToRequestDbWhenRequestProcessingDataListIsEmpty() throws Exception {
+
+ Mockito.doReturn(new ArrayList<RequestProcessingData>()).when(requestsDbClient)
+ .getRequestProcessingDataByGroupingIdAndNameAndTag(Mockito.any(), Mockito.any(), Mockito.any());
+ Optional<AAIObjectAuditList> result = auditDataService.getStackDataFromRequestDb(auditInventory);
+ Mockito.verify(requestsDbClient, Mockito.times(1)).getRequestProcessingDataByGroupingIdAndNameAndTag(
+ "testVnfModuleId", "testVfModuleName1", "AuditStackData");
+ assertThat(result).isEmpty();
+
+ }
+
+
}
diff --git a/adapters/mso-requests-db-adapter/pom.xml b/adapters/mso-requests-db-adapter/pom.xml
index ba179b6717..55e59d134e 100644
--- a/adapters/mso-requests-db-adapter/pom.xml
+++ b/adapters/mso-requests-db-adapter/pom.xml
@@ -280,7 +280,7 @@
</ignore>
</action>
</pluginExecution>
- <pluginExecution>
+ <pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
diff --git a/adapters/mso-sdnc-adapter/pom.xml b/adapters/mso-sdnc-adapter/pom.xml
index 0c320faf8a..8bc9501fbd 100644
--- a/adapters/mso-sdnc-adapter/pom.xml
+++ b/adapters/mso-sdnc-adapter/pom.xml
@@ -16,7 +16,7 @@
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
- <pluginManagement>
+ <pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlockBase.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlockBase.java
new file mode 100644
index 0000000000..5be06f9be2
--- /dev/null
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/BuildingBlockBase.java
@@ -0,0 +1,101 @@
+package org.onap.so.bpmn.servicedecomposition.entities;
+
+import java.io.Serializable;
+import org.onap.so.serviceinstancebeans.RequestDetails;
+
+public abstract class BuildingBlockBase<T extends BuildingBlockBase<T>> implements Serializable {
+
+ private static final long serialVersionUID = 4671883098039479717L;
+
+ private Boolean aLaCarte;
+ private String apiVersion;
+ private Boolean isResume;
+ private String resourceId;
+ private String requestId;
+ private String requestAction;
+ private RequestDetails requestDetails;
+ private WorkflowResourceIds workflowResourceIds;
+ private String vnfType;
+
+ public T setaLaCarte(Boolean aLaCarte) {
+ this.aLaCarte = aLaCarte;
+ return (T) this;
+ }
+
+ public T setApiVersion(String apiVersion) {
+ this.apiVersion = apiVersion;
+ return (T) this;
+ }
+
+ public T setResume(Boolean resume) {
+ isResume = resume;
+ return (T) this;
+ }
+
+ public T setResourceId(String resourceId) {
+ this.resourceId = resourceId;
+ return (T) this;
+ }
+
+ public T setRequestId(String requestId) {
+ this.requestId = requestId;
+ return (T) this;
+ }
+
+ public T setRequestAction(String requestAction) {
+ this.requestAction = requestAction;
+ return (T) this;
+ }
+
+ public T setRequestDetails(RequestDetails requestDetails) {
+ this.requestDetails = requestDetails;
+ return (T) this;
+ }
+
+ public T setWorkflowResourceIds(WorkflowResourceIds workflowResourceIds) {
+ this.workflowResourceIds = workflowResourceIds;
+ return (T) this;
+ }
+
+ public T setVnfType(String vnfType) {
+ this.vnfType = vnfType;
+ return (T) this;
+ }
+
+ public Boolean isResume() {
+ return isResume;
+ }
+
+ public String getRequestId() {
+ return requestId;
+ }
+
+ public String getApiVersion() {
+ return apiVersion;
+ }
+
+ public String getResourceId() {
+ return resourceId;
+ }
+
+ public String getRequestAction() {
+ return requestAction;
+ }
+
+ public Boolean isaLaCarte() {
+ return aLaCarte;
+ }
+
+ public String getVnfType() {
+ return vnfType;
+ }
+
+ public WorkflowResourceIds getWorkflowResourceIds() {
+ return workflowResourceIds;
+ }
+
+ public RequestDetails getRequestDetails() {
+ return requestDetails;
+ }
+
+}
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java
index abd301fa4d..e867b670b7 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/entities/ExecuteBuildingBlock.java
@@ -23,20 +23,12 @@ package org.onap.so.bpmn.servicedecomposition.entities;
import java.io.Serializable;
import org.onap.so.serviceinstancebeans.RequestDetails;
-public class ExecuteBuildingBlock implements Serializable {
+public class ExecuteBuildingBlock extends BuildingBlockBase<ExecuteBuildingBlock> implements Serializable {
- private static final long serialVersionUID = 2L;
private BuildingBlock buildingBlock;
- private String requestId;
- private String apiVersion;
- private String resourceId;
- private String requestAction;
- private String vnfType;
- private Boolean aLaCarte;
- private Boolean homing = false;
- private WorkflowResourceIds workflowResourceIds;
- private RequestDetails requestDetails;
private ConfigurationResourceKeys configurationResourceKeys;
+ private Boolean homing = false;
+ private static final long serialVersionUID = 3L;
public BuildingBlock getBuildingBlock() {
return buildingBlock;
@@ -47,60 +39,6 @@ public class ExecuteBuildingBlock implements Serializable {
return this;
}
- public String getRequestId() {
- return requestId;
- }
-
- public ExecuteBuildingBlock setRequestId(String requestId) {
- this.requestId = requestId;
- return this;
- }
-
- public String getApiVersion() {
- return apiVersion;
- }
-
- public ExecuteBuildingBlock setApiVersion(String apiVersion) {
- this.apiVersion = apiVersion;
- return this;
- }
-
- public String getResourceId() {
- return resourceId;
- }
-
- public ExecuteBuildingBlock setResourceId(String resourceId) {
- this.resourceId = resourceId;
- return this;
- }
-
- public String getRequestAction() {
- return requestAction;
- }
-
- public ExecuteBuildingBlock setRequestAction(String requestAction) {
- this.requestAction = requestAction;
- return this;
- }
-
- public Boolean isaLaCarte() {
- return aLaCarte;
- }
-
- public ExecuteBuildingBlock setaLaCarte(Boolean aLaCarte) {
- this.aLaCarte = aLaCarte;
- return this;
- }
-
- public String getVnfType() {
- return vnfType;
- }
-
- public ExecuteBuildingBlock setVnfType(String vnfType) {
- this.vnfType = vnfType;
- return this;
- }
-
public Boolean isHoming() {
return homing;
}
@@ -110,24 +48,6 @@ public class ExecuteBuildingBlock implements Serializable {
return this;
}
- public WorkflowResourceIds getWorkflowResourceIds() {
- return workflowResourceIds;
- }
-
- public ExecuteBuildingBlock setWorkflowResourceIds(WorkflowResourceIds workflowResourceIds) {
- this.workflowResourceIds = workflowResourceIds;
- return this;
- }
-
- public RequestDetails getRequestDetails() {
- return requestDetails;
- }
-
- public ExecuteBuildingBlock setRequestDetails(RequestDetails requestDetails) {
- this.requestDetails = requestDetails;
- return this;
- }
-
public ConfigurationResourceKeys getConfigurationResourceKeys() {
return configurationResourceKeys;
}
diff --git a/bpmn/so-bpmn-infrastructure-common/pom.xml b/bpmn/so-bpmn-infrastructure-common/pom.xml
index 92bf43f982..075f6f8fdd 100644
--- a/bpmn/so-bpmn-infrastructure-common/pom.xml
+++ b/bpmn/so-bpmn-infrastructure-common/pom.xml
@@ -55,7 +55,7 @@
</plugins>
<pluginManagement>
<plugins>
- <plugin>
+ <plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
diff --git a/bpmn/so-bpmn-tasks/pom.xml b/bpmn/so-bpmn-tasks/pom.xml
index dec9560574..f7a4e5e357 100644
--- a/bpmn/so-bpmn-tasks/pom.xml
+++ b/bpmn/so-bpmn-tasks/pom.xml
@@ -210,7 +210,7 @@
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
</exclusion>
- <exclusion>
+ <exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ConfigBuildingBlocksDataObject.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ConfigBuildingBlocksDataObject.java
index 1852485083..e154375d3d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ConfigBuildingBlocksDataObject.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ConfigBuildingBlocksDataObject.java
@@ -22,25 +22,22 @@ package org.onap.so.bpmn.infrastructure.workflow.tasks;
import java.util.List;
import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.onap.so.bpmn.servicedecomposition.entities.BuildingBlockBase;
import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
import org.onap.so.serviceinstancebeans.RequestDetails;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
+import java.io.Serializable;
+import java.util.List;
-public class ConfigBuildingBlocksDataObject {
+public class ConfigBuildingBlocksDataObject extends BuildingBlockBase<ConfigBuildingBlocksDataObject>
+ implements Serializable {
- private ServiceInstancesRequest sIRequest;
+ private static final long serialVersionUID = 3L;
+ private DelegateExecution execution;
private List<OrchestrationFlow> orchFlows;
- private String requestId;
private Resource resourceKey;
- private String apiVersion;
- private String resourceId;
- private String requestAction;
- private boolean aLaCarte;
- private String vnfType;
- private WorkflowResourceIds workflowResourceIds;
- private RequestDetails requestDetails;
- private DelegateExecution execution;
+ private ServiceInstancesRequest sIRequest;
public ServiceInstancesRequest getsIRequest() {
return sIRequest;
@@ -60,15 +57,6 @@ public class ConfigBuildingBlocksDataObject {
return this;
}
- public String getRequestId() {
- return requestId;
- }
-
- public ConfigBuildingBlocksDataObject setRequestId(String requestId) {
- this.requestId = requestId;
- return this;
- }
-
public Resource getResourceKey() {
return resourceKey;
}
@@ -78,69 +66,6 @@ public class ConfigBuildingBlocksDataObject {
return this;
}
- public String getApiVersion() {
- return apiVersion;
- }
-
- public ConfigBuildingBlocksDataObject setApiVersion(String apiVersion) {
- this.apiVersion = apiVersion;
- return this;
- }
-
- public String getResourceId() {
- return resourceId;
- }
-
- public ConfigBuildingBlocksDataObject setResourceId(String resourceId) {
- this.resourceId = resourceId;
- return this;
- }
-
- public String getRequestAction() {
- return requestAction;
- }
-
- public ConfigBuildingBlocksDataObject setRequestAction(String requestAction) {
- this.requestAction = requestAction;
- return this;
- }
-
- public boolean isaLaCarte() {
- return aLaCarte;
- }
-
- public ConfigBuildingBlocksDataObject setaLaCarte(boolean aLaCarte) {
- this.aLaCarte = aLaCarte;
- return this;
- }
-
- public String getVnfType() {
- return vnfType;
- }
-
- public ConfigBuildingBlocksDataObject setVnfType(String vnfType) {
- this.vnfType = vnfType;
- return this;
- }
-
- public WorkflowResourceIds getWorkflowResourceIds() {
- return workflowResourceIds;
- }
-
- public ConfigBuildingBlocksDataObject setWorkflowResourceIds(WorkflowResourceIds workflowResourceIds) {
- this.workflowResourceIds = workflowResourceIds;
- return this;
- }
-
- public RequestDetails getRequestDetails() {
- return requestDetails;
- }
-
- public ConfigBuildingBlocksDataObject setRequestDetails(RequestDetails requestDetails) {
- this.requestDetails = requestDetails;
- return this;
- }
-
public DelegateExecution getExecution() {
return execution;
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 8fdc340b54..8a4058bf01 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -177,25 +177,32 @@ public class WorkflowAction {
final String bpmnRequest = (String) execution.getVariable(BBConstants.G_BPMN_REQUEST);
ServiceInstancesRequest sIRequest =
new ObjectMapper().readValue(bpmnRequest, ServiceInstancesRequest.class);
- RequestDetails requestDetails = sIRequest.getRequestDetails();
- String uri = (String) execution.getVariable(BBConstants.G_URI);
+
final String requestId = (String) execution.getVariable(BBConstants.G_REQUEST_ID);
- final boolean aLaCarte = (boolean) execution.getVariable(BBConstants.G_ALACARTE);
+
+ String uri = (String) execution.getVariable(BBConstants.G_URI);
boolean isResume = isUriResume(uri);
- String requestAction = (String) execution.getVariable(BBConstants.G_ACTION);
+
+ final boolean isALaCarte = (boolean) execution.getVariable(BBConstants.G_ALACARTE);
+ Resource resource = getResource(bbInputSetupUtils, isResume, isALaCarte, uri, requestId);
+
WorkflowResourceIds workflowResourceIds = populateResourceIdsFromApiHandler(execution);
- Resource resource = getResource(bbInputSetupUtils, isResume, aLaCarte, uri, requestId);
+ RequestDetails requestDetails = sIRequest.getRequestDetails();
+ String requestAction = (String) execution.getVariable(BBConstants.G_ACTION);
String resourceId = getResourceId(resource, requestAction, requestDetails, workflowResourceIds);
WorkflowType resourceType = resource.getResourceType();
+
String serviceInstanceId = getServiceInstanceId(execution, resourceId, resourceType);
+
fillExecution(execution, requestDetails.getRequestInfo().getSuppressRollback(), resourceId, resourceType);
List<ExecuteBuildingBlock> flowsToExecute = new ArrayList<>();
- if (isRequestMacroServiceResume(aLaCarte, resourceType, requestAction, serviceInstanceId)) {
+
+ if (isRequestMacroServiceResume(isALaCarte, resourceType, requestAction, serviceInstanceId)) {
flowsToExecute = bbInputSetupUtils.loadOriginalFlowExecutionPath(requestId);
if (flowsToExecute == null) {
buildAndThrowException(execution, "Could not resume Macro flow. Error loading execution path.");
}
- } else if (aLaCarte && isResume) {
+ } else if (isALaCarte && isResume) {
flowsToExecute = bbInputSetupUtils.loadOriginalFlowExecutionPath(requestId);
if (flowsToExecute == null) {
buildAndThrowException(execution,
@@ -209,14 +216,13 @@ public class WorkflowAction {
final String apiVersion = (String) execution.getVariable(BBConstants.G_APIVERSION);
final String serviceType =
Optional.ofNullable((String) execution.getVariable(BBConstants.G_SERVICE_TYPE)).orElse("");
- if (aLaCarte) {
+ if (isALaCarte) {
if (orchFlows == null || orchFlows.isEmpty()) {
orchFlows = queryNorthBoundRequestCatalogDb(execution, requestAction, resourceType, true,
cloudOwner, serviceType);
}
Resource resourceKey = getResourceKey(sIRequest, resourceType);
- boolean isConfiguration = isConfiguration(orchFlows);
- if (isConfiguration && !requestAction.equalsIgnoreCase(CREATEINSTANCE)) {
+ if (isConfiguration(orchFlows) && !requestAction.equalsIgnoreCase(CREATEINSTANCE)) {
List<ExecuteBuildingBlock> configBuildingBlocks = getConfigBuildingBlocks(
new ConfigBuildingBlocksDataObject().setsIRequest(sIRequest).setOrchFlows(orchFlows)
.setRequestId(requestId).setResourceKey(resourceKey).setApiVersion(apiVersion)
@@ -320,7 +326,7 @@ public class WorkflowAction {
logger.info("Found {}", foundObjects);
if (orchFlows == null || orchFlows.isEmpty()) {
- orchFlows = queryNorthBoundRequestCatalogDb(execution, requestAction, resourceType, aLaCarte,
+ orchFlows = queryNorthBoundRequestCatalogDb(execution, requestAction, resourceType, isALaCarte,
cloudOwner, serviceType);
}
boolean vnfReplace = false;
diff --git a/mso-api-handlers/mso-api-handler-infra/pom.xml b/mso-api-handlers/mso-api-handler-infra/pom.xml
index 2f25d409d2..afb734d46e 100644
--- a/mso-api-handlers/mso-api-handler-infra/pom.xml
+++ b/mso-api-handlers/mso-api-handler-infra/pom.xml
@@ -265,7 +265,7 @@
<build>
<finalName>${project.artifactId}-${project.version}</finalName>
- <pluginManagement>
+ <pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java
index fc0048bacf..70de94a3ef 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/infra/rest/AAIDataRetrieval.java
@@ -148,7 +148,7 @@ public class AAIDataRetrieval {
}
public List<LInterface> getLinterfacesOfVnf(String vnfId) {
- DSLStartNode startNode = new DSLStartNode(AAIObjectType.GENERIC_VNF, __.key("generic-vnf-id", vnfId));
+ DSLStartNode startNode = new DSLStartNode(AAIObjectType.GENERIC_VNF, __.key("vnf-id", vnfId));
DSLQueryBuilder<Start, Node> builder = TraversalBuilder.fragment(startNode)
.to(__.node(AAIObjectType.VSERVER).to(__.node(AAIObjectType.L_INTERFACE).output()));
List<LInterface> linterfaces =
diff --git a/pom.xml b/pom.xml
index b2fd0d5898..ae743ac383 100644
--- a/pom.xml
+++ b/pom.xml
@@ -535,7 +535,7 @@
</plugins>
<pluginManagement>
<plugins>
- <plugin>
+ <plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
@@ -555,7 +555,7 @@
<execute />
</action>
</pluginExecution>
- <pluginExecution>
+ <pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>groovy-maven-plugin</artifactId>