aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy1
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy11
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy71
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn2
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVFCNetworkServiceInstance.bpmn42
-rw-r--r--docs/SO_R1_Interface.rst380
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java275
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java141
10 files changed, 436 insertions, 495 deletions
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java
index 0673af2f14..d6e249d6c1 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/VfcManager.java
@@ -380,8 +380,6 @@ public class VfcManager {
&& RequestsDbConstant.Status.FINISHED.equals(rspDesc.getStatus())) {
LOGGER.info("job result is succeeded, operType is {}", nsOperInfo.getOperType());
nsOperInfo.setErrorCode(String.valueOf(rsp.getStatus()));
- nsOperInfo.setStatusDescription(CommonConstant.StatusDesc.QUERY_JOB_STATUS_FAILED);
-
if(RequestsDbConstant.OperationType.CREATE.equalsIgnoreCase(nsOperInfo.getOperType())) {
nsOperInfo.setStatus(RequestsDbConstant.Status.FINISHED);
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
index 447fa63baf..3943e30211 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteSDNCNetworkResource.groovy
@@ -80,7 +80,7 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
//Deal with recipeParams
String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
- String resourceName = resourceInputObj.getResourceInstanceName()
+ String resourceModelName = resourceInputObj.getResourceModelInfo().getModelName()
//For sdnc requestAction default is "NetworkInstance"
String operationType = "Network"
if(!StringUtils.isBlank(recipeParamsFromRequest)){
@@ -95,12 +95,12 @@ public class DeleteSDNCNetworkResource extends AbstractServiceTaskProcessor {
//For sdnc, generate svc_action and request_action
String sdnc_svcAction = "delete"
- if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "overlay")){
+ if(StringUtils.containsIgnoreCase(resourceModelName, "overlay")){
//This will be resolved in R3.
sdnc_svcAction ="deactivate"
operationType = "NCINetwork"
}
- if(StringUtils.containsIgnoreCase(resourceInputObj.getResourceInstanceName(), "underlay")){
+ if(StringUtils.containsIgnoreCase(resourceModelName, "underlay")){
//This will be resolved in R3.
operationType ="Network"
}
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
index 9ebd1fa0ba..72b88cb13d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DeleteVFCNSResource.groovy
@@ -58,6 +58,7 @@ public class DeleteVFCNSResource extends AbstractServiceTaskProcessor {
}
public void postProcessRequest (DelegateExecution execution) {
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** start postProcessRequest *****", isDebugEnabled)
utils.log("INFO"," ***** end postProcessRequest *****", isDebugEnabled)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
index 8508f07765..92e7fdded5 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteResourcesV1.groovy
@@ -313,12 +313,11 @@ public class DoDeleteResourcesV1 extends AbstractServiceTaskProcessor {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
utils.log("INFO"," ***** prepareServiceTopologyDeletion " + " *****", isDebugEnabled)
- ModelInfo serviceModelInfo = execution.getVariable("serviceModelInfo")
-
- execution.setVariable("modelInvariantUuid", serviceModelInfo.getModelInvariantUuid())
- execution.setVariable("modelVersion", serviceModelInfo.getModelVersion())
- execution.setVariable("modelUuid", serviceModelInfo.getModelUuid())
- execution.setVariable("serviceModelName", serviceModelInfo.getModelName())
+ ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
+ execution.setVariable("modelInvariantUuid", serviceDecomposition.getModelInfo().getModelInvariantUuid())
+ execution.setVariable("modelVersion", serviceDecomposition.getModelInfo().getModelVersion())
+ execution.setVariable("modelUuid", serviceDecomposition.getModelInfo().getModelUuid())
+ execution.setVariable("serviceModelName", serviceDecomposition.getModelInfo().getModelName())
// set operation type and resource type is required to form request body
execution.setVariable("operationType", "DELETE")
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
index c71cb0521e..f0ecbab82c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoDeleteVFCNetworkServiceInstance.groovy
@@ -20,7 +20,7 @@
package org.openecomp.mso.bpmn.infrastructure.scripts;
-import static org.apache.commons.lang3.StringUtils.*;
+import static org.apache.commons.lang3.StringUtils.*
import groovy.xml.XmlUtil
import groovy.json.*
import org.openecomp.mso.bpmn.common.scripts.AbstractServiceTaskProcessor
@@ -39,6 +39,10 @@ import org.springframework.web.util.UriUtils
import org.openecomp.mso.rest.RESTClient
import org.openecomp.mso.rest.RESTConfig
import org.openecomp.mso.rest.APIResponse;
+import org.openecomp.mso.rest.RESTConfig
+import org.openecomp.mso.rest.RESTClient
+
+
/**
* This groovy class supports the <class>DoDeleteVFCNetworkServiceInstance.bpmn</class> process.
@@ -99,6 +103,71 @@ public class DoDeleteVFCNetworkServiceInstance extends AbstractServiceTaskProces
}
/**
+ * unwind NS from AAI relationship
+ */
+ public void deleteNSRelationship(DelegateExecution execution) {
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO"," ***** addNSRelationship *****", isDebugEnabled)
+ String nsInstanceId = execution.getVariable("resourceInstanceId")
+ if(nsInstanceId == null || nsInstanceId == ""){
+ utils.log("INFO"," Delete NS failed", isDebugEnabled)
+ return
+ }
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ String serviceType = execution.getVariable("serviceType")
+ String serviceId = execution.getVariable("serviceId")
+ String deleteRelationPayload = """<relationship xmlns="http://org.openecomp.aai.inventory/v11">
+ <related-to>service-instance</related-to>
+ <related-link>/aai/v11/business/customers/customer/${globalSubscriberId}/service-subscriptions/service-subscription/${serviceType}/service-instances/service-instance/${nsInstanceId}</related-link>
+ <relationship-data>
+ <relationship-key>customer.global-customer-id</relationship-key>
+ <relationship-value>${globalSubscriberId}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-subscription.service-type</relationship-key>
+ <relationship-value>${serviceType}</relationship-value>
+ </relationship-data>
+ <relationship-data>
+ <relationship-key>service-instance.service-instance-id</relationship-key>
+ <relationship-value>${nsInstanceId}</relationship-value>
+ </relationship-data>
+ </relationship>"""
+ String endpoint = execution.getVariable("URN_aai_endpoint")
+ utils.log("INFO","Add Relationship req:\n" + deleteRelationPayload, isDebugEnabled)
+ String url = endpoint + "/aai/v11/business/customers/customer/" + globalSubscriberId + "/service-subscriptions/service-subscription/" + serviceType + "/service-instances/service-instance/" + serviceId + "/relationship-list/relationship"
+
+ APIResponse aaiRsp = executeAAIDeleteCall(execution, url, deleteRelationPayload)
+ utils.log("INFO","aai response status code:" + aaiRsp.getStatusCode(), isDebugEnabled)
+ utils.log("INFO","aai response content:" + aaiRsp.getResponseBodyAsString(), isDebugEnabled)
+ utils.log("INFO"," *****Exit addNSRelationship *****", isDebugEnabled)
+ }
+
+ public APIResponse executeAAIDeleteCall(DelegateExecution execution, String url, String payload){
+ def isDebugEnabled = execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", " ======== Started Execute AAI Delete Process ======== ", isDebugEnabled)
+ APIResponse apiResponse = null
+ try{
+ String uuid = utils.getRequestID()
+ utils.log("INFO","Generated uuid is: " + uuid, isDebugEnabled)
+ utils.log("INFO","URL to be used is: " + url, isDebugEnabled)
+ String userName = execution.getVariable("URN_aai_auth")
+ String password = execution.getVariable("URN_mso_msoKey")
+ String basicAuthCred = utils.getBasicAuth(userName,password)
+ RESTConfig config = new RESTConfig(url);
+ RESTClient client = new RESTClient(config).addHeader("X-FromAppId", "MSO").addHeader("X-TransactionId", uuid).addHeader("Content-Type", "application/xml").addHeader("Accept","application/xml");
+ if (basicAuthCred != null && !"".equals(basicAuthCred)) {
+ client.addAuthorizationHeader(basicAuthCred)
+ }
+ apiResponse = client.httpDelete(payload)
+ utils.log("INFO","======== Completed Execute AAI Delete Process ======== ", isDebugEnabled)
+ }catch(Exception e){
+ utils.log("ERROR","Exception occured while executing AAI Put Call. Exception is: \n" + e, isDebugEnabled)
+ throw new BpmnError("MSOWorkflowException")
+ }
+ return apiResponse
+ }
+
+ /**
* delete NS task
*/
public void deleteNetworkService(DelegateExecution execution) {
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn
index d7a4bba1dd..280ee85128 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/DeleteVFCNSResource.bpmn
@@ -35,6 +35,8 @@ ddsi.postProcessRequest(execution)]]></bpmn:script>
<camunda:in source="resourceInstanceId" target="resourceInstanceId" />
<camunda:in source="resourceType" target="resourceType" />
<camunda:in source="operationType" target="operationType" />
+ <camunda:out source="operationStatus" target="operationStatus" />
+ <camunda:out source="nsInstanceId" target="nsInstanceId" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_00vpfm3</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1s4cyms</bpmn:outgoing>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVFCNetworkServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVFCNetworkServiceInstance.bpmn
index 3cef94d6ea..41b8d2e7aa 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVFCNetworkServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoDeleteVFCNetworkServiceInstance.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3">
<bpmn:process id="DoDeleteVFCNetworkServiceInstance" name="DoDeleteVFCNetworkServiceInstance" isExecutable="true">
<bpmn:startEvent id="deleteNS_StartEvent" name="deleteNS_StartEvent">
<bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
@@ -20,7 +20,7 @@ def dcsi = new DoDeleteVFCNetworkServiceInstance()
dcsi.preProcessRequest(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:scriptTask id="terminate_NSTask" name="terminate Network Service" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_150q0fo</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1h1c24p</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ywe21t</bpmn:outgoing>
<bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
def dcsi = new DoDeleteVFCNetworkServiceInstance()
@@ -91,11 +91,19 @@ def dcsi = new DoDeleteVFCNetworkServiceInstance()
dcsi.timeDelay(execution)]]></bpmn:script>
</bpmn:scriptTask>
<bpmn:sequenceFlow id="SequenceFlow_1gsbpxj" sourceRef="timeDelay_Task" targetRef="queryJob_Task" />
- <bpmn:sequenceFlow id="SequenceFlow_150q0fo" sourceRef="PreprocessIncomingRequest_task" targetRef="terminate_NSTask" />
+ <bpmn:sequenceFlow id="SequenceFlow_150q0fo" sourceRef="PreprocessIncomingRequest_task" targetRef="deleteNSRelationship" />
<bpmn:sequenceFlow id="SequenceFlow_1sjop71" sourceRef="Task_09nzhwk" targetRef="ExclusiveGateway_0zfksms" />
<bpmn:sequenceFlow id="deleteNSSuccess_SequenceFlow" name="yes" sourceRef="ExclusiveGateway_0zfksms" targetRef="finishNSDelete_Task">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[#{(execution.getVariable("operationStatus" ) == "finished")}]]></bpmn:conditionExpression>
</bpmn:sequenceFlow>
+ <bpmn:sequenceFlow id="SequenceFlow_1h1c24p" sourceRef="deleteNSRelationship" targetRef="terminate_NSTask" />
+ <bpmn:scriptTask id="deleteNSRelationship" name="Delete NS Relationship " scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_150q0fo</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_1h1c24p</bpmn:outgoing>
+ <bpmn:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*
+def dcsi = new DoDeleteVFCNetworkServiceInstance()
+dcsi.deleteNSRelationship(execution)]]></bpmn:script>
+ </bpmn:scriptTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteVFCNetworkServiceInstance">
@@ -107,19 +115,19 @@ dcsi.timeDelay(execution)]]></bpmn:script>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
<di:waypoint xsi:type="dc:Point" x="211" y="129" />
- <di:waypoint xsi:type="dc:Point" x="407" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="321" y="129" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="264" y="108" width="90" height="12" />
+ <dc:Bounds x="221" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1dw39hg_di" bpmnElement="Task_09nzhwk">
<dc:Bounds x="722" y="555" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
- <dc:Bounds x="407" y="89" width="100" height="80" />
+ <dc:Bounds x="321" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1qmmew8_di" bpmnElement="terminate_NSTask">
- <dc:Bounds x="694" y="89" width="100" height="80" />
+ <dc:Bounds x="744" y="89" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0zfksms_di" bpmnElement="ExclusiveGateway_0zfksms" isMarkerVisible="true">
<dc:Bounds x="517" y="570" width="50" height="50" />
@@ -141,10 +149,10 @@ dcsi.timeDelay(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1ywe21t_di" bpmnElement="SequenceFlow_1ywe21t">
- <di:waypoint xsi:type="dc:Point" x="794" y="128" />
+ <di:waypoint xsi:type="dc:Point" x="844" y="129" />
<di:waypoint xsi:type="dc:Point" x="1034" y="130" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="869" y="108" width="90" height="12" />
+ <dc:Bounds x="894" y="108.5" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0j7xo94_di" bpmnElement="terminateFailed_SequenceFlow">
@@ -232,10 +240,10 @@ dcsi.timeDelay(execution)]]></bpmn:script>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_150q0fo_di" bpmnElement="SequenceFlow_150q0fo">
- <di:waypoint xsi:type="dc:Point" x="507" y="129" />
- <di:waypoint xsi:type="dc:Point" x="694" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="421" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="523" y="129" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="600.5" y="108" width="0" height="12" />
+ <dc:Bounds x="427" y="108" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1sjop71_di" bpmnElement="SequenceFlow_1sjop71">
@@ -252,6 +260,16 @@ dcsi.timeDelay(execution)]]></bpmn:script>
<dc:Bounds x="460" y="574" width="19" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1h1c24p_di" bpmnElement="SequenceFlow_1h1c24p">
+ <di:waypoint xsi:type="dc:Point" x="623" y="129" />
+ <di:waypoint xsi:type="dc:Point" x="744" y="129" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="683.5" y="108" width="0" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_11l4g48_di" bpmnElement="deleteNSRelationship">
+ <dc:Bounds x="523" y="89" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/docs/SO_R1_Interface.rst b/docs/SO_R1_Interface.rst
index 0041fc6703..df68005d80 100644
--- a/docs/SO_R1_Interface.rst
+++ b/docs/SO_R1_Interface.rst
@@ -76,6 +76,17 @@ ModelInfo Object
+-------------------------+------------------+-------------------------------------------------+
|ModelCustomization Name |String |The Model Customization name |
+-------------------------+------------------+-------------------------------------------------+
+|modelCustomizationUuid |String |The Model Customization UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelVersionId |String |The Model version id |
++-------------------------+------------------+-------------------------------------------------+
+|modelUuid |String |The Model UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInvariantUuid |String |The Model Invariant UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInstanceName |String |The Model Instance name |
++-------------------------+------------------+-------------------------------------------------+
+
SubscriberInfo Object
@@ -92,13 +103,25 @@ RequestInfo Object
+-------------------------+------------------+-------------------------------------------------+
|Attribute |Content |Description |
+=========================+==================+=================================================+
-|InstanceName |String |The instance Name |
+|Source |String |source of the request |
+-------------------------+------------------+-------------------------------------------------+
-|ProductFamilyId |String |The product family Id. |
+|billingAccountNumber |String |billingAccountNumber of the request |
+-------------------------+------------------+-------------------------------------------------+
-|Source |String |source of the request |
+|callbackUrl |String |callbackUrl of the request |
+-------------------------+------------------+-------------------------------------------------+
-|SuppressRollback |Boolean |SuppressRollback |
+|correlator |String |correlator of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderNumber |String |orderNumber of the request |
++-------------------------+------------------+-------------------------------------------------+
+|productFamilyId |String |productFamilyId of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderVersion |String |orderVersion of the request |
++-------------------------+------------------+-------------------------------------------------+
+|instanceName |String |instanceName of the request |
++-------------------------+------------------+-------------------------------------------------+
+|suppressRollback |String |suppressRollback of the request |
++-------------------------+------------------+-------------------------------------------------+
+|requestorId |String |requestorId of the request |
+-------------------------+------------------+-------------------------------------------------+
RequestParameters Object
@@ -110,6 +133,20 @@ RequestParameters Object
+-------------------------+------------------+-------------------------------------------------+
|UserParams |Array |The product family Id. |
+-------------------------+------------------+-------------------------------------------------+
+|aLaCarte |Boolean | aLaCarte |
++-------------------------+------------------+-------------------------------------------------+
+|autoBuildVfModules |Boolean |autoBuildVfModules |
++-------------------------+------------------+-------------------------------------------------+
+|cascadeDelete |Boolean |cascadeDelete |
++-------------------------+------------------+-------------------------------------------------+
+|usePreload |Boolean |usePreload |
++-------------------------+------------------+-------------------------------------------------+
+|rebuildVolumeGroups |Boolean |rebuildVolumeGroups |
++-------------------------+------------------+-------------------------------------------------+
+|payload |String |payload |
++-------------------------+------------------+-------------------------------------------------+
+|controllerType |String |controllerType |
++-------------------------+------------------+-------------------------------------------------+
UserParams Object
@@ -121,13 +158,58 @@ UserParams Object
|value |String |Value of the tag |
+-------------------------+------------------+-------------------------------------------------+
+CloudConfiguration Object
+
++-------------------------+------------------+-------------------------------------------------+
+|Attribute |Content |Description |
++=========================+==================+=================================================+
+|lcpCloudRegionId |String |CloudRegion Id (in A&AI) |
++-------------------------+------------------+-------------------------------------------------+
+|tenantId |String |Name of the Subscriber |
++-------------------------+------------------+-------------------------------------------------+
+|aicNodeClli |String |aicNodeClli property |
++-------------------------+------------------+-------------------------------------------------+
+
+Project Object
+
++-------------------------+------------------+-------------------------------------------------+
+|Attribute |Content |Description |
++=========================+==================+=================================================+
+|projectName |String |Name of the project |
++-------------------------+------------------+-------------------------------------------------+
+
+OwningEntity Object
+
++-------------------------+------------------+-------------------------------------------------+
+|Attribute |Content |Description |
++=========================+==================+=================================================+
+|owningEntityId |String |owningEntityId of the owingEntity |
++-------------------------+------------------+-------------------------------------------------+
+|owningEntityName |String |owningEntityName of the owingEntity |
++-------------------------+------------------+-------------------------------------------------+
+
+Platform Object
+
++-------------------------+------------------+-------------------------------------------------+
+|Attribute |Content |Description |
++=========================+==================+=================================================+
+|platformName |String |Platform Name |
++-------------------------+------------------+-------------------------------------------------+
+
+LineOfBusiness Object
++-------------------------+------------------+-------------------------------------------------+
+|Attribute |Content |Description |
++=========================+==================+=================================================+
+|lineOfBusinessName |String |Line Of Business Name |
++-------------------------+------------------+-------------------------------------------------+
+
Delete service instance
++++++++++++++++++++++++
+--------------------+---------------------------------------------------------+
|Interface Definition|Description |
+====================+=========================================================+
-|URI |{serverRoot}/serviceInstances/v2/{serviceInstanceId} |
+|URI |{serverRoot}/serviceInstances/v4/{serviceInstanceId} |
+--------------------+---------------------------------------------------------+
|Operation Type |DELETE |
+--------------------+---------------------------------------------------------+
@@ -180,7 +262,7 @@ Create Volume Group
+--------------------+-------------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+===========================================================================================+
-|URI |{serverRoot}/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups |
+|URI |{serverRoot}/serviceInstances/v4/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups |
+--------------------+-------------------------------------------------------------------------------------------+
|Operation Type |POST |
+--------------------+-------------------------------------------------------------------------------------------+
@@ -197,17 +279,29 @@ Request Body:
RequestDetails Object
-+---------------------+-------------------------+-------------------------------------------------+
-|Attribute |Content |Description |
-+=====================+=========================+=================================================+
-|modelInfo |modelInfo Object |Content of modelInfo object. |
-+---------------------+-------------------------+-------------------------------------------------+
-|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. |
-+---------------------+-------------------------+-------------------------------------------------+
-|requestInfo |requestInfo Object |Content of requestInfo object. |
-+---------------------+-------------------------+-------------------------------------------------+
-|relatedInstanceList |List |Content of relatedInstanceList. |
-+---------------------+-------------------------+-------------------------------------------------+
++-------------------+--------------------------+-------------------------------------------------+
+|Attribute |Content |Description |
++===================+==========================+=================================================+
+|modelInfo |modelInfo Object |Content of modelInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|requestInfo |requestInfo Object |Content of requestInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|requestParameters |requestParameters Object |Content of requestParameters object. |
++-------------------+--------------------------+-------------------------------------------------+
+|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. |
++-------------------+--------------------------+-------------------------------------------------+
+|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. |
++-------------------+--------------------------+-------------------------------------------------+
+|project |project Object |Content of project object. |
++-------------------+--------------------------+-------------------------------------------------+
+|owningEntity |owningEntity Object |Content of owningEntity object. |
++-------------------+--------------------------+-------------------------------------------------+
+|platform |platform Object |Content of platform object. |
++-------------------+--------------------------+-------------------------------------------------+
+|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. |
++-------------------+--------------------------+-------------------------------------------------+
ModelInfo Object
@@ -226,6 +320,16 @@ ModelInfo Object
+-------------------------+------------------+-------------------------------------------------+
|ModelCustomization Name |String |The Model Customization name |
+-------------------------+------------------+-------------------------------------------------+
+|modelCustomizationUuid |String |The Model Customization UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelVersionId |String |The Model version id |
++-------------------------+------------------+-------------------------------------------------+
+|modelUuid |String |The Model UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInvariantUuid |String |The Model Invariant UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInstanceName |String |The Model Instance name |
++-------------------------+------------------+-------------------------------------------------+
CloudConfiguration Object
@@ -236,17 +340,33 @@ CloudConfiguration Object
+-------------------------+------------------+-------------------------------------------------+
|tenantId |String |Name of the Subscriber |
+-------------------------+------------------+-------------------------------------------------+
+|aicNodeClli |String |aicNodeClli property |
++-------------------------+------------------+-------------------------------------------------+
RequestInfo Object
+-------------------------+------------------+-------------------------------------------------+
|Attribute |Content |Description |
+=========================+==================+=================================================+
-|InstanceName |String |The instance Name |
-+-------------------------+------------------+-------------------------------------------------+
|Source |String |source of the request |
+-------------------------+------------------+-------------------------------------------------+
-|SuppressRollback |Boolean |SuppressRollback |
+|billingAccountNumber |String |billingAccountNumber of the request |
++-------------------------+------------------+-------------------------------------------------+
+|callbackUrl |String |callbackUrl of the request |
++-------------------------+------------------+-------------------------------------------------+
+|correlator |String |correlator of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderNumber |String |orderNumber of the request |
++-------------------------+------------------+-------------------------------------------------+
+|productFamilyId |String |productFamilyId of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderVersion |String |orderVersion of the request |
++-------------------------+------------------+-------------------------------------------------+
+|instanceName |String |instanceName of the request |
++-------------------------+------------------+-------------------------------------------------+
+|suppressRollback |String |suppressRollback of the request |
++-------------------------+------------------+-------------------------------------------------+
+|requestorId |String |requestorId of the request |
+-------------------------+------------------+-------------------------------------------------+
relatedInstance List
@@ -273,7 +393,7 @@ Delete Volume Group
+--------------------+---------------------------------------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+=====================================================================================================================+
-|URI |{serverRoot}/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volume-groupinstance-id} |
+|URI |{serverRoot}/serviceInstances/v4/{serviceInstanceId}/vnfs/{vnfInstanceId}/volumeGroups/{volume-groupinstance-id} |
+--------------------+---------------------------------------------------------------------------------------------------------------------+
|Operation Type |DELETE |
+--------------------+---------------------------------------------------------------------------------------------------------------------+
@@ -334,7 +454,7 @@ Create VF Module
+--------------------+----------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+========================================================================================+
-|URI |{serverRoot}/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules |
+|URI |{serverRoot}/serviceInstances/v4/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules |
+--------------------+----------------------------------------------------------------------------------------+
|Operation Type |POST |
+--------------------+----------------------------------------------------------------------------------------+
@@ -429,7 +549,7 @@ Delete VF Module
+--------------------+--------------------------------------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+==============================================================================================================+
-|URI |{serverRoot}/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleinstance-id} |
+|URI |{serverRoot}/serviceInstances/v4/{serviceInstanceId}/vnfs/{vnfInstanceId}/vfModules/{vfmoduleinstance-id} |
+--------------------+--------------------------------------------------------------------------------------------------------------+
|Operation Type |DELETE |
+--------------------+--------------------------------------------------------------------------------------------------------------+
@@ -498,7 +618,7 @@ Create VNF
+--------------------+--------------------------------------------------------------+
|Interface Definition|Description |
+====================+==============================================================+
-|URI |{serverRoot}/serviceInstances/v2/{serviceInstanceId}/vnfs |
+|URI |{serverRoot}/serviceInstances/v4/{serviceInstanceId}/vnfs |
+--------------------+--------------------------------------------------------------+
|Operation Type |POST |
+--------------------+--------------------------------------------------------------+
@@ -515,19 +635,29 @@ Request Body:
RequestDetails Object
-+---------------------+-------------------------+-------------------------------------------------+
-|Attribute |Content |Description |
-+=====================+=========================+=================================================+
-|modelInfo |modelInfo Object |Content of modelInfo object. |
-+---------------------+-------------------------+-------------------------------------------------+
-|cloudConfiguration |cloudConfiguration Object|Content of cloudConfiguration object. |
-+---------------------+-------------------------+-------------------------------------------------+
-|requestInfo |requestInfo Object |Content of requestInfo object. |
-+---------------------+-------------------------+-------------------------------------------------+
-|relatedInstanceList |List |Content of relatedInstanceList. |
-+---------------------+-------------------------+-------------------------------------------------+
-|requestParameters |requestParameters Object |Content of requestParameters object. |
-+---------------------+-------------------------+-------------------------------------------------+
++-------------------+--------------------------+-------------------------------------------------+
+|Attribute |Content |Description |
++===================+==========================+=================================================+
+|modelInfo |modelInfo Object |Content of modelInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|requestInfo |requestInfo Object |Content of requestInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|requestParameters |requestParameters Object |Content of requestParameters object. |
++-------------------+--------------------------+-------------------------------------------------+
+|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. |
++-------------------+--------------------------+-------------------------------------------------+
+|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. |
++-------------------+--------------------------+-------------------------------------------------+
+|project |project Object |Content of project object. |
++-------------------+--------------------------+-------------------------------------------------+
+|owningEntity |owningEntity Object |Content of owningEntity object. |
++-------------------+--------------------------+-------------------------------------------------+
+|platform |platform Object |Content of platform object. |
++-------------------+--------------------------+-------------------------------------------------+
+|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. |
++-------------------+--------------------------+-------------------------------------------------+
ModelInfo Object
@@ -546,6 +676,16 @@ ModelInfo Object
+-------------------------+------------------+-------------------------------------------------+
|ModelCustomization Name |String |The Model Customization name |
+-------------------------+------------------+-------------------------------------------------+
+|modelCustomizationUuid |String |The Model Customization UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelVersionId |String |The Model version id |
++-------------------------+------------------+-------------------------------------------------+
+|modelUuid |String |The Model UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInvariantUuid |String |The Model Invariant UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInstanceName |String |The Model Instance name |
++-------------------------+------------------+-------------------------------------------------+
CloudConfiguration Object
@@ -562,13 +702,25 @@ RequestInfo Object
+-------------------------+------------------+-------------------------------------------------+
|Attribute |Content |Description |
+=========================+==================+=================================================+
-|InstanceName |String |The instance Name |
+|Source |String |source of the request |
+-------------------------+------------------+-------------------------------------------------+
-|ProductFamilyId |String |The product family Id. |
+|billingAccountNumber |String |billingAccountNumber of the request |
+-------------------------+------------------+-------------------------------------------------+
-|Source |String |source of the request |
+|callbackUrl |String |callbackUrl of the request |
+-------------------------+------------------+-------------------------------------------------+
-|SuppressRollback |Boolean |SuppressRollback |
+|correlator |String |correlator of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderNumber |String |orderNumber of the request |
++-------------------------+------------------+-------------------------------------------------+
+|productFamilyId |String |productFamilyId of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderVersion |String |orderVersion of the request |
++-------------------------+------------------+-------------------------------------------------+
+|instanceName |String |instanceName of the request |
++-------------------------+------------------+-------------------------------------------------+
+|suppressRollback |String |suppressRollback of the request |
++-------------------------+------------------+-------------------------------------------------+
+|requestorId |String |requestorId of the request |
+-------------------------+------------------+-------------------------------------------------+
relatedInstance List
@@ -613,7 +765,7 @@ Delete VNF
+--------------------+------------------------------------------------------------------------------+
|Interface Definition|Description |
+====================+==============================================================================+
-|URI |{serverRoot}/serviceInstances/v2/{serviceInstanceId}/vnfs/{vnfInstanceId} |
+|URI |{serverRoot}/serviceInstances/v4/{serviceInstanceId}/vnfs/{vnfInstanceId} |
+--------------------+------------------------------------------------------------------------------+
|Operation Type |DELETE |
+--------------------+------------------------------------------------------------------------------+
@@ -694,7 +846,7 @@ GET Orchestration Request
+--------------------+--------------------------------------------------------------+
|Interface Definition|Description |
+====================+==============================================================+
-|URI |{serverRoot}/orchestrationRequests/v2/{request-id} |
+|URI |{serverRoot}/orchestrationRequests/v4/{request-id} |
+--------------------+--------------------------------------------------------------+
|Operation Type |GET |
+--------------------+--------------------------------------------------------------+
@@ -718,8 +870,6 @@ Request Object
+-------------------+---------+-----------+--------------------------+-------------------------------------------+
|startTime |M |1 |request Object |Start time. |
+-------------------+---------+-----------+--------------------------+-------------------------------------------+
-|serviceInstanceId |M |1 |request Object |Service Instance id. |
-+-------------------+---------+-----------+--------------------------+-------------------------------------------+
|requestScope |M |1 |request Object |Scope of the request. |
+-------------------+---------+-----------+--------------------------+-------------------------------------------+
|requestType |M |1 |request Object |Type of the request. |
@@ -731,17 +881,29 @@ Request Object
RequestDetails Object
-+-------------------+-------------------------+-------------------------------------------------+
-|Attribute |Content |Description |
-+===================+=========================+=================================================+
-|modelInfo |modelInfo Object |Content of modelInfo object. |
-+-------------------+-------------------------+-------------------------------------------------+
-|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. |
-+-------------------+-------------------------+-------------------------------------------------+
-|requestInfo |requestInfo Object |Content of requestInfo object. |
-+-------------------+-------------------------+-------------------------------------------------+
-|requestParameters |requestParameters Object |Content of requestParameters object. |
-+-------------------+-------------------------+-------------------------------------------------+
++-------------------+--------------------------+-------------------------------------------------+
+|Attribute |Content |Description |
++===================+==========================+=================================================+
+|modelInfo |modelInfo Object |Content of modelInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|requestInfo |requestInfo Object |Content of requestInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|requestParameters |requestParameters Object |Content of requestParameters object. |
++-------------------+--------------------------+-------------------------------------------------+
+|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. |
++-------------------+--------------------------+-------------------------------------------------+
+|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. |
++-------------------+--------------------------+-------------------------------------------------+
+|project |project Object |Content of project object. |
++-------------------+--------------------------+-------------------------------------------------+
+|owningEntity |owningEntity Object |Content of owningEntity object. |
++-------------------+--------------------------+-------------------------------------------------+
+|platform |platform Object |Content of platform object. |
++-------------------+--------------------------+-------------------------------------------------+
+|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. |
++-------------------+--------------------------+-------------------------------------------------+
ModelInfo Object
@@ -758,6 +920,18 @@ ModelInfo Object
+-------------------------+------------------+-------------------------------------------------+
|ModelVersion |String |Version of the model |
+-------------------------+------------------+-------------------------------------------------+
+|ModelCustomization Name |String |The Model Customization name |
++-------------------------+------------------+-------------------------------------------------+
+|modelCustomizationUuid |String |The Model Customization UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelVersionId |String |The Model version id |
++-------------------------+------------------+-------------------------------------------------+
+|modelUuid |String |The Model UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInvariantUuid |String |The Model Invariant UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInstanceName |String |The Model Instance name |
++-------------------------+------------------+-------------------------------------------------+
SubscriberInfo Object
@@ -774,11 +948,25 @@ RequestInfo Object
+-------------------------+------------------+-------------------------------------------------+
|Attribute |Content |Description |
+=========================+==================+=================================================+
-|InstanceName |String |The instance Name |
-+-------------------------+------------------+-------------------------------------------------+
|Source |String |source of the request |
+-------------------------+------------------+-------------------------------------------------+
-|SuppressRollback |Boolean |SuppressRollback |
+|billingAccountNumber |String |billingAccountNumber of the request |
++-------------------------+------------------+-------------------------------------------------+
+|callbackUrl |String |callbackUrl of the request |
++-------------------------+------------------+-------------------------------------------------+
+|correlator |String |correlator of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderNumber |String |orderNumber of the request |
++-------------------------+------------------+-------------------------------------------------+
+|productFamilyId |String |productFamilyId of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderVersion |String |orderVersion of the request |
++-------------------------+------------------+-------------------------------------------------+
+|instanceName |String |instanceName of the request |
++-------------------------+------------------+-------------------------------------------------+
+|suppressRollback |String |suppressRollback of the request |
++-------------------------+------------------+-------------------------------------------------+
+|requestorId |String |requestorId of the request |
+-------------------------+------------------+-------------------------------------------------+
RequestParameters Object
@@ -794,7 +982,7 @@ RequestStatus Object
+-------------------------+------------------+-------------------------------------------------+
|Attribute |Content |Description |
+=========================+==================+=================================================+
-|timestamp |String |Time |
+|finishTime |String |Time |
+-------------------------+------------------+-------------------------------------------------+
|requestState |String |state of the request |
+-------------------------+------------------+-------------------------------------------------+
@@ -809,7 +997,7 @@ GET Orchestration Requests
+--------------------+--------------------------------------------------------------+
|Interface Definition|Description |
+====================+==============================================================+
-|URI |{serverRoot}/orchestrationRequests/v2 |
+|URI |{serverRoot}/orchestrationRequests/v4 |
+--------------------+--------------------------------------------------------------+
|Operation Type |GET |
+--------------------+--------------------------------------------------------------+
@@ -841,8 +1029,6 @@ Request Object
+-------------------+---------+-----------+--------------------------+-------------------------------------------+
|startTime |M |1 |request Object |Start time. |
+-------------------+---------+-----------+--------------------------+-------------------------------------------+
-|serviceInstanceId |M |1 |request Object |Service Instance id. |
-+-------------------+---------+-----------+--------------------------+-------------------------------------------+
|requestScope |M |1 |request Object |Scope of the request. |
+-------------------+---------+-----------+--------------------------+-------------------------------------------+
|requestType |M |1 |request Object |Type of the request. |
@@ -854,17 +1040,29 @@ Request Object
RequestDetails Object
-+-------------------+-------------------------+-------------------------------------------------+
-|Attribute |Content |Description |
-+===================+=========================+=================================================+
-|modelInfo |modelInfo Object |Content of modelInfo object. |
-+-------------------+-------------------------+-------------------------------------------------+
-|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. |
-+-------------------+-------------------------+-------------------------------------------------+
-|requestInfo |requestInfo Object |Content of requestInfo object. |
-+-------------------+-------------------------+-------------------------------------------------+
-|requestParameters |requestParameters Object |Content of requestParameters object. |
-+-------------------+-------------------------+-------------------------------------------------+
++-------------------+--------------------------+-------------------------------------------------+
+|Attribute |Content |Description |
++===================+==========================+=================================================+
+|modelInfo |modelInfo Object |Content of modelInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|subscriberInfo |subscriberInfo Object |Content of subscriberInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|requestInfo |requestInfo Object |Content of requestInfo object. |
++-------------------+--------------------------+-------------------------------------------------+
+|requestParameters |requestParameters Object |Content of requestParameters object. |
++-------------------+--------------------------+-------------------------------------------------+
+|relatedInstanceList|relatedInstanceList Object|Content of relatedInstanceList object. |
++-------------------+--------------------------+-------------------------------------------------+
+|cloudConfiguration |cloudConfiguration Object |Content of cloudConfiguration object. |
++-------------------+--------------------------+-------------------------------------------------+
+|project |project Object |Content of project object. |
++-------------------+--------------------------+-------------------------------------------------+
+|owningEntity |owningEntity Object |Content of owningEntity object. |
++-------------------+--------------------------+-------------------------------------------------+
+|platform |platform Object |Content of platform object. |
++-------------------+--------------------------+-------------------------------------------------+
+|lineOfBusiness |lineOfBusiness Object |Content of lineOfBusiness object. |
++-------------------+--------------------------+-------------------------------------------------+
ModelInfo Object
@@ -881,6 +1079,18 @@ ModelInfo Object
+-------------------------+------------------+-------------------------------------------------+
|ModelVersion |String |Version of the model |
+-------------------------+------------------+-------------------------------------------------+
+|ModelCustomization Name |String |The Model Customization name |
++-------------------------+------------------+-------------------------------------------------+
+|modelCustomizationUuid |String |The Model Customization UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelVersionId |String |The Model version id |
++-------------------------+------------------+-------------------------------------------------+
+|modelUuid |String |The Model UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInvariantUuid |String |The Model Invariant UUid |
++-------------------------+------------------+-------------------------------------------------+
+|modelInstanceName |String |The Model Instance name |
++-------------------------+------------------+-------------------------------------------------+
SubscriberInfo Object
@@ -897,11 +1107,25 @@ RequestInfo Object
+-------------------------+------------------+-------------------------------------------------+
|Attribute |Content |Description |
+=========================+==================+=================================================+
-|InstanceName |String |The instance Name |
-+-------------------------+------------------+-------------------------------------------------+
|Source |String |source of the request |
+-------------------------+------------------+-------------------------------------------------+
-|SuppressRollback |Boolean |SuppressRollback |
+|billingAccountNumber |String |billingAccountNumber of the request |
++-------------------------+------------------+-------------------------------------------------+
+|callbackUrl |String |callbackUrl of the request |
++-------------------------+------------------+-------------------------------------------------+
+|correlator |String |correlator of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderNumber |String |orderNumber of the request |
++-------------------------+------------------+-------------------------------------------------+
+|productFamilyId |String |productFamilyId of the request |
++-------------------------+------------------+-------------------------------------------------+
+|orderVersion |String |orderVersion of the request |
++-------------------------+------------------+-------------------------------------------------+
+|instanceName |String |instanceName of the request |
++-------------------------+------------------+-------------------------------------------------+
+|suppressRollback |String |suppressRollback of the request |
++-------------------------+------------------+-------------------------------------------------+
+|requestorId |String |requestorId of the request |
+-------------------------+------------------+-------------------------------------------------+
RequestParameters Object
@@ -917,7 +1141,7 @@ RequestStatus Object
+-------------------------+------------------+-------------------------------------------------+
|Attribute |Content |Description |
+=========================+==================+=================================================+
-|timestamp |String |Time |
+|finishTime |String |Time |
+-------------------------+------------------+-------------------------------------------------+
|requestState |String |state of the request |
+-------------------------+------------------+-------------------------------------------------+
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
index 01ca4df9f2..ccaf954aa1 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstances.java
@@ -21,7 +21,6 @@
package org.openecomp.mso.apihandlerinfra;
import java.io.IOException;
-import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -40,43 +39,34 @@ import javax.ws.rs.core.Response;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.hibernate.Session;
import org.json.JSONObject;
import org.openecomp.mso.apihandler.common.ErrorNumbers;
import org.openecomp.mso.apihandler.common.RequestClient;
import org.openecomp.mso.apihandler.common.RequestClientFactory;
import org.openecomp.mso.apihandler.common.ResponseHandler;
-import org.openecomp.mso.apihandlerinfra.Messages;
-import org.openecomp.mso.apihandlerinfra.MsoException;
-import org.openecomp.mso.apihandlerinfra.MsoRequest;
import org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans.CompareModelsRequest;
-import org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans.DelE2ESvcResp;
import org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans.E2EServiceInstanceDeleteRequest;
import org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans.E2EServiceInstanceRequest;
-import org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans.E2EUserParam;
+import org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans.E2EServiceInstanceScaleRequest;
import org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans.GetE2EServiceInstanceResponse;
-import org.openecomp.mso.apihandlerinfra.e2eserviceinstancebeans.*;
-import org.openecomp.mso.serviceinstancebeans.ModelInfo;
-import org.openecomp.mso.serviceinstancebeans.ModelType;
-import org.openecomp.mso.serviceinstancebeans.RequestDetails;
-import org.openecomp.mso.serviceinstancebeans.RequestInfo;
-import org.openecomp.mso.serviceinstancebeans.RequestParameters;
-import org.openecomp.mso.serviceinstancebeans.ServiceInstancesRequest;
-import org.openecomp.mso.serviceinstancebeans.SubscriberInfo;
-import org.openecomp.mso.db.AbstractSessionFactoryManager;
import org.openecomp.mso.db.catalog.CatalogDatabase;
import org.openecomp.mso.db.catalog.beans.Service;
import org.openecomp.mso.db.catalog.beans.ServiceRecipe;
import org.openecomp.mso.logger.MessageEnum;
import org.openecomp.mso.logger.MsoAlarmLogger;
import org.openecomp.mso.logger.MsoLogger;
-import org.openecomp.mso.properties.MsoDatabaseException;
import org.openecomp.mso.requestsdb.OperationStatus;
import org.openecomp.mso.requestsdb.RequestsDatabase;
-import org.openecomp.mso.requestsdb.RequestsDbSessionFactoryManager;
+import org.openecomp.mso.serviceinstancebeans.ModelInfo;
+import org.openecomp.mso.serviceinstancebeans.ModelType;
+import org.openecomp.mso.serviceinstancebeans.RequestDetails;
+import org.openecomp.mso.serviceinstancebeans.RequestInfo;
+import org.openecomp.mso.serviceinstancebeans.RequestParameters;
+import org.openecomp.mso.serviceinstancebeans.ServiceInstancesRequest;
+import org.openecomp.mso.serviceinstancebeans.SubscriberInfo;
import org.openecomp.mso.utils.UUIDChecker;
+import com.fasterxml.jackson.databind.ObjectMapper;
import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
@@ -199,7 +189,7 @@ public class E2EServiceInstances {
private Response compareModelwithTargetVersion(String requestJSON, Action action,
HashMap<String, String> instanceIdMap, String version) {
- String requestId = instanceIdMap.get("serviceId");
+ String requestId = UUIDChecker.generateUUID(msoLogger);
long startTime = System.currentTimeMillis();
msoLogger.debug("requestId is: " + requestId);
@@ -365,7 +355,7 @@ public class E2EServiceInstances {
private Response deleteE2EserviceInstances(String requestJSON,
Action action, HashMap<String, String> instanceIdMap, String version) {
// TODO should be a new one or the same service instance Id
- String requestId = instanceIdMap.get("serviceId");
+ String requestId = UUIDChecker.generateUUID(msoLogger);
long startTime = System.currentTimeMillis();
msoLogger.debug("requestId is: " + requestId);
E2EServiceInstanceDeleteRequest e2eDelReq = null;
@@ -394,7 +384,6 @@ public class E2EServiceInstances {
"Mapping of request to JSON object failed");
msoLogger.debug("End of the transaction, the final response is: "
+ (String) response.getEntity());
- createOperationStatusRecordForError(action, requestId);
return response;
}
@@ -444,7 +433,6 @@ public class E2EServiceInstances {
"No recipe found in DB");
msoLogger.debug(END_OF_THE_TRANSACTION
+ (String) response.getEntity());
- createOperationStatusRecordForError(action, requestId);
return response;
}
@@ -501,7 +489,6 @@ public class E2EServiceInstances {
"Exception while communicate with BPMN engine");
msoLogger.debug("End of the transaction, the final response is: "
+ (String) resp.getEntity());
- createOperationStatusRecordForError(action, requestId);
return resp;
}
@@ -518,7 +505,6 @@ public class E2EServiceInstances {
MsoLogger.ResponseCode.InternalError,
"Null response from BPMN");
msoLogger.debug(END_OF_THE_TRANSACTION + (String) resp.getEntity());
- createOperationStatusRecordForError(action, requestId);
return resp;
}
@@ -682,46 +668,6 @@ public class E2EServiceInstances {
return beplStatusUpdate(serviceId, startTime, msoRequest, requestClient, respHandler, bpelStatus, action, instanceIdMap);
}
- private Response checkE2ESvcInstStatus(Action action, String serviceId, long startTime, MsoRequest msoRequest) {
- OperationStatus curStatus = null;
-// String instanceName = sir.getRequestDetails().getRequestInfo().getInstanceName();
- String requestScope = sir.getRequestDetails().getModelInfo().getModelType().name();
- try {
- if (!(serviceId == null && "service".equals(requestScope) && (action == Action.updateInstance))) {
- curStatus = chkSvcInstOperStatusbySvcId(serviceId);
- }
- } catch (Exception e) {
- msoLogger.error(MessageEnum.APIH_DUPLICATE_CHECK_EXC, MSO_PROP_APIHANDLER_INFRA, "", "",
- MsoLogger.ErrorCode.DataError, "Error during current operation status check ", e);
-
- Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR,
- MsoException.ServiceException, e.getMessage(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR, null);
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError,
- "Error during current operation status check");
- msoLogger.debug("End of the transaction, the final response is: " + (String) response.getEntity());
- return response;
- }
-
- if ("processing".equalsIgnoreCase("curStatus != null && curStatus.getResult() != null && curStatus.getResult()")) {
- String chkMessage = "Error: Locked instance - This " + requestScope + " (" + serviceId + ") "
- + "now being worked with a status of " + curStatus.getResult()
- + ". The latest workflow of instance must be finished or cleaned up.";
-
- Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_CONFLICT,
- MsoException.ServiceException, chkMessage, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR, null);
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict,
- chkMessage);
-
- msoLogger.debug("End of the transaction, the final response is: " + (String) response.getEntity());
-
- return response;
- }
-
- return Response.status(200).entity(null).build();
- }
-
private Response processE2EserviceInstances(String requestJSON, Action action,
HashMap<String, String> instanceIdMap, String version) {
@@ -736,9 +682,7 @@ public class E2EServiceInstances {
e2eSir = mapper.readValue(requestJSON, E2EServiceInstanceRequest.class);
} catch (Exception e) {
- //TODO update the service name
- this.createOperationStatusRecordForError(action, requestId);
-
+
msoLogger.debug("Mapping of request to JSON object failed : ", e);
Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_BAD_REQUEST,
MsoException.ServiceException, "Mapping of request to JSON object failed. " + e.getMessage(),
@@ -762,8 +706,6 @@ public class E2EServiceInstances {
ErrorNumbers.SVC_BAD_PARAMETER, null);
if (msoRequest.getRequestId() != null) {
msoLogger.debug("Logging failed message to the database");
- //TODO update the service name
- this.createOperationStatusRecordForError(action, requestId);
}
msoLogger.error(MessageEnum.APIH_REQUEST_VALIDATION_ERROR, MSO_PROP_APIHANDLER_INFRA, "", "",
MsoLogger.ErrorCode.SchemaError, requestJSON, e);
@@ -771,57 +713,8 @@ public class E2EServiceInstances {
"Validation of the input request failed");
msoLogger.debug("End of the transaction, the final response is: " + (String) response.getEntity());
return response;
- }
-
- OperationStatus dup = null;
- String instanceName = sir.getRequestDetails().getRequestInfo().getInstanceName();
- String requestScope = sir.getRequestDetails().getModelInfo().getModelType().name();
- try {
- if (!(instanceName == null && "service".equals(requestScope)
- && (action == Action.createInstance || action == Action.activateInstance))) {
- //TODO : Need to check for the duplicate record from the operation status,
- //TODO : commenting this check for unblocking current testing for now... induces dead code...
- dup = chkDuplicateServiceNameInOperStatus( instanceName);
- }
- } catch (Exception e) {
- msoLogger.error(MessageEnum.APIH_DUPLICATE_CHECK_EXC, MSO_PROP_APIHANDLER_INFRA, "", "",
- MsoLogger.ErrorCode.DataError, "Error during duplicate check ", e);
-
- Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR,
- MsoException.ServiceException, e.getMessage(), ErrorNumbers.SVC_DETAILED_SERVICE_ERROR, null);
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError,
- "Error during duplicate check");
- msoLogger.debug("End of the transaction, the final response is: " + (String) response.getEntity());
- return response;
- }
-
- if (dup != null) {
- // Found the duplicate record. Return the appropriate error.
- String instance = null;
- if (instanceName != null) {
- instance = instanceName;
- } else {
- instance = instanceIdMap.get(requestScope + "InstanceId");
- }
- String dupMessage = "Error: Locked instance - This " + requestScope + " (" + instance + ") "
- + "already has a request being worked with a status of " + dup.getProgress() + " (ServiceId - "
- + dup.getServiceId() + "). The existing request must finish or be cleaned up before proceeding.";
-
- Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_CONFLICT,
- MsoException.ServiceException, dupMessage, ErrorNumbers.SVC_DETAILED_SERVICE_ERROR, null);
+ }
- msoLogger.warn(MessageEnum.APIH_DUPLICATE_FOUND, dupMessage, "", "", MsoLogger.ErrorCode.SchemaError,
- "Duplicate request - Subscriber already has a request for this service");
-
-
- msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.Conflict,
- dupMessage);
- msoLogger.debug("End of the transaction, the final response is: " + (String) response.getEntity());
- createOperationStatusRecordForError(action, requestId);
- return response;
- }
-
CatalogDatabase db = null;
RecipeLookupResult recipeLookupResult = null;
try {
@@ -840,7 +733,6 @@ public class E2EServiceInstances {
msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError,
"Exception while communciate with DB");
msoLogger.debug(END_OF_THE_TRANSACTION + (String) response.getEntity());
- createOperationStatusRecordForError(action, requestId);
return response;
} finally {
closeCatalogDB(db);
@@ -857,24 +749,8 @@ public class E2EServiceInstances {
msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DataNotFound,
"No recipe found in DB");
msoLogger.debug(END_OF_THE_TRANSACTION + (String) response.getEntity());
- createOperationStatusRecordForError(action, requestId);
return response;
}
-// try {
-// msoRequest.createRequestRecord(Status.PENDING, action);
-// //createOperationStatusRecord(action, requestId);
-// } catch (Exception e) {
-// msoLogger.error(MessageEnum.APIH_DB_ACCESS_EXC_REASON, "Exception while creating record in DB", "", "",
-// MsoLogger.ErrorCode.SchemaError, "Exception while creating record in DB", e);
-// msoRequest.setStatus(org.openecomp.mso.apihandlerinfra.vnfbeans.RequestStatusType.FAILED);
-// Response response = msoRequest.buildServiceErrorResponse(HttpStatus.SC_INTERNAL_SERVER_ERROR,
-// MsoException.ServiceException, "Exception while creating record in DB " + e.getMessage(),
-// ErrorNumbers.SVC_BAD_PARAMETER, null);
-// msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError,
-// "Exception while creating record in DB");
-// msoLogger.debug("End of the transaction, the final response is: " + (String) response.getEntity());
-// return response;
-// }
String serviceInstanceType = e2eSir.getService().getServiceType();
@@ -913,7 +789,6 @@ public class E2EServiceInstances {
msoLogger.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.CommunicationError,
"Exception while communicate with BPMN engine");
msoLogger.debug("End of the transaction, the final response is: " + (String) resp.getEntity());
- createOperationStatusRecordForError(action, requestId);
return resp;
}
@@ -937,7 +812,7 @@ public class E2EServiceInstances {
private Response scaleE2EserviceInstances(String requestJSON,
Action action, HashMap<String, String> instanceIdMap, String version) {
- String requestId = instanceIdMap.get("serviceId");
+ String requestId = UUIDChecker.generateUUID(msoLogger);
long startTime = System.currentTimeMillis();
msoLogger.debug("requestId is: " + requestId);
E2EServiceInstanceScaleRequest e2eScaleReq = null;
@@ -966,7 +841,6 @@ public class E2EServiceInstances {
"Mapping of request to JSON object failed");
msoLogger.debug("End of the transaction, the final response is: "
+ (String) response.getEntity());
- createOperationStatusRecordForError(action, requestId);
return response;
}
@@ -1016,7 +890,6 @@ public class E2EServiceInstances {
"No recipe found in DB");
msoLogger.debug(END_OF_THE_TRANSACTION
+ (String) response.getEntity());
- createOperationStatusRecordForError(action, requestId);
return response;
}
@@ -1073,7 +946,6 @@ public class E2EServiceInstances {
"Exception while communicate with BPMN engine");
msoLogger.debug("End of the transaction, the final response is: "
+ (String) resp.getEntity());
- createOperationStatusRecordForError(action, requestId);
return resp;
}
@@ -1090,7 +962,6 @@ public class E2EServiceInstances {
MsoLogger.ResponseCode.InternalError,
"Null response from BPMN");
msoLogger.debug(END_OF_THE_TRANSACTION + (String) resp.getEntity());
- createOperationStatusRecordForError(action, requestId);
return resp;
}
@@ -1116,25 +987,6 @@ public class E2EServiceInstances {
if (bpelStatus == HttpStatus.SC_ACCEPTED) {
String camundaJSONResponseBody = respHandler.getResponseBody();
msoLogger.debug("Received from Camunda: " + camundaJSONResponseBody);
-
- // currently only for delete case we update the status here
- if (action == Action.deleteInstance) {
- ObjectMapper mapper = new ObjectMapper();
- try {
- DelE2ESvcResp jo = mapper.readValue(
- camundaJSONResponseBody, DelE2ESvcResp.class);
- String operationId = jo.getOperationId();
- this.createOperationStatusRecord("DELETE", serviceId,
- operationId);
- } catch (Exception ex) {
- msoLogger.error(MessageEnum.APIH_BPEL_RESPONSE_ERROR,
- requestClient.getUrl(), "", "",
- MsoLogger.ErrorCode.BusinessProcesssError,
- "Response from BPEL engine is failed with HTTP Status="
- + bpelStatus);
- }
- }
-
msoLogger.recordAuditEvent(startTime,
MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc,
"BPMN accepted the request, the request is in progress");
@@ -1353,103 +1205,4 @@ public class E2EServiceInstances {
return returnString;
}
- private void createOperationStatusRecordForError(Action action,
- String serviceId) throws MsoDatabaseException {
-
- AbstractSessionFactoryManager requestsDbSessionFactoryManager = new RequestsDbSessionFactoryManager();
-
- Session session = null;
- try {
-
- session = requestsDbSessionFactoryManager.getSessionFactory()
- .openSession();
- session.beginTransaction();
-
- OperationStatus os = new OperationStatus();
- os.setOperation(action.name());
- os.setOperationContent("");
- os.setOperationId("");
- os.setProgress("100");
- os.setReason("");
- os.setResult("error");
- os.setServiceId(serviceId);
- os.setUserId("");
- Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
- Timestamp endTimeStamp = new Timestamp(System.currentTimeMillis());
- os.setFinishedAt(endTimeStamp);
- os.setOperateAt(startTimeStamp);
-
- session.save(os);
- session.getTransaction().commit();
-
- } catch (Exception e) {
- msoLogger.error(MessageEnum.APIH_DB_INSERT_EXC, "", "",
- MsoLogger.ErrorCode.DataError,
- "Exception when creation record request in Operation", e);
- throw new MsoDatabaseException(
- "Data did inserted in Operatus Status Table for failure", e);
- } finally {
- if (null != session) {
- session.close();
- }
- }
- }
-
- private void createOperationStatusRecord(String actionNm, String serviceId,
- String operationId) throws MsoDatabaseException {
-
- AbstractSessionFactoryManager requestsDbSessionFactoryManager = new RequestsDbSessionFactoryManager();
-
- Session session = null;
- try {
-
- session = requestsDbSessionFactoryManager.getSessionFactory()
- .openSession();
- session.beginTransaction();
-
- OperationStatus os = new OperationStatus();
- os.setOperation(actionNm);
- os.setOperationContent("");
- os.setOperationId(operationId);
- os.setProgress("0");
- os.setReason("");
- os.setResult("processing");
- os.setServiceId(serviceId);
- // TODO : to be updated...
- os.setUserId("");
- Timestamp startTimeStamp = new Timestamp(System.currentTimeMillis());
- Timestamp endTimeStamp = new Timestamp(System.currentTimeMillis());
- os.setFinishedAt(endTimeStamp);
- os.setOperateAt(startTimeStamp);
-
- session.save(os);
- session.getTransaction().commit();
-
- } catch (Exception e) {
- msoLogger.error(MessageEnum.APIH_DB_INSERT_EXC, "", "",
- MsoLogger.ErrorCode.DataError,
- "Exception when creation record request in Operation", e);
- throw new MsoDatabaseException(
- "Data did inserted in Operatus Status Table", e);
- } finally {
- if (null != session) {
- session.close();
- }
- }
- }
-
- private OperationStatus chkSvcInstOperStatusbySvcId(String serviceId) {
- OperationStatus svcInstanceOperStatus = (RequestsDatabase.getInstance())
- .getOperationStatusByServiceId(serviceId);
-
- return svcInstanceOperStatus;
- }
-
- private OperationStatus chkDuplicateServiceNameInOperStatus(
- String serviceName) {
- OperationStatus dupServiceName = (RequestsDatabase.getInstance())
- .getOperationStatusByServiceName(serviceName);
-
- return dupServiceName;
- }
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java
index 45fc89bfc2..f8caa54846 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/E2EServiceInstancesTest.java
@@ -164,13 +164,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -222,7 +216,7 @@ public class E2EServiceInstancesTest {
String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
+ assertTrue(respStr.contains("success"));
}
@Test
@@ -235,13 +229,6 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
-
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -306,13 +293,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -377,13 +358,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -428,7 +403,7 @@ public class E2EServiceInstancesTest {
String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
+ assertTrue(respStr.contains("serviceException"));
}
@Test
@@ -441,13 +416,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -488,7 +457,7 @@ public class E2EServiceInstancesTest {
String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
+ assertTrue(respStr.contains("serviceException"));
}
@Test
@@ -502,13 +471,7 @@ public class E2EServiceInstancesTest {
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -530,7 +493,7 @@ public class E2EServiceInstancesTest {
;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
+ assertTrue(respStr.contains("serviceException"));
}
@Test
@@ -543,19 +506,12 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
-
- }
- };
E2EServiceInstances instance = new E2EServiceInstances();
String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
+ assertTrue(respStr.contains("serviceException"));
}
@Test
@@ -569,19 +525,13 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
E2EServiceInstances instance = new E2EServiceInstances();
String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
+ assertTrue(respStr.contains("serviceException"));
}
@Test
@@ -595,35 +545,23 @@ public class E2EServiceInstancesTest {
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
E2EServiceInstances instance = new E2EServiceInstances();
String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
+ assertTrue(respStr.contains("serviceException"));
}
@Test
public void createE2EServiceInstanceTestEmptyDBQuery() {
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
E2EServiceInstances instance = new E2EServiceInstances();
String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
+ assertTrue(respStr.contains("serviceException"));
// assertTrue(true);
}
@@ -638,30 +576,18 @@ public class E2EServiceInstancesTest {
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
E2EServiceInstances instance = new E2EServiceInstances();
String request = jsonBody;
Response resp = instance.createE2EServiceInstance(request, "v3");
String respStr = resp.getEntity().toString();
- assertTrue(respStr.contains("SVC2000"));
+ assertTrue(respStr.contains("serviceException"));
}
@Test
public void createE2EServiceInstanceTestForEmptyRequest() {
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
E2EServiceInstances instance = new E2EServiceInstances();
String request = "";
Response resp = instance.createE2EServiceInstance(request, "v3");
@@ -795,11 +721,6 @@ public class E2EServiceInstancesTest {
}
};
- new Expectations() {{
- sessionFactoryManager.getSessionFactory().openSession();
- result = session;
- }};
-
E2EServiceInstances instance = new E2EServiceInstances();
String request = "{\"globalSubscriberId\":\"299392392\",\"serviceType\":\"VoLTE\"}";
@@ -871,13 +792,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -943,13 +858,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -1016,13 +925,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -1095,13 +998,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
MockUp<CatalogDatabase> catalog = new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) throws Exception {
@@ -1167,13 +1064,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -1239,13 +1130,7 @@ public class E2EServiceInstancesTest {
return operationStatus;
}
};
- new MockUp<E2EServiceInstances>() {
- @Mock
- private void createOperationStatusRecordForError(Action action,
- String requestId) throws MsoDatabaseException {
- }
- };
new MockUp<CatalogDatabase>() {
@Mock
public Service getServiceByModelName(String modelName) {
@@ -1363,10 +1248,6 @@ public class E2EServiceInstancesTest {
public void scaleE2EserviceInstancesTestFailInvalidRequest(@Mocked AbstractSessionFactoryManager sessionFactoryManager,
@Mocked Session session ) {
- new Expectations() {{
- sessionFactoryManager.getSessionFactory().openSession(); result = session;
- }};
-
E2EServiceInstances instance = new E2EServiceInstances();
Response response = instance.scaleE2EServiceInstance(jsonBody, "v3", "12345");
}
@@ -1440,10 +1321,6 @@ public class E2EServiceInstancesTest {
public void scaleE2EserviceInstancesTestFailCamundaClient(@Mocked AbstractSessionFactoryManager sessionFactoryManager,
@Mocked Session session) {
- new Expectations() {{
- sessionFactoryManager.getSessionFactory().openSession(); result = session;
- }};
-
final MockUp<MsoRequest> mockMsoRequest = new MockUp<MsoRequest>() {
@Mock
public void createRequestRecord(Status status, Action action) {