aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.13__UpdateBBOrchestrationStatusAutoScaleOut.sql26
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy8
-rw-r--r--bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java3
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpected.json8
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json9
-rw-r--r--bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json8
6 files changed, 56 insertions, 6 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.13__UpdateBBOrchestrationStatusAutoScaleOut.sql b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.13__UpdateBBOrchestrationStatusAutoScaleOut.sql
new file mode 100644
index 0000000000..04fc68da75
--- /dev/null
+++ b/adapters/mso-catalog-db-adapter/src/main/resources/db/migration/V4.13__UpdateBBOrchestrationStatusAutoScaleOut.sql
@@ -0,0 +1,26 @@
+use catalogdb;
+
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VNF', 'ACTIVE', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VNF', 'ASSIGNED', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VNF', 'CREATED', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VNF', 'INVENTORIED', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VNF', 'PENDING', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VNF', 'PENDING_ACTIVATION', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VNF', 'PENDING_CREATE', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VNF', 'PENDING_DELETE', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VNF', 'PRECREATED', 'CUSTOM', 'CONTINUE');
+
+
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VF_MODULE', 'ACTIVE', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VF_MODULE', 'ASSIGNED', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VF_MODULE', 'CREATED', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VF_MODULE', 'INVENTORIED', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VF_MODULE', 'PENDING', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VF_MODULE', 'PENDING_ACTIVATION', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VF_MODULE', 'PENDING_CREATE', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VF_MODULE', 'PENDING_DELETE', 'CUSTOM', 'CONTINUE');
+INSERT INTO orchestration_status_state_transition_directive(RESOURCE_TYPE, ORCHESTRATION_STATUS, TARGET_ACTION, FLOW_DIRECTIVE) VALUES('VF_MODULE', 'PRECREATED', 'CUSTOM', 'CONTINUE');
+
+update building_block_detail set resource_type = "VNF" where building_block_name = "GenericVnfHealthCheckBB";
+
+update building_block_detail set resource_type = "VF_MODULE" where building_block_name = "ConfigurationScaleOutBB"; \ No newline at end of file
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
index ae1079a9bf..909683adea 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy
@@ -159,6 +159,8 @@ class OofUtils {
utils.log("DEBUG", "Allotted Resource: " + resource.toString(),
isDebugEnabled)
def serviceResourceId = resource.getResourceId()
+ def toscaNodeType = resource.getToscaNodeType()
+ def resourceModuleName = toscaNodeType.substring(toscaNodeType.lastIndexOf(".") + 1)
def resourceModelInvariantId = resource.getModelInfo().getModelInvariantUuid()
def resourceModelVersionId = resource.getModelInfo().getModelUuid()
def resourceModelName = resource.getModelInfo().getModelName()
@@ -174,7 +176,7 @@ class OofUtils {
String demand =
" {\n" +
- " \"resourceModuleName\": \"${resourceModelName}\",\n" +
+ " \"resourceModuleName\": \"${resourceModuleName}\",\n" +
" \"serviceResourceId\": \"${serviceResourceId}\",\n" +
" \"tenantId\": \"${tenantId}\",\n" +
" \"resourceModelInfo\": {\n" +
@@ -200,6 +202,8 @@ class OofUtils {
utils.log("DEBUG", "VNF Resource: " + vnfResource.toString(),
isDebugEnabled)
ModelInfo vnfResourceModelInfo = vnfResource.getModelInfo()
+ def toscaNodeType = vnfResource.getToscaNodeType()
+ def resourceModuleName = toscaNodeType.substring(toscaNodeType.lastIndexOf(".") + 1)
def serviceResourceId = vnfResource.getResourceId()
def resourceModelInvariantId = vnfResourceModelInfo.getModelInvariantUuid()
def resourceModelName = vnfResourceModelInfo.getModelName()
@@ -212,7 +216,7 @@ class OofUtils {
String placementDemand =
" {\n" +
- " \"resourceModuleName\": \"${resourceModelName}\",\n" +
+ " \"resourceModuleName\": \"${resourceModuleName}\",\n" +
" \"serviceResourceId\": \"${serviceResourceId}\",\n" +
" \"tenantId\": \"${tenantId}\",\n" +
" \"resourceModelInfo\": {\n" +
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
index 0f52c96d0e..1e77c35ee3 100644
--- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
+++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayer.java
@@ -337,6 +337,9 @@ public class BBInputSetupMapperLayer {
context.setRequestParameters(this.mapRequestParameters(requestDetails.getRequestParameters()));
context.setUserParams(this.mapNameValueUserParams(requestDetails.getRequestParameters()));
}
+ if (requestDetails.getConfigurationParameters() != null) {
+ context.setConfigurationParameters(requestDetails.getConfigurationParameters());
+ }
return context;
}
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpected.json
index 926bf2ccb7..5eb9a26901 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpected.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/GeneralBuildingBlockExpected.json
@@ -27,7 +27,13 @@
"skip": "ignore"
}
]
- }
+ },
+ "configurationParameters": [
+ {
+ "availability-zone":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]",
+ "xtz-123":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"
+ }
+ ]
},
"orchContext": {
"is-rollback-enabled": false
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json
index dfc6d4f555..906903e0b2 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestContextExpected.json
@@ -25,6 +25,11 @@
"skip": "ignore"
}
]
- }
-
+ },
+ "configurationParameters": [
+ {
+ "availability-zone":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]",
+ "xtz-123":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"
+ }
+ ]
}
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json
index 7386828d27..9afbdd9150 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json
+++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_mapReqContext.json
@@ -23,6 +23,12 @@
}
]
- }
+ },
+ "configurationParameters": [
+ {
+ "availability-zone":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]",
+ "xtz-123":"$.vnf-topology.vnf-resource-assignments.availability-zones.availability-zone[0]"
+ }
+ ]
}