aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-03-15 12:47:18 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-15 12:47:18 +0000
commitb905d4096e2a2378b464e8a556b064bd3443548a (patch)
treef296a456d2c73e5f4e6f0a3937b9def591ac153a /bpmn/so-bpmn-tasks/src
parent3ee6e148e8763f95f0161bc666b3e8a7bdf9ee6e (diff)
parent87b1e89da514fcfdfd0af7286ad4f4c02823d904 (diff)
Merge "vfModule id should be retrieved from resourceId"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java3
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java3
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java7
4 files changed, 11 insertions, 4 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
index 877a0dded7..482957e006 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowActionBBTasks.java
@@ -368,7 +368,8 @@ public class WorkflowActionBBTasks {
ExecuteBuildingBlock ebb, List<ExecuteBuildingBlock> flowsToExecute) {
try {
String vnfId = ebb.getWorkflowResourceIds().getVnfId();
- String vfModuleId = ebb.getWorkflowResourceIds().getVfModuleId();
+ String vfModuleId = ebb.getResourceId();
+ ebb.getWorkflowResourceIds().setVfModuleId(vfModuleId);
String vnfCustomizationUUID = bbInputSetupUtils.getAAIGenericVnf(vnfId).getModelCustomizationId();
String vfModuleCustomizationUUID = bbInputSetupUtils.getAAIVfModule(vnfId, vfModuleId).getModelCustomizationId();
List<Vnfc> vnfcs = workflowAction.getRelatedResourcesInVfModule(vnfId, vfModuleId, Vnfc.class, AAIObjectType.VNFC);
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
index c8eeaa7a2b..518da1fa5f 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/aai/mapper/AAIObjectMapper.java
@@ -254,6 +254,9 @@ public class AAIObjectMapper {
map().setModelCustomizationId(source.getModelInfoConfiguration().getModelCustomizationId());
map().setModelVersionId(source.getModelInfoConfiguration().getModelVersionId());
map().setModelInvariantId(source.getModelInfoConfiguration().getModelInvariantId());
+ map().setConfigurationType(source.getModelInfoConfiguration().getConfigurationType());
+ map().setConfigurationSubType(source.getModelInfoConfiguration().getConfigurationRole());
+ map().setConfigPolicyName(source.getModelInfoConfiguration().getPolicyName());
}
});
}
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
index 3bb1d81e27..138a20b609 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/orchestration/AAIConfigurationResources.java
@@ -165,7 +165,7 @@ public class AAIConfigurationResources {
injectionHelper.getAaiClient().connect(configurationURI, vpnBindingURI);
}
- public void connectConfigurationToVfModule(String configurationId, String vfModuleId, String vnfId){
+ public void connectConfigurationToVfModule(String configurationId, String vnfId, String vfModuleId){
AAIResourceUri configurationURI = AAIUriFactory.createResourceUri(AAIObjectType.CONFIGURATION, configurationId);
AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId);
injectionHelper.getAaiClient().connect(configurationURI, vfModuleURI);
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
index a8e9a7e57e..d5b529288f 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/aai/mapper/AAIObjectMapperTest.java
@@ -74,24 +74,27 @@ public class AAIObjectMapperTest {
Configuration configuration = new Configuration();
configuration.setConfigurationId("configId");
configuration.setConfigurationName("VNR");
- configuration.setConfigurationType("VNR-TYPE");
configuration.setOrchestrationStatus(OrchestrationStatus.ASSIGNED);
configuration.setManagementOption("managementOption");
ModelInfoConfiguration modelInfoConfiguration = new ModelInfoConfiguration();
modelInfoConfiguration.setModelCustomizationId("modelCustId");
modelInfoConfiguration.setModelInvariantId("modelInvariantId");
modelInfoConfiguration.setModelVersionId("modelVersionId");
+ modelInfoConfiguration.setConfigurationType("5G");
+ modelInfoConfiguration.setConfigurationRole("ConfigurationRole");
configuration.setModelInfoConfiguration(modelInfoConfiguration);
org.onap.aai.domain.yang.Configuration expectedConfiguration = new org.onap.aai.domain.yang.Configuration();
expectedConfiguration.setConfigurationId(configuration.getConfigurationId());
expectedConfiguration.setConfigurationName(configuration.getConfigurationName());
- expectedConfiguration.setConfigurationType(configuration.getConfigurationType());
+ expectedConfiguration.setConfigurationType(configuration.getModelInfoConfiguration().getConfigurationType());
expectedConfiguration.setOrchestrationStatus(configuration.getOrchestrationStatus().toString());
expectedConfiguration.setManagementOption(configuration.getManagementOption());
expectedConfiguration.setModelInvariantId(configuration.getModelInfoConfiguration().getModelInvariantId());
expectedConfiguration.setModelVersionId(configuration.getModelInfoConfiguration().getModelVersionId());
expectedConfiguration.setModelCustomizationId(configuration.getModelInfoConfiguration().getModelCustomizationId());
+ expectedConfiguration.setConfigurationSubType(configuration.getModelInfoConfiguration().getConfigurationRole());
+ expectedConfiguration.setConfigPolicyName(configuration.getModelInfoConfiguration().getPolicyName());
org.onap.aai.domain.yang.Configuration actualConfiguration = aaiObjectMapper.mapConfiguration(configuration);