aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java11
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy1
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy1
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy3
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy1
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilTest.groovy1
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy63
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy160
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy102
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandleOrchestrationTask.groovy1
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSliceService.bpmn12
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn7
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOption.bpmn305
-rw-r--r--common/src/main/java/org/onap/so/logging/tasks/AuditMDCSetup.java3
-rw-r--r--cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java7
-rw-r--r--cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPMDCSetup.java74
-rw-r--r--deployment-configs/src/main/resources/logger/logback-spring.xml6
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java1
-rw-r--r--pom.xml8
20 files changed, 327 insertions, 442 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java
index 9d6bf65dce..b614a92177 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/GlanceClientImpl.java
@@ -20,8 +20,6 @@
package org.onap.so.openstack.utils;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
import org.onap.so.cloud.authentication.KeystoneAuthHolder;
import org.onap.so.openstack.exceptions.MsoCloudSiteNotFound;
import org.onap.so.openstack.exceptions.MsoException;
@@ -74,14 +72,7 @@ public class GlanceClientImpl extends MsoCommonUtils {
try {
String encodedName = null;
if (name != null) {
- try {
- encodedName =
- "in:\"" + URLEncoder.encode(name, "UTF-8").replace("+", "%20").replace("%3A", ":") + "\"";
- } catch (UnsupportedEncodingException e) {
- logger.error("Error Encoding Image Name", e);
- throw new GlanceClientException("Error Endcoding Name", e);
- }
-
+ encodedName = "in:\"" + name + "\"";
}
Glance glanceClient = getGlanceClient(cloudSiteId, tenantId);
// list is set to false, otherwise an invalid URL is appended
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy
index 7b49fa06b3..91f73e2306 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtils.groovy
@@ -443,7 +443,6 @@ class CatalogDbUtils {
String queryEndpoint = catalogDbEndpoint + "/" + defaultDbAdapterVersion + endPoint
def responseData = ''
HttpClient client = httpClientFactory.newJsonClient(new URL(queryEndpoint), ONAPComponents.CATALOG_DB)
- client.addAdditionalHeader(ONAPLogConstants.Headers.REQUEST_ID, UUID.randomUUID().toString())
client.addAdditionalHeader('X-FromAppId', "BPMN")
client.addAdditionalHeader('Accept', MediaType.APPLICATION_JSON)
String basicAuthCred = execution.getVariable("BasicAuthHeaderValueDB")
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
index a5111a62d3..b390f7675a 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtil.groovy
@@ -186,7 +186,6 @@ class ExternalAPIUtil {
HttpClient httpClient = httpClientFactory.newJsonClient(new URL(url), ONAPComponents.AAI)
httpClient.addBasicAuthHeader(execution.getVariable("URN_externalapi_auth"), execution.getVariable("URN_mso_msoKey"))
httpClient.addAdditionalHeader("X-FromAppId", "MSO")
- httpClient.addAdditionalHeader("X-TransactionId", uuid)
httpClient.addAdditionalHeader("Target",execution.getVariable("SPPartnerUrl"))
apiResponse = httpClient.post(payload)
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
index ebaf65ff81..55f1187d69 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/SDNCAdapterRestV1.groovy
@@ -224,9 +224,6 @@ class SDNCAdapterRestV1 extends AbstractServiceTaskProcessor {
URL url = new URL(sdncAdapterUrl)
HttpClient httpClient = new HttpClientFactory().newJsonClient(url, ONAPComponents.SDNC_ADAPTER)
- httpClient.addAdditionalHeader("X-ONAP-RequestID", execution.getVariable("mso-request-id"))
- httpClient.addAdditionalHeader("X-ONAP-InvocationID", UUID.randomUUID().toString())
- httpClient.addAdditionalHeader("X-ONAP-PartnerName", "SO-SDNCAdapter")
httpClient.addAdditionalHeader("mso-request-id", execution.getVariable("mso-request-id"))
httpClient.addAdditionalHeader("mso-service-instance-id", execution.getVariable("mso-service-instance-id"))
httpClient.addAdditionalHeader("Authorization", execution.getVariable(prefix + "basicAuthHeaderValue"))
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy
index fda6b8e6e3..216f34573b 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/CatalogDbUtilsTest.groovy
@@ -136,7 +136,6 @@ class CatalogDbUtilsTest {
}
private void verifyHeadersInHttpClient() {
- verify(httpClientMock).addAdditionalHeader(eq(ONAPLogConstants.Headers.REQUEST_ID), anyString())
verify(httpClientMock).addAdditionalHeader("X-FromAppId", "BPMN")
verify(httpClientMock).addAdditionalHeader("Accept", MediaType.APPLICATION_JSON)
verify(httpClientMock).addAdditionalHeader("Authorization", AUTHORIZATION_HEADER)
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilTest.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilTest.groovy
index 7abfcffb13..e6d5fb86e6 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilTest.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/ExternalAPIUtilTest.groovy
@@ -129,7 +129,6 @@ class ExternalAPIUtilTest {
// THEN
then(httpClient).should(times(1)).addBasicAuthHeader("value_externalapi_auth", "value_mso_msoKey")
then(httpClient).should(times(1)).addAdditionalHeader("X-FromAppId", "MSO")
- then(httpClient).should(times(1)).addAdditionalHeader("X-TransactionId", UUID_STR)
ResponseAssert.assertThat(apiResponse)
.hasStatusCode(HttpStatus.ACCEPTED)
.hasBody(BODY_PAYLOAD)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
index 2da5878e36..15a0f34482 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy
@@ -349,7 +349,7 @@ public class CreateSliceService extends AbstractServiceTaskProcessor {
String orchStatus = execution.getVariable("orchestrationStatus")
try {
- ServiceInstance si = execution.getVariable("serviceInstanceData")
+ ServiceInstance si = ServiceInstance si = new ServiceInstance()
si.setOrchestrationStatus(orchStatus)
AAIResourcesClient client = new AAIResourcesClient()
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
index f58cd9a60d..cc2d865957 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy
@@ -1,31 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License")
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
package org.onap.so.bpmn.infrastructure.scripts
-import com.google.common.reflect.TypeToken
-import com.google.gson.Gson
import org.camunda.bpm.engine.delegate.BpmnError
import org.camunda.bpm.engine.delegate.DelegateExecution
-import org.onap.aai.domain.yang.AllottedResource
import org.onap.aai.domain.yang.Relationship
import org.onap.aai.domain.yang.RelationshipList
import org.onap.aai.domain.yang.ServiceInstance
import org.onap.so.beans.nsmf.SliceTaskParams
import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils
import org.onap.so.bpmn.core.domain.ServiceDecomposition
import org.onap.so.bpmn.core.domain.ServiceProxy
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.aaiclient.client.aai.AAIObjectType
import org.onap.aaiclient.client.aai.AAIResourcesClient
-import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel
import org.onap.aaiclient.client.aai.entities.AAIResultWrapper
import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
-import org.onap.so.db.request.client.RequestsDbClient
-import org.onap.so.db.request.beans.OrchestrationTask
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import javax.ws.rs.NotFoundException
-import javax.ws.rs.core.UriBuilder
import static org.apache.commons.lang3.StringUtils.isBlank
@@ -36,7 +50,8 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi
ExceptionUtil exceptionUtil = new ExceptionUtil()
JsonUtils jsonUtil = new JsonUtils()
- RequestsDbClient requestsDbClient = new RequestsDbClient()
+
+ private NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil)
/**
* Pre Process the BPMN Flow Request
@@ -65,8 +80,9 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi
SliceTaskParams sliceParams = execution.getVariable("sliceTaskParams")
try
{
- String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.parameters.requestInputs.nstar0_allottedresource0_providing_service_uuid")
- String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.parameters.requestInputs.nstar0_allottedresource0_providing_service_invariant_uuid")
+ Map<String, Object> nstSolution = execution.getVariable("nstSolution") as Map
+ String modelUuid = nstSolution.get("UUID")
+ String modelInvariantUuid = nstSolution.get("invariantUUID")
String serviceModelInfo = """{
"modelInvariantUuid":"${modelInvariantUuid}",
"modelUuid":"${modelUuid}",
@@ -105,7 +121,7 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi
String nsiServiceInstanceID = sliceParams.getSuggestNsiId()
AAIResourcesClient resourceClient = new AAIResourcesClient()
- AAIResourceUri nsiServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), nsiServiceInstanceID)
+ AAIResourceUri nsiServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), nsiServiceInstanceID)
//AAIResourceUri nsiServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.QUERY_ALLOTTED_RESOURCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), nsiServiceInstanceID)
try {
@@ -156,7 +172,7 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi
{
try {
AAIResourcesClient resourceClient = new AAIResourcesClient()
- AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), nssiID)
+ AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), nssiID)
AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class)
Optional<org.onap.aai.domain.yang.ServiceInstance> si = wrapper.asBean(org.onap.aai.domain.yang.ServiceInstance.class)
org.onap.aai.domain.yang.ServiceInstance nssi = si.get()
@@ -179,13 +195,13 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi
}
void createNSIinAAI(DelegateExecution execution) {
- logger.trace("Enter CreateNSIinAAI in DoAllocateNSIandNSSI()")
+ logger.debug("Enter CreateNSIinAAI in DoAllocateNSIandNSSI()")
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
org.onap.aai.domain.yang.ServiceInstance nsi = new ServiceInstance();
String sliceInstanceId = UUID.randomUUID().toString()
execution.setVariable("sliceInstanceId",sliceInstanceId)
nsi.setServiceInstanceId(sliceInstanceId)
- String sliceInstanceName = "nsi_"+execution.getVariable("serviceInstanceName")
+ String sliceInstanceName = "nsi_"+execution.getVariable("sliceServiceInstanceName")
nsi.setServiceInstanceName(sliceInstanceName)
String serviceType = execution.getVariable("serviceType")
nsi.setServiceType(serviceType)
@@ -202,11 +218,20 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi
//nsi.setEnvironmentContext(snssai)
String serviceRole = "nsi"
nsi.setServiceRole(serviceRole)
+ String msg = ""
try {
AAIResourcesClient client = new AAIResourcesClient()
- AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), sliceInstanceId)
- client.create(uri, nsi)
+ AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), sliceInstanceId)
+ client.create(nsiServiceUri, nsi)
+
+ Relationship relationship = new Relationship()
+ logger.info("Creating Allotted resource relationship, nsiServiceUri: " + nsiServiceUri.build().toString())
+ relationship.setRelatedLink(nsiServiceUri.build().toString())
+ AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE,
+ execution.getVariable("globalSubscriberId"),execution.getVariable("subscriptionServiceType"),
+ execution.getVariable("sliceServiceInstanceId"), execution.getVariable("allottedResourceId")).relationshipAPI()
+ client.create(allottedResourceUri, relationship)
} catch (BpmnError e) {
throw e
@@ -243,7 +268,7 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi
execution.setVariable("maxIndex",maxIndex)
execution.setVariable('nsiServiceInstanceId',sliceInstanceId)
execution.setVariable("nsiServiceInstanceName",sliceInstanceName)
- logger.trace("Exit CreateNSIinAAI in DoAllocateNSIandNSSI()")
+ logger.debug("Exit CreateNSIinAAI in DoAllocateNSIandNSSI()")
}
void getOneNsstInfo(DelegateExecution execution){
@@ -271,7 +296,7 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi
String domain = jsonUtil.getJsonValue(content, "metadata.domainType")
Map<String, Object> nssiMap = execution.getVariable("nssiMap")
- String servicename = execution.getVariable("serviceInstanceName")
+ String servicename = execution.getVariable("sliceServiceInstanceName")
String nsiname = "nsi_"+servicename
nssiMap.put(domain,"""{
"serviceInstanceId":"",
@@ -335,4 +360,4 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi
}
logger.trace("Exit updateCurrentIndex in DoAllocateNSIandNSSI()")
}
-}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy
index 0b9bcde472..5741a78ed4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy
@@ -1,3 +1,23 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ # Copyright (c) 2019, CMCC Technologies Co., Ltd.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License")
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
package org.onap.so.bpmn.infrastructure.scripts
import com.fasterxml.jackson.core.type.TypeReference
@@ -22,12 +42,13 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
import org.slf4j.Logger
import org.slf4j.LoggerFactory
+
import javax.ws.rs.NotFoundException
import javax.ws.rs.core.Response
import static org.apache.commons.lang3.StringUtils.isBlank
-public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
+class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
private static final Logger logger = LoggerFactory.getLogger( DoCreateSliceServiceOption.class)
@@ -45,11 +66,6 @@ public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
void getNSIOptionfromOOF(DelegateExecution execution) {
- //解析sliceProfile
- logger.debug("start parseServiceProfile")
- parseServiceProfile(execution)
- logger.debug("end parseServiceProfile")
-
String urlString = UrnPropertiesReader.getVariable("mso.oof.endpoint", execution)
logger.debug( "get NSI option OOF Url: " + urlString)
@@ -99,6 +115,11 @@ public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
Response httpResponse = httpClient.post(oofRequest)
processOOFResponse(httpResponse, execution)
+
+ //解析sliceProfile
+ logger.debug("start parseServiceProfile")
+ parseServiceProfile(execution)
+ logger.debug("end parseServiceProfile")
}
private void processOOFResponse(Response httpResponse, DelegateExecution execution) {
@@ -120,17 +141,15 @@ public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
Map OOFResponseObject = new JsonSlurper().parseText(OOFResponse)
Map solutions = OOFResponseObject.get("solutions")
- Boolean isSharable = false
String resourceSharingLevel = execution.getVariable("resourceSharingLevel")
- if (resourceSharingLevel.equals("shared"))
- isSharable = true
+ Boolean isSharable = resourceSharingLevel.equals("shared")
if (solutions != null) {
if (isSharable) {
//sharedNSISolution
processSharedNSISolutions(solutions, execution)
} else {
- //TODO test OOF don't implement in Frankfurt release
+ //TODO test OOF
if (solutions.containsKey("newNSISolutions")) {
List<Map> newNSISolutions = solutions.get("newNSISolutions")
List<Map> NSSImap = new ArrayList<>()
@@ -164,7 +183,7 @@ public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
}
}
execution.setVariable("sliceTaskParams", sliceTaskParams)
- logger.debug("Info: No NSI suggested by OOF")
+ logger.debug("sliceTaskParams: "+sliceTaskParams.convertToJson())
}
logger.debug("*** Completed options Call to OOF ***")
}
@@ -182,7 +201,7 @@ public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
Map sharedNSIsolution = ((List) solutions.get("sharedNSISolutions")).get(0)
nsiInstanceId = sharedNSIsolution.getOrDefault("NSIId", "")
nsiName = sharedNSIsolution.getOrDefault("NSIName", "")
- sliceTaskParams.setNstId(nsiInstanceId)
+ sliceTaskParams.setSuggestNsiId(nsiInstanceId)
sliceTaskParams.setSuggestNsiName(nsiName)
//Temporary modification
@@ -192,8 +211,9 @@ public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
nssiId = nssi.getOrDefault("NSSIId","")
nssiName = nssi.getOrDefault("NSSIName","")
sliceTaskParams.setCnSuggestNssiId(nssiId)
- sliceTaskParams.setCnSuggestNssiName(nssiName)
+ //TODO Need update after OOF return camel key and domainType
sliceProfile = ((List)nssi.get("sliceProfile"))?.get(0)
+ sliceTaskParams.setCnSuggestNssiName(nssiName)
// execution.setVariable("sliceProfileCn", sliceProfile)
// sliceTaskParams.setSliceProfileCn(sliceProfile)
}
@@ -205,51 +225,90 @@ public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
logger.debug("Start parseServiceProfile")
String serviceType = execution.getVariable("serviceType")
Map<String, Object> serviceProfile = execution.getVariable("serviceProfile")
-
+ SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams")
// set sliceProfile for three domains
- Map<String, Object> sliceProfileTn = getSliceProfile(serviceType, "TN", serviceProfile)
- Map<String, Object> sliceProfileCn = getSliceProfile(serviceType, "CN", serviceProfile)
- Map<String, Object> sliceProfileAn = getSliceProfile(serviceType, "AN", serviceProfile)
+ if(!sliceTaskParams.getSliceProfileAn()){
+ Map<String, Object> sliceProfileAn = getSliceProfile(serviceType, "AN", serviceProfile)
+ execution.setVariable("sliceProfileAn", sliceProfileAn)
+ sliceTaskParams.setSliceProfileAn(sliceProfileAn)
+ logger.debug("sliceProfileAn: " + sliceProfileAn)
+ }
+
+ if(!sliceTaskParams.getSliceProfileTn()){
+ Map<String, Object> sliceProfileTn = getSliceProfile(serviceType, "TN", serviceProfile)
+ execution.setVariable("sliceProfileTn", sliceProfileTn)
+ sliceTaskParams.setSliceProfileTn(sliceProfileTn)
+ logger.debug("sliceProfileTn: " + sliceProfileTn)
+ }
- execution.setVariable("sliceProfileTn", sliceProfileTn)
- execution.setVariable("sliceProfileCn", sliceProfileCn)
- execution.setVariable("sliceProfileAn", sliceProfileAn)
- logger.debug("sliceProfileTn: " + sliceProfileTn)
- logger.debug("sliceProfileCn: " + sliceProfileCn)
- logger.debug("sliceProfileAn: " + sliceProfileAn)
+ if(!sliceTaskParams.getSliceProfileCn()){
+ Map<String, Object> sliceProfileCn = getSliceProfile(serviceType, "CN", serviceProfile)
+ execution.setVariable("sliceProfileCn", sliceProfileCn)
+ sliceTaskParams.setSliceProfileCn(sliceProfileCn)
+ logger.debug("sliceProfileCn: " + sliceProfileCn)
+ }
logger.debug("Finish parseServiceProfile")
}
- Map getSliceProfile(String serviceType, String domain, Map<String, Object> serviceProfile) {
- //String variablePath = "nsmf." + serviceType + ".profileMap" + domain
- //String profileMapStr = UrnPropertiesReader.getVariable(variablePath)
- String profileMapStr = """ {
- "skip_post_instantiation_configuration":"skip_post_instantiation_configuration",
- "controller_actor":"controller_actor",
- "areaTrafficCapDL":"areaTrafficCapDL",
- "maxNumberofUEs":"maxNumberofUEs",
- "latency":"latency",
- "expDataRateUL":"expDataRateUL",
- "sNSSAI":"sNSSAI",
- "plmnIdList":"plmnIdList",
- "sST":"sST",
- "areaTrafficCapUL":"areaTrafficCapUL",
- "uEMobilityLevel":"uEMobilityLevel",
- "expDataRateDL":"expDataRateDL",
- "coverageAreaTAList":"coverageAreaTAList",
- "activityFactor":"activityFactor",
- "resourceSharingLevel":"resourceSharingLevel"
- }
- """.trim().replaceAll(" ", "")
- logger.debug("Profile map for " + domain + " : " + profileMapStr)
- Map<String, String> profileMaps = objectMapper.readValue(profileMapStr, new TypeReference<Map<String, String>>(){})
- Map<String, Object> sliceProfileTn = [:]
+ Map getSliceProfile(String serviceType, String domain, Map<String, Object> serviceProfile) {
+ String profileMapStr
+ Integer domainLatency = (Integer) serviceProfile.get("latency")/3
+
+ switch (domain) {
+ case "AN":
+ profileMapStr = """ {
+ "latency": ${domainLatency},
+ "sNSSAI": "sNSSAI",
+ "uEMobilityLevel": "uEMobilityLevel",
+ "coverageAreaTAList": "coverageAreaTAList",
+ "5QI": 100
+ }
+ """.trim().replaceAll(" ", "")
+ break
+ case "TN":
+ profileMapStr =""" {
+ "latency":${domainLatency},
+ "sNSSAI":"sNSSAI",
+ "e2eLatency":"latency",
+ "bandwidth": 100
+ }
+ """.trim().replaceAll(" ", "")
+ break
+ case "CN":
+ profileMapStr = """ {
+ "areaTrafficCapDL":"areaTrafficCapDL",
+ "maxNumberofUEs":"maxNumberofUEs",
+ "latency":${domainLatency},
+ "expDataRateUL":"expDataRateUL",
+ "sNSSAI":"sNSSAI",
+ "areaTrafficCapUL":"areaTrafficCapUL",
+ "uEMobilityLevel":"uEMobilityLevel",
+ "expDataRateDL":"expDataRateDL",
+ "activityFactor":"activityFactor",
+ "resourceSharingLevel":"resourceSharingLevel"
+ }
+ """.trim().replaceAll(" ", "")
+ break
+ default:
+ break
+ }
+
+ logger.debug("Profile map for " + domain + " : " + profileMapStr)
+ Map<String, Object> profileMaps = objectMapper.readValue(profileMapStr, new TypeReference<Map<String, String>>(){})
+ Map<String, Object> sliceProfile = [:]
for (Map.Entry<String, String> profileMap : profileMaps) {
- sliceProfileTn.put(profileMap.key, serviceProfile.get(profileMap.value))
+ String key = profileMap.key
+ String value = profileMaps.get(key)
+ if(serviceProfile.keySet().contains(value)){
+ sliceProfile.put(key, serviceProfile.get(value))
+ }
+ else{
+ sliceProfile.put(key, profileMaps.get(key))
+ }
}
- return sliceProfileTn
+ return sliceProfile
}
void processDecomposition(DelegateExecution execution){
@@ -258,8 +317,8 @@ public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
ServiceDecomposition serviceDecomposition= execution.getVariable("serviceDecomposition")
SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams")
String nstName = serviceDecomposition.getModelInfo().getModelName()
- sliceTaskParams.setNstName(nstName)
String nstId = serviceDecomposition.getModelInfo().getModelUuid()
+ sliceTaskParams.setNstName(nstName)
sliceTaskParams.setNstId(nstId)
logger.debug("End processDecomposition")
@@ -434,4 +493,3 @@ public class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{
logger.debug("Prepare NSSI option completed ")
}
}
-
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy
index e6f6af5ab7..4be6ca7e49 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeallocateNSSI.groovy
@@ -31,15 +31,14 @@ import org.onap.so.beans.nsmf.NssiDeAllocateRequest
import org.onap.so.beans.nsmf.NssiResponse
import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor
import org.onap.so.bpmn.common.scripts.ExceptionUtil
+import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils
import org.onap.so.bpmn.common.scripts.RequestDBUtil
import org.onap.so.bpmn.core.UrnPropertiesReader
import org.onap.so.bpmn.core.domain.ServiceArtifact
import org.onap.so.bpmn.core.domain.ServiceDecomposition
import org.onap.so.bpmn.core.json.JsonUtils
import org.onap.so.client.HttpClient
-import org.onap.so.client.HttpClientFactory
import org.onap.aaiclient.client.aai.AAIObjectType
-import org.onap.aaiclient.client.aai.AAIResourcesClient
import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri
import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory
import org.onap.so.db.request.beans.OperationStatus
@@ -56,6 +55,8 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor
private ExceptionUtil exceptionUtil = new ExceptionUtil()
private JsonUtils jsonUtil = new JsonUtils()
private RequestDBUtil requestDBUtil = new RequestDBUtil()
+ private NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil)
+
private static final Logger LOGGER = LoggerFactory.getLogger( DoDeallocateNSSI.class)
@Override
@@ -103,7 +104,7 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor
* get vendor Info
* @param execution
*/
- void processDecomposition(DelegateExecution execution) {
+ void processDecomposition(DelegateExecution execution) {
LOGGER.debug("*****${PREFIX} start processDecomposition *****")
try {
@@ -150,26 +151,21 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor
deAllocateRequest.setEsrInfo(getEsrInfo(currentNSSI))
ObjectMapper mapper = new ObjectMapper()
- String json = mapper.writeValueAsString(deAllocateRequest)
-
- //Prepare auth for NSSMF - Begin
- String nssmfRequest = UrnPropertiesReader.getVariable("mso.adapters.nssmf.endpoint", execution)
- nssmfRequest = nssmfRequest + String.format("/api/rest/provMns/v1/NSS/SliceProfiles/%s",profileId)
- //nssmfRequest = nssmfRequest + String.format(NssmfAdapterUtil.NSSMI_DEALLOCATE_URL,profileId)
- //send request to active NSSI TN option
- URL url = new URL(nssmfRequest)
- LOGGER.info("deallocate nssmfRequest:${nssmfRequest}, reqBody: ${json}")
-
- HttpClient httpClient = getHttpClientFactory().newJsonClient(url, ONAPComponents.EXTERNAL)
- Response httpResponse = httpClient.post(json)
- checkNssmfResponse(httpResponse, execution)
-
- NssiResponse nssmfResponse = httpResponse.readEntity(NssiResponse.class)
- currentNSSI['jobId']= nssmfResponse.getJobId() ?: ""
- currentNSSI['jobProgress'] = 0
- execution.setVariable("currentNSSI", currentNSSI)
-
- LOGGER.debug("*****${PREFIX} Exit sendRequestToNSSMF *****")
+ String nssmfRequest = mapper.writeValueAsString(deAllocateRequest)
+
+ String urlStr = String.format("/api/rest/provMns/v1/NSS/SliceProfiles/%s",profileId)
+
+ NssiResponse nssmfResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlStr, nssmfRequest, NssiResponse.class)
+ if (nssmfResponse != null) {
+ currentNSSI['jobId']= nssmfResponse.getJobId() ?: ""
+ currentNSSI['jobProgress'] = 0
+ execution.setVariable("currentNSSI", currentNSSI)
+
+ LOGGER.debug("*****${PREFIX} Exit sendRequestToNSSMF *****")
+ } else {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Received a Bad Response from NSSMF.")
+ }
+
}
/**
@@ -189,48 +185,36 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor
jobStatusRequest.setEsrInfo(getEsrInfo(currentNSSI))
ObjectMapper mapper = new ObjectMapper()
- String json = mapper.writeValueAsString(jobStatusRequest)
-
- //Prepare auth for NSSMF - Begin
- String nssmfRequest = UrnPropertiesReader.getVariable("mso.adapters.nssmf.endpoint", execution)
- nssmfRequest = nssmfRequest + String.format("/api/rest/provMns/v1/NSS/jobs/%s",jobId)
- //send request to active NSSI TN option
- URL url = new URL(nssmfRequest)
- LOGGER.info("get deallocate job status, nssmfRequest:${nssmfRequest}, requestBody: ${json}")
-
- HttpClient httpClient = getHttpClientFactory().newJsonClient(url, ONAPComponents.EXTERNAL)
- Response httpResponse = httpClient.post(json)
- checkNssmfResponse(httpResponse, execution)
-
- JobStatusResponse jobStatusResponse = httpResponse.readEntity(JobStatusResponse.class)
- def progress = jobStatusResponse?.getResponseDescriptor()?.getProgress()
- if(!progress)
- {
- LOGGER.error("job progress is null or empty!")
- exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Received a Bad Job progress from NSSMF.")
- }
- int oldProgress = currentNSSI['jobProgress']
- int currentProgress = progress
+ String nssmfRequest = mapper.writeValueAsString(jobStatusRequest)
- execution.setVariable("isNSSIDeAllocated", (currentProgress == 100))
- execution.setVariable("isNeedUpdateDB", (oldProgress != currentProgress))
- currentNSSI['jobProgress'] = currentProgress
+ String urlStr = String.format("/api/rest/provMns/v1/NSS/jobs/%s", jobId)
- def statusDescription = jobStatusResponse?.getResponseDescriptor()?.getStatusDescription()
- currentNSSI['statusDescription'] = statusDescription
+ JobStatusResponse jobStatusResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlStr, nssmfRequest, JobStatusResponse.class)
- LOGGER.debug("job status result: nsiId = ${nsiId}, nssiId=${nssiId}, oldProgress=${oldProgress}, progress = ${currentProgress}" )
- }
+ if (jobStatusResponse != null) {
+ def progress = jobStatusResponse?.getResponseDescriptor()?.getProgress()
+ if(!progress)
+ {
+ LOGGER.error("job progress is null or empty!")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Received a Bad Job progress from NSSMF.")
+ }
+ int oldProgress = currentNSSI['jobProgress']
+ int currentProgress = progress
+
+ execution.setVariable("isNSSIDeAllocated", (currentProgress == 100))
+ execution.setVariable("isNeedUpdateDB", (oldProgress != currentProgress))
+ currentNSSI['jobProgress'] = currentProgress
- private void checkNssmfResponse(Response httpResponse, DelegateExecution execution) {
- int responseCode = httpResponse.getStatus()
- LOGGER.debug("NSSMF response code is: " + responseCode)
+ def statusDescription = jobStatusResponse?.getResponseDescriptor()?.getStatusDescription()
+ currentNSSI['statusDescription'] = statusDescription
- if ( responseCode < 200 || responseCode > 204 || !httpResponse.hasEntity()) {
- exceptionUtil.buildAndThrowWorkflowException(execution, responseCode, "Received a Bad Response from NSSMF.")
+ LOGGER.debug("job status result: nsiId = ${nsiId}, nssiId=${nssiId}, oldProgress=${oldProgress}, progress = ${currentProgress}" )
+
+ } else {
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Received a Bad Response from NSSMF.")
}
- }
+ }
private EsrInfo getEsrInfo(def currentNSSI)
{
@@ -305,4 +289,4 @@ class DoDeallocateNSSI extends AbstractServiceTaskProcessor
}
LOGGER.debug("*****${PREFIX} Exist delSliceProfileFromAAI *****")
}
-}
+} \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandleOrchestrationTask.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandleOrchestrationTask.groovy
index 89490ff620..0f15717b3c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandleOrchestrationTask.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandleOrchestrationTask.groovy
@@ -103,6 +103,7 @@ class HandleOrchestrationTask extends AbstractServiceTaskProcessor {
task.setName(taskName)
task.setStatus(taskStatus)
task.setIsManual(isManual)
+ task.setCreatedTime(new Date())
task.setParams(paramJson)
ObjectMapper objectMapper = new ObjectMapper()
payload = objectMapper.writeValueAsString(task)
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSliceService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSliceService.bpmn
index 013e1b62c2..f27794a389 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSliceService.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSliceService.bpmn
@@ -1,6 +1,6 @@
<?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1wio50w" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.1.2">
- <bpmn:process id="Process_0r5eb97" isExecutable="true">
+<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1wio50w" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
+ <bpmn:process id="CreateSliceService" name="CreateSliceService" isExecutable="true">
<bpmn:startEvent id="StartEvent_1nbljfd" name="Create Slice Service Creation Flow">
<bpmn:outgoing>SequenceFlow_03s744c</bpmn:outgoing>
</bpmn:startEvent>
@@ -369,6 +369,7 @@ css.sendSyncResponse(execution)</bpmn:script>
<camunda:out source="rollbackData" target="rollbackData" />
<camunda:out source="rolledBack" target="rolledBack" />
<camunda:in source="allottedResourceId" target="allottedResourceId" />
+ <camunda:in source="nstSolution" target="nstSolution" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1bevt3a</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0mlrlbv</bpmn:outgoing>
@@ -435,6 +436,10 @@ css.sendSyncResponse(execution)</bpmn:script>
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
<camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="nstSolution" target="nstSolution" />
+ <camunda:out source="sliceProfileTn" target="sliceProfileTn" />
+ <camunda:out source="sliceProfileCn" target="sliceProfileCn" />
+ <camunda:out source="sliceProfileAn" target="sliceProfileAn" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1ey6m1e</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1aaozcg</bpmn:outgoing>
@@ -457,7 +462,7 @@ css.updateAAIOrchStatus(execution)</bpmn:script>
<bpmn:error id="Error_03akl5v" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmn:error id="Error_0p2naox" name="MSOWorkflowException" errorCode="MSOWorkflowException" />
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
- <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0r5eb97">
+ <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateSliceService">
<bpmndi:BPMNShape id="StartEvent_1nbljfd_di" bpmnElement="StartEvent_1nbljfd">
<dc:Bounds x="178" y="103" width="36" height="36" />
<bpmndi:BPMNLabel>
@@ -802,4 +807,3 @@ css.updateAAIOrchStatus(execution)</bpmn:script>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
-
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn
index 6d9df5240d..3024e39c4e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/DeleteSliceService.bpmn
@@ -143,14 +143,15 @@ dss.prepareEndOperationStatus(execution)</bpmn:script>
<bpmn:extensionElements>
<camunda:connector>
<camunda:inputOutput>
- <camunda:inputParameter name="url">${CVFMI_dbAdapterEndpoint}</camunda:inputParameter>
+ <camunda:inputParameter name="url">${dbAdapterEndpoint}</camunda:inputParameter>
<camunda:inputParameter name="headers">
<camunda:map>
<camunda:entry key="content-type">application/soap+xml</camunda:entry>
<camunda:entry key="Authorization">Basic YnBlbDpwYXNzd29yZDEk</camunda:entry>
</camunda:map>
</camunda:inputParameter>
- <camunda:inputParameter name="payload">${CVFMI_updateServiceOperStatusRequest}</camunda:inputParameter>
+ <camunda:inputParameter name="payload">${updateOperationStatus}
+</camunda:inputParameter>
<camunda:inputParameter name="method">POST</camunda:inputParameter>
<camunda:outputParameter name="CVFMI_dbResponseCode">${statusCode}</camunda:outputParameter>
<camunda:outputParameter name="CVFMI_dbResponse">${response}</camunda:outputParameter>
@@ -329,4 +330,4 @@ ex.processJavaException(execution)</bpmn:script>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions>
+</bpmn:definitions> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOption.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOption.bpmn
index 435f91921d..ad0732df4d 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOption.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOption.bpmn
@@ -1,13 +1,13 @@
<?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" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.3">
+<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" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1">
<bpmn:process id="DoCreateSliceServiceOption" name="DoCreateSliceServiceOption" isExecutable="true">
<bpmn:startEvent id="createNS_StartEvent" name="createOption_StartEvent">
<bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="createNS_StartEvent" targetRef="PreprocessIncomingRequest_task" />
- <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="ExclusiveGateway_0b9d9l0" />
+ <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_09nzhwk" />
<bpmn:scriptTask id="Task_09nzhwk" name="send request to OOF for NSI options" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1h5bw41</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1utpplq</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcso = new DoCreateSliceServiceOption()
@@ -20,48 +20,12 @@ dcso.getNSIOptionfromOOF(execution)</bpmn:script>
def dcso = new DoCreateSliceServiceOption()
dcso.preProcessRequest(execution)</bpmn:script>
</bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_0cq2q6g" sourceRef="finishNSCreate_Task" targetRef="ScriptTask_0j3wd2o" />
<bpmn:endEvent id="EndEvent_1x6k78c">
- <bpmn:incoming>SequenceFlow_01ak5x3</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1ap8kar</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0hnsycl</bpmn:incoming>
</bpmn:endEvent>
- <bpmn:scriptTask id="finishNSCreate_Task" name="prepare list of NSSI associated with NSI" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_15679e8</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0cq2q6g</bpmn:outgoing>
- <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
-def dcso = new DoCreateSliceServiceOption()
-dcso.prepareNSSIList(execution)</bpmn:script>
- </bpmn:scriptTask>
- <bpmn:exclusiveGateway id="ExclusiveGateway_0b9d9l0" default="SequenceFlow_0ueeeca">
- <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1h5bw41</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_0ueeeca</bpmn:outgoing>
- </bpmn:exclusiveGateway>
- <bpmn:sequenceFlow id="SequenceFlow_1h5bw41" name="NSI Sharable" sourceRef="ExclusiveGateway_0b9d9l0" targetRef="Task_09nzhwk">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isSharable" ) == true)}</bpmn:conditionExpression>
- </bpmn:sequenceFlow>
- <bpmn:scriptTask id="ScriptTask_1ehyrsg" name="update task status in request DB" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0ueeeca</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_0ojueqq</bpmn:outgoing>
- <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
-def dcso = new DoCreateSliceServiceOption()
-dcso.updateStatusInDB(execution)</bpmn:script>
- </bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_0ueeeca" name="NSI Not Sharable" sourceRef="ExclusiveGateway_0b9d9l0" targetRef="ScriptTask_1ehyrsg" />
- <bpmn:endEvent id="EndEvent_00n990e">
- <bpmn:incoming>SequenceFlow_0ojueqq</bpmn:incoming>
- </bpmn:endEvent>
- <bpmn:scriptTask id="ScriptTask_0j3wd2o" name="updated options in request DB" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0cq2q6g</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_01ak5x3</bpmn:outgoing>
- <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
-def dcso = new DoCreateSliceServiceOption()
-dcso.updateOptionsInDB(execution)</bpmn:script>
- </bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_01ak5x3" sourceRef="ScriptTask_0j3wd2o" targetRef="EndEvent_1x6k78c" />
<bpmn:scriptTask id="ScriptTask_0kecvrc" name="prepare list of NSST associated with NST" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1614gtr</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0wy6oag</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0lt2cdo</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def dcso = new DoCreateSliceServiceOption()
@@ -76,7 +40,7 @@ dcso.getNSSTOption(execution)</bpmn:script>
</bpmn:scriptTask>
<bpmn:exclusiveGateway id="ExclusiveGateway_1y1wzs9">
<bpmn:incoming>SequenceFlow_0lt2cdo</bpmn:incoming>
- <bpmn:incoming>SequenceFlow_00gq7h2</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_1r9n9ef</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1ap8kar</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0m2mr0o</bpmn:outgoing>
</bpmn:exclusiveGateway>
@@ -87,44 +51,7 @@ dcso.getNSSTOption(execution)</bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_0m2mr0o" sourceRef="ExclusiveGateway_1y1wzs9" targetRef="ScriptTask_1e5ysya">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isMoreNSSTtoProcess" ) == true)}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
- <bpmn:scriptTask id="ScriptTask_0ojz4lj" name="save NSI and NSSI options in DB" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_1r9n9ef</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_00gq7h2</bpmn:outgoing>
- <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
-def dcso = new DoCreateSliceServiceOption()
-dcso.updateOptionsInDB(execution)</bpmn:script>
- </bpmn:scriptTask>
- <bpmn:sequenceFlow id="SequenceFlow_1r9n9ef" sourceRef="ScriptTask_1mlytov" targetRef="ScriptTask_0ojz4lj" />
- <bpmn:sequenceFlow id="SequenceFlow_00gq7h2" sourceRef="ScriptTask_0ojz4lj" targetRef="ExclusiveGateway_1y1wzs9" />
- <bpmn:sequenceFlow id="SequenceFlow_0ojueqq" sourceRef="ScriptTask_1ehyrsg" targetRef="EndEvent_00n990e" />
- <bpmn:exclusiveGateway id="ExclusiveGateway_1mdr1l2" default="SequenceFlow_1614gtr">
- <bpmn:incoming>SequenceFlow_041f5ne</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_15679e8</bpmn:outgoing>
- <bpmn:outgoing>SequenceFlow_1614gtr</bpmn:outgoing>
- </bpmn:exclusiveGateway>
- <bpmn:sequenceFlow id="SequenceFlow_15679e8" sourceRef="ExclusiveGateway_1mdr1l2" targetRef="finishNSCreate_Task">
- <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSISuggested" ) == true)}</bpmn:conditionExpression>
- </bpmn:sequenceFlow>
- <bpmn:sequenceFlow id="SequenceFlow_1614gtr" sourceRef="ExclusiveGateway_1mdr1l2" targetRef="ScriptTask_0kecvrc" />
- <bpmn:scriptTask id="ScriptTask_0uu3j3h" name="prepare NST decomposition" scriptFormat="groovy">
- <bpmn:incoming>SequenceFlow_0wy6oag</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_1jnsyix</bpmn:outgoing>
- <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
-def dcso = new DoCreateSliceServiceOption()
-dcso.prepareNSTDecompose(execution)</bpmn:script>
- </bpmn:scriptTask>
- <bpmn:callActivity id="CallActivity_1qs8xd5" name="Call Decompose Service" calledElement="DecomposeService">
- <bpmn:extensionElements>
- <camunda:in source="msoRequestId" target="msoRequestId" />
- <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
- <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
- <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
- <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
- <camunda:out source="WorkflowException" target="WorkflowException" />
- </bpmn:extensionElements>
- <bpmn:incoming>SequenceFlow_1jnsyix</bpmn:incoming>
- <bpmn:outgoing>SequenceFlow_041f5ne</bpmn:outgoing>
- </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_1r9n9ef" sourceRef="ScriptTask_1mlytov" targetRef="ExclusiveGateway_1y1wzs9" />
<bpmn:scriptTask id="ScriptTask_1e5ysya" name="prepare NSST decomposition" scriptFormat="groovy">
<bpmn:incoming>SequenceFlow_0m2mr0o</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_016vi3s</bpmn:outgoing>
@@ -146,193 +73,163 @@ dcso.prepareNSSTDecompose(execution)</bpmn:script>
<bpmn:outgoing>SequenceFlow_0a5f5y6</bpmn:outgoing>
</bpmn:callActivity>
<bpmn:sequenceFlow id="SequenceFlow_0a5f5y6" sourceRef="CallActivity_1rfnoe2" targetRef="ScriptTask_1mlytov" />
- <bpmn:sequenceFlow id="SequenceFlow_1utpplq" sourceRef="Task_09nzhwk" targetRef="ExclusiveGateway_1skfk7w" />
- <bpmn:sequenceFlow id="SequenceFlow_1jnsyix" sourceRef="ScriptTask_0uu3j3h" targetRef="CallActivity_1qs8xd5" />
- <bpmn:sequenceFlow id="SequenceFlow_041f5ne" sourceRef="CallActivity_1qs8xd5" targetRef="ExclusiveGateway_1mdr1l2" />
+ <bpmn:sequenceFlow id="SequenceFlow_1utpplq" sourceRef="Task_09nzhwk" targetRef="ScriptTask_1umbyel" />
<bpmn:exclusiveGateway id="ExclusiveGateway_1skfk7w" default="SequenceFlow_0wy6oag">
- <bpmn:incoming>SequenceFlow_1utpplq</bpmn:incoming>
+ <bpmn:incoming>SequenceFlow_0d774n5</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0wy6oag</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0hnsycl</bpmn:outgoing>
</bpmn:exclusiveGateway>
- <bpmn:sequenceFlow id="SequenceFlow_0wy6oag" sourceRef="ExclusiveGateway_1skfk7w" targetRef="ScriptTask_0uu3j3h" />
+ <bpmn:sequenceFlow id="SequenceFlow_0wy6oag" sourceRef="ExclusiveGateway_1skfk7w" targetRef="ScriptTask_0kecvrc" />
<bpmn:sequenceFlow id="SequenceFlow_0hnsycl" sourceRef="ExclusiveGateway_1skfk7w" targetRef="EndEvent_1x6k78c">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSISuggested" ) == true)}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
+ <bpmn:scriptTask id="ScriptTask_1umbyel" name="prepare NST decomposition" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_1utpplq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0piifl1</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcso = new DoCreateSliceServiceOption()
+dcso.prepareNSTDecompose(execution)</bpmn:script>
+ </bpmn:scriptTask>
+ <bpmn:sequenceFlow id="SequenceFlow_0piifl1" sourceRef="ScriptTask_1umbyel" targetRef="CallActivity_0ly8xiw" />
+ <bpmn:callActivity id="CallActivity_0ly8xiw" name="Call Decompose Service" calledElement="DecomposeService">
+ <bpmn:extensionElements>
+ <camunda:in source="msoRequestId" target="msoRequestId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
+ <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
+ <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="WorkflowException" target="WorkflowException" />
+ </bpmn:extensionElements>
+ <bpmn:incoming>SequenceFlow_0piifl1</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_086yszq</bpmn:outgoing>
+ </bpmn:callActivity>
+ <bpmn:sequenceFlow id="SequenceFlow_086yszq" sourceRef="CallActivity_0ly8xiw" targetRef="Task_1k2ypj0" />
+ <bpmn:sequenceFlow id="SequenceFlow_0d774n5" sourceRef="Task_1k2ypj0" targetRef="ExclusiveGateway_1skfk7w" />
+ <bpmn:scriptTask id="Task_1k2ypj0" name="Process Decomposition" scriptFormat="groovy">
+ <bpmn:incoming>SequenceFlow_086yszq</bpmn:incoming>
+ <bpmn:outgoing>SequenceFlow_0d774n5</bpmn:outgoing>
+ <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
+def dcso = new DoCreateSliceServiceOption()
+dcso.processDecomposition(execution)</bpmn:script>
+ </bpmn:scriptTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateSliceServiceOption">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent">
- <dc:Bounds x="175" y="187" width="36" height="36" />
+ <dc:Bounds x="175" y="107" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="150" y="223" width="87" height="27" />
+ <dc:Bounds x="151" y="143" width="86" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln">
- <di:waypoint x="211" y="205" />
- <di:waypoint x="251" y="205" />
- <di:waypoint x="251" y="205" />
- <di:waypoint x="293" y="205" />
+ <di:waypoint x="211" y="125" />
+ <di:waypoint x="251" y="125" />
+ <di:waypoint x="251" y="125" />
+ <di:waypoint x="293" y="125" />
<bpmndi:BPMNLabel>
<dc:Bounds x="266" y="123" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova">
- <di:waypoint x="393" y="205" />
- <di:waypoint x="448" y="205" />
+ <di:waypoint x="393" y="125" />
+ <di:waypoint x="460" y="125" />
<bpmndi:BPMNLabel>
<dc:Bounds x="436" y="108" width="0" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_1dw39hg_di" bpmnElement="Task_09nzhwk">
- <dc:Bounds x="594" y="165" width="100" height="80" />
+ <dc:Bounds x="460" y="85" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task">
- <dc:Bounds x="293" y="165" width="100" height="80" />
+ <dc:Bounds x="293" y="85" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0cq2q6g_di" bpmnElement="SequenceFlow_0cq2q6g">
- <di:waypoint x="1536" y="205" />
- <di:waypoint x="1592" y="205" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="556.5" y="574" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c">
- <dc:Bounds x="1813" y="187" width="36" height="36" />
+ <dc:Bounds x="1813" y="107" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="412" y="617" width="90" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0xxyfku_di" bpmnElement="finishNSCreate_Task">
- <dc:Bounds x="1436" y="165" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ExclusiveGateway_0b9d9l0_di" bpmnElement="ExclusiveGateway_0b9d9l0" isMarkerVisible="true">
- <dc:Bounds x="448" y="180" width="50" height="50" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1h5bw41_di" bpmnElement="SequenceFlow_1h5bw41">
- <di:waypoint x="498" y="205" />
- <di:waypoint x="594" y="205" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="514" y="187" width="66" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_1ehyrsg_di" bpmnElement="ScriptTask_1ehyrsg">
- <dc:Bounds x="602" y="-197" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0ueeeca_di" bpmnElement="SequenceFlow_0ueeeca">
- <di:waypoint x="473" y="180" />
- <di:waypoint x="473" y="-157" />
- <di:waypoint x="602" y="-157" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="415" y="14" width="86" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="EndEvent_00n990e_di" bpmnElement="EndEvent_00n990e">
- <dc:Bounds x="785" y="-175" width="36" height="36" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="ScriptTask_0j3wd2o_di" bpmnElement="ScriptTask_0j3wd2o">
- <dc:Bounds x="1592" y="165" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_01ak5x3_di" bpmnElement="SequenceFlow_01ak5x3">
- <di:waypoint x="1692" y="205" />
- <di:waypoint x="1813" y="205" />
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ScriptTask_0kecvrc_di" bpmnElement="ScriptTask_0kecvrc">
- <dc:Bounds x="1297" y="391" width="100" height="80" />
+ <dc:Bounds x="1250" y="311" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1mlytov_di" bpmnElement="ScriptTask_1mlytov">
- <dc:Bounds x="1781" y="533" width="100" height="80" />
+ <dc:Bounds x="1680" y="453" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_1y1wzs9_di" bpmnElement="ExclusiveGateway_1y1wzs9" isMarkerVisible="true">
- <dc:Bounds x="1461" y="406" width="50" height="50" />
+ <dc:Bounds x="1461" y="326" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1ap8kar_di" bpmnElement="SequenceFlow_1ap8kar">
- <di:waypoint x="1486" y="406" />
- <di:waypoint x="1486" y="315" />
- <di:waypoint x="1831" y="315" />
- <di:waypoint x="1831" y="223" />
+ <di:waypoint x="1486" y="326" />
+ <di:waypoint x="1486" y="235" />
+ <di:waypoint x="1831" y="235" />
+ <di:waypoint x="1831" y="143" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0lt2cdo_di" bpmnElement="SequenceFlow_0lt2cdo">
- <di:waypoint x="1397" y="431" />
- <di:waypoint x="1461" y="431" />
+ <di:waypoint x="1350" y="351" />
+ <di:waypoint x="1461" y="351" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0m2mr0o_di" bpmnElement="SequenceFlow_0m2mr0o">
- <di:waypoint x="1511" y="431" />
- <di:waypoint x="1592" y="431" />
+ <di:waypoint x="1511" y="351" />
+ <di:waypoint x="1592" y="351" />
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0ojz4lj_di" bpmnElement="ScriptTask_0ojz4lj">
- <dc:Bounds x="1592" y="533" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1r9n9ef_di" bpmnElement="SequenceFlow_1r9n9ef">
- <di:waypoint x="1781" y="573" />
- <di:waypoint x="1692" y="573" />
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_00gq7h2_di" bpmnElement="SequenceFlow_00gq7h2">
- <di:waypoint x="1592" y="573" />
- <di:waypoint x="1486" y="573" />
- <di:waypoint x="1486" y="456" />
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0ojueqq_di" bpmnElement="SequenceFlow_0ojueqq">
- <di:waypoint x="702" y="-157" />
- <di:waypoint x="785" y="-157" />
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ExclusiveGateway_1mdr1l2_di" bpmnElement="ExclusiveGateway_1mdr1l2" isMarkerVisible="true">
- <dc:Bounds x="1322" y="180" width="50" height="50" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_15679e8_di" bpmnElement="SequenceFlow_15679e8">
- <di:waypoint x="1372" y="205" />
- <di:waypoint x="1436" y="205" />
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1614gtr_di" bpmnElement="SequenceFlow_1614gtr">
- <di:waypoint x="1347" y="230" />
- <di:waypoint x="1347" y="391" />
+ <di:waypoint x="1680" y="493" />
+ <di:waypoint x="1486" y="493" />
+ <di:waypoint x="1486" y="376" />
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="ScriptTask_0uu3j3h_di" bpmnElement="ScriptTask_0uu3j3h">
- <dc:Bounds x="967" y="165" width="100" height="80" />
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="CallActivity_1qs8xd5_di" bpmnElement="CallActivity_1qs8xd5">
- <dc:Bounds x="1136" y="165" width="100" height="80" />
- </bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ScriptTask_1e5ysya_di" bpmnElement="ScriptTask_1e5ysya">
- <dc:Bounds x="1592" y="391" width="100" height="80" />
+ <dc:Bounds x="1592" y="311" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_016vi3s_di" bpmnElement="SequenceFlow_016vi3s">
- <di:waypoint x="1692" y="431" />
- <di:waypoint x="1781" y="431" />
+ <di:waypoint x="1692" y="351" />
+ <di:waypoint x="1781" y="351" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_1rfnoe2_di" bpmnElement="CallActivity_1rfnoe2">
- <dc:Bounds x="1781" y="391" width="100" height="80" />
+ <dc:Bounds x="1781" y="311" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0a5f5y6_di" bpmnElement="SequenceFlow_0a5f5y6">
- <di:waypoint x="1881" y="431" />
- <di:waypoint x="1968" y="431" />
- <di:waypoint x="1968" y="573" />
- <di:waypoint x="1881" y="573" />
+ <di:waypoint x="1881" y="351" />
+ <di:waypoint x="1968" y="351" />
+ <di:waypoint x="1968" y="493" />
+ <di:waypoint x="1780" y="493" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1utpplq_di" bpmnElement="SequenceFlow_1utpplq">
- <di:waypoint x="694" y="205" />
- <di:waypoint x="796" y="205" />
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_1jnsyix_di" bpmnElement="SequenceFlow_1jnsyix">
- <di:waypoint x="1067" y="205" />
- <di:waypoint x="1136" y="205" />
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_041f5ne_di" bpmnElement="SequenceFlow_041f5ne">
- <di:waypoint x="1236" y="205" />
- <di:waypoint x="1322" y="205" />
+ <di:waypoint x="560" y="125" />
+ <di:waypoint x="620" y="125" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ExclusiveGateway_1skfk7w_di" bpmnElement="ExclusiveGateway_1skfk7w" isMarkerVisible="true">
- <dc:Bounds x="796" y="180" width="50" height="50" />
+ <dc:Bounds x="1095" y="100" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0wy6oag_di" bpmnElement="SequenceFlow_0wy6oag">
- <di:waypoint x="846" y="205" />
- <di:waypoint x="967" y="205" />
+ <di:waypoint x="1120" y="150" />
+ <di:waypoint x="1120" y="351" />
+ <di:waypoint x="1250" y="351" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0hnsycl_di" bpmnElement="SequenceFlow_0hnsycl">
- <di:waypoint x="821" y="180" />
- <di:waypoint x="821" y="90" />
- <di:waypoint x="1831" y="90" />
- <di:waypoint x="1831" y="187" />
+ <di:waypoint x="1145" y="125" />
+ <di:waypoint x="1813" y="125" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1umbyel_di" bpmnElement="ScriptTask_1umbyel">
+ <dc:Bounds x="620" y="85" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_0piifl1_di" bpmnElement="SequenceFlow_0piifl1">
+ <di:waypoint x="720" y="125" />
+ <di:waypoint x="780" y="125" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="CallActivity_0ly8xiw_di" bpmnElement="CallActivity_0ly8xiw">
+ <dc:Bounds x="780" y="85" width="100" height="80" />
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="SequenceFlow_086yszq_di" bpmnElement="SequenceFlow_086yszq">
+ <di:waypoint x="880" y="125" />
+ <di:waypoint x="940" y="125" />
</bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0d774n5_di" bpmnElement="SequenceFlow_0d774n5">
+ <di:waypoint x="1040" y="125" />
+ <di:waypoint x="1095" y="125" />
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="ScriptTask_1895p18_di" bpmnElement="Task_1k2ypj0">
+ <dc:Bounds x="940" y="85" width="100" height="80" />
+ </bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
-</bpmn:definitions>
+</bpmn:definitions> \ No newline at end of file
diff --git a/common/src/main/java/org/onap/so/logging/tasks/AuditMDCSetup.java b/common/src/main/java/org/onap/so/logging/tasks/AuditMDCSetup.java
index 8d98307a43..39d208b1dd 100644
--- a/common/src/main/java/org/onap/so/logging/tasks/AuditMDCSetup.java
+++ b/common/src/main/java/org/onap/so/logging/tasks/AuditMDCSetup.java
@@ -3,6 +3,7 @@ package org.onap.so.logging.tasks;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
+import java.util.UUID;
import org.camunda.bpm.client.task.ExternalTask;
import org.onap.logging.filter.base.MDCSetup;
import org.onap.logging.filter.base.ONAPComponents;
@@ -30,6 +31,7 @@ public class AuditMDCSetup {
MDC.put(ONAPLogConstants.MDCs.SERVICE_NAME, externalTask.getTopicName());
MDC.put(ONAPLogConstants.MDCs.PARTNER_NAME, ONAPComponents.OPENSTACK_ADAPTER.toString());
setResponseCode(ONAPLogConstants.ResponseStatus.INPROGRESS.toString());
+ MDC.put(ONAPLogConstants.MDCs.INVOCATION_ID, UUID.randomUUID().toString());
setElapsedTime();
mdcSetup.setServerFQDN();
logger.info(ONAPLogConstants.Markers.ENTRY, "Entering");
@@ -53,5 +55,4 @@ public class AuditMDCSetup {
MDC.remove(ONAPLogConstants.MDCs.ELAPSED_TIME);
MDC.remove(ONAPLogConstants.MDCs.PARTNER_NAME);
}
-
}
diff --git a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java
index d1f509f476..1e1c8a7de1 100644
--- a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java
+++ b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPLoggingInInterceptor.java
@@ -31,6 +31,7 @@ import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.transport.http.AbstractHTTPDestination;
+import org.onap.logging.filter.base.MDCSetup;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -48,7 +49,7 @@ public class SOAPLoggingInInterceptor extends AbstractSoapInterceptor {
@Override
public void handleMessage(SoapMessage message) throws Fault {
try {
- SOAPMDCSetup mdcSetup = new SOAPMDCSetup();
+ MDCSetup mdcSetup = new MDCSetup();
Map<String, List<String>> headers = (Map<String, List<String>>) message.get(Message.PROTOCOL_HEADERS);
HttpServletRequest request = (HttpServletRequest) message.get(AbstractHTTPDestination.HTTP_REQUEST);
request.getRemoteAddr();
@@ -59,8 +60,10 @@ public class SOAPLoggingInInterceptor extends AbstractSoapInterceptor {
setMDCPartnerName(headers);
mdcSetup.setServerFQDN();
mdcSetup.setClientIPAddress(request);
- mdcSetup.setInstanceUUID();
+ mdcSetup.setInstanceID();
mdcSetup.setEntryTimeStamp();
+ mdcSetup.setLogTimestamp();
+ mdcSetup.setElapsedTime();
MDC.put(ONAPLogConstants.MDCs.RESPONSE_STATUS_CODE, "INPROGRESS");
logger.info(ONAPLogConstants.Markers.ENTRY, "Entering");
} catch (Exception e) {
diff --git a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPMDCSetup.java b/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPMDCSetup.java
deleted file mode 100644
index 8258ce6f99..0000000000
--- a/cxf-logging/src/main/java/org/onap/so/logging/cxf/interceptor/SOAPMDCSetup.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.logging.cxf.interceptor;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.time.ZoneOffset;
-import java.time.ZonedDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.UUID;
-import javax.servlet.http.HttpServletRequest;
-import org.onap.logging.ref.slf4j.ONAPLogConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.MDC;
-
-
-
-public class SOAPMDCSetup {
-
- protected static Logger logger = LoggerFactory.getLogger(SOAPMDCSetup.class);
-
- private static final String INSTANCE_UUID = UUID.randomUUID().toString();
-
- public void setInstanceUUID() {
- MDC.put(ONAPLogConstants.MDCs.INSTANCE_UUID, INSTANCE_UUID);
- }
-
- public void setServerFQDN() {
- String serverFQDN = "";
- InetAddress addr = null;
- try {
- addr = InetAddress.getLocalHost();
- serverFQDN = addr.toString();
- } catch (UnknownHostException e) {
- logger.warn("Cannot Resolve Host Name");
- serverFQDN = "";
- }
- MDC.put(ONAPLogConstants.MDCs.SERVER_FQDN, serverFQDN);
- }
-
- public void setClientIPAddress(HttpServletRequest httpServletRequest) {
- String remoteIpAddress = "";
- if (httpServletRequest != null) {
- remoteIpAddress = httpServletRequest.getRemoteAddr();
- }
- MDC.put(ONAPLogConstants.MDCs.CLIENT_IP_ADDRESS, remoteIpAddress);
- }
-
- public void setEntryTimeStamp() {
- MDC.put(ONAPLogConstants.MDCs.ENTRY_TIMESTAMP,
- ZonedDateTime.now(ZoneOffset.UTC).format(DateTimeFormatter.ISO_INSTANT));
- }
-
-
-}
diff --git a/deployment-configs/src/main/resources/logger/logback-spring.xml b/deployment-configs/src/main/resources/logger/logback-spring.xml
index 258382b834..bd9712ad87 100644
--- a/deployment-configs/src/main/resources/logger/logback-spring.xml
+++ b/deployment-configs/src/main/resources/logger/logback-spring.xml
@@ -52,7 +52,8 @@
<appender name="Audit"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>ENTRY</marker>
<marker>EXIT</marker>
</evaluator>
<onMismatch>DENY</onMismatch>
@@ -80,7 +81,8 @@
<appender name="Metric"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
- <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <evaluator class="ch.qos.logback.classic.boolex.OnMarkerEvaluator">
+ <marker>INVOKE</marker>
<marker>INVOKE-RETURN</marker>
</evaluator>
<onMismatch>DENY</onMismatch>
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java
index f0943393ed..7aa6e0f831 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/tenantisolation/helpers/SDCClientHelper.java
@@ -108,7 +108,6 @@ public class SDCClientHelper {
HttpClient httpClient = httpClientFactory.newJsonClient(url, ONAPComponents.SDC);
httpClient.addBasicAuthHeader(sdcClientAuth, msoKey);
httpClient.addAdditionalHeader("X-ECOMP-InstanceID", sdcActivateInstanceId);
- httpClient.addAdditionalHeader("X-ECOMP-RequestID", UUID.randomUUID().toString());
httpClient.addAdditionalHeader("Content-Type", SDCClientHelper.SDC_CONTENT_TYPE);
httpClient.addAdditionalHeader("Accept", SDCClientHelper.SDC_ACCEPT_TYPE);
httpClient.addAdditionalHeader("USER_ID", sdcActivateUserId);
diff --git a/pom.xml b/pom.xml
index 6ee92f574d..9a095f5147 100644
--- a/pom.xml
+++ b/pom.xml
@@ -20,7 +20,7 @@
<organization>
<name>ONAP - SO</name>
<url>http://www.onap.org/</url>
- </organization>
+ </organization>
<modules>
<module>deployment-configs</module>
<module>common</module>
@@ -823,17 +823,17 @@
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-slf4j</artifactId>
- <version>1.6.6</version>
+ <version>1.6.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-filter-base</artifactId>
- <version>1.6.6</version>
+ <version>1.6.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.onap.logging-analytics</groupId>
<artifactId>logging-filter-spring</artifactId>
- <version>1.6.6</version>
+ <version>1.6.7-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>