summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCommunicationService.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy10
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy12
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy3
7 files changed, 28 insertions, 13 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy
index 78cafa7be5..1e65c1a9dd 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/AllocateSliceSubnet.groovy
@@ -114,7 +114,7 @@ class AllocateSliceSubnet extends AbstractServiceTaskProcessor {
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
} else
{
- execution.setVariable("networkType", networkType.toUpperCase())
+ execution.setVariable("networkType", networkType.toLowerCase())
}
//requestParameters, subscriptionServiceType is 5G
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCommunicationService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCommunicationService.groovy
index bb6fe212b3..c7302d001c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCommunicationService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCommunicationService.groovy
@@ -395,6 +395,10 @@ class CreateCommunicationService extends AbstractServiceTaskProcessor {
e2eInputMap.put("dLThptPerSlice", dLThptPerSlice)
e2eInputMap.put("uLThptPerSlice", uLThptPerSlice)
e2eInputMap.put("maxNumberofConns", maxNumberofConns)
+ //TODO temp solution - service to slice profile mapping
+ e2eInputMap.put("expDataRateDL", dLThptPerSlice)
+ e2eInputMap.put("expDataRateUL", uLThptPerSlice)
+ e2eInputMap.put("maxNumberofPDUSession", maxNumberofConns)
execution.setVariable("e2eInputMap", e2eInputMap)
execution.setVariable("e2eServiceType", e2eServiceDecomposition.getServiceType())
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
index d00f349690..a1acbb3377 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy
@@ -215,13 +215,15 @@ class DeleteCommunicationService extends AbstractServiceTaskProcessor {
requestBody.replaceAll("\\s+", "")
String msoKey = UrnPropertiesReader.getVariable("mso.msoKey", execution)
- String basicAuth = UrnPropertiesReader.getVariable("mso.infra.endpoint.auth", execution)
+ String basicAuth = UrnPropertiesReader.getVariable("mso.adapters.po.auth", execution)
+ def authHeader = utils.getBasicAuth(basicAuth, msoKey)
+
// String basicAuthValue = utils.encrypt(basicAuth, msoKey)
// String encodeString = utils.getBasicAuth(basicAuthValue, msoKey)
HttpClient httpClient = getHttpClientFactory().newJsonClient(new URL(url), ONAPComponents.SO)
// httpClient.addAdditionalHeader("Authorization", encodeString)
- httpClient.addAdditionalHeader("Authorization", basicAuth)
+ httpClient.addAdditionalHeader("Authorization", authHeader)
httpClient.addAdditionalHeader("Accept", "application/json")
Response httpResponse = httpClient.delete(requestBody)
handleNSSMFWFResponse(httpResponse, execution)
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy
index f3fca050a2..a4d503a86c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateAccessNSSI.groovy
@@ -565,7 +565,7 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
List<String> snssaiList = execution.getVariable("snssaiList")
String snssai = snssaiList.get(0)
//ANServiceInstance.setEnvironmentContext(snssai)
- ANServiceInstance.setEnvironmentContext("an") //Network Type
+ ANServiceInstance.setEnvironmentContext(execution.getVariable("networkType")) //Network Type
ANServiceInstance.setWorkloadContext("AN") //domain Type
logger.debug("completed AN service instance build "+ ANServiceInstance.toString())
@@ -631,7 +631,8 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
ANServiceInstance.setServiceRole(serviceRole)
List<String> snssaiList = execution.getVariable("snssaiList")
String snssai = snssaiList.get(0)
- ANServiceInstance.setEnvironmentContext(snssai)
+ //ANServiceInstance.setEnvironmentContext(snssai)
+ ANServiceInstance.setEnvironmentContext(execution.getVariable("networkType"))
String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
String modelUuid = execution.getVariable("modelUuid")
ANServiceInstance.setModelInvariantId(modelInvariantUuid)
@@ -651,7 +652,8 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
ANNFServiceInstance.setServiceRole(serviceRole)
snssaiList = execution.getVariable("snssaiList")
snssai = snssaiList.get(0)
- ANNFServiceInstance.setEnvironmentContext(snssai)
+ //ANNFServiceInstance.setEnvironmentContext(snssai)
+ ANNFServiceInstance.setEnvironmentContext(execution.getVariable("networkType"))
ANNFServiceInstance.setModelInvariantId(execution.getVariable("ANNF_modelInvariantUuid"))
ANNFServiceInstance.setModelVersionId(execution.getVariable("ANNF_modelUuid"))
ANNFServiceInstance.setWorkloadContext("AN_NF")
@@ -923,7 +925,7 @@ class DoAllocateAccessNSSI extends AbstractServiceTaskProcessor {
JsonObject commonHeader = new JsonObject()
JsonObject payload = new JsonObject()
JsonObject payloadInput = new JsonObject()
- commonHeader.addProperty("timeStamp",new Date(System.currentTimeMillis()).format("yyyy-MM-dd'T'HH:mm:ss.sss'Z'", TimeZone.getDefault()))
+ commonHeader.addProperty("timestamp",new Date(System.currentTimeMillis()).format("yyyy-MM-dd'T'HH:mm:ss.sss'Z'", TimeZone.getDefault()))
commonHeader.addProperty("api-ver", "1.0")
commonHeader.addProperty("originator-id", "testing")
commonHeader.addProperty("request-id", requestId)
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 e4281045bd..0d64d7811b 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
@@ -127,6 +127,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
String serviceStatus = "deactivated"
String modelInvariantUuid = sliceParams.getNSTInfo().invariantUUID
String modelUuid = sliceParams.getNSTInfo().UUID
+ String serviceFunction = sliceParams.serviceProfile.get("resourceSharingLevel")
sliceParams.setSuggestNsiId(sliceInstanceId)
sliceParams.setSuggestNsiName(sliceInstanceName)
@@ -144,6 +145,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
nsi.setModelVersionId(modelUuid)
nsi.setServiceInstanceLocationId(serviceInstanceLocationid)
nsi.setServiceRole(serviceRole)
+ nsi.setServiceFunction(serviceFunction)
String msg
try {
@@ -263,7 +265,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter
SliceTaskInfo<SliceProfileAdapter> sliceTaskInfo = sliceParams.anSliceTaskInfo
sliceTaskInfo.setSliceInstanceId(serviceInstanceId)
- String sliceProfileName = "an_" + sliceParams.serviceName
+ String sliceProfileName = "sliceprofile_an_" + sliceParams.serviceName
// create slice profile
ServiceInstance rspi = createSliceProfileInstance(sliceTaskInfo, sliceProfileName, oStatus)
@@ -401,6 +403,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
allocateAnNssi.nsstId = sliceTaskInfo.NSSTInfo.UUID
allocateAnNssi.nssiId = sliceTaskInfo.suggestNssiId
allocateAnNssi.nssiName = "nssi_an" + execution.getVariable("sliceServiceInstanceName")
+ allocateAnNssi.scriptName = sliceTaskInfo.getScriptName()
NsiInfo nsiInfo = new NsiInfo()
nsiInfo.nsiId = sliceParams.suggestNsiId
nsiInfo.nsiName = sliceParams.suggestNsiName
@@ -458,7 +461,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter
SliceTaskInfo<SliceProfileAdapter> sliceTaskInfo = sliceParams.cnSliceTaskInfo
sliceTaskInfo.setSliceInstanceId(serviceInstanceId)
- String sliceProfileName = "cn_"+sliceParams.serviceName
+ String sliceProfileName = "sliceprofile_cn_"+sliceParams.serviceName
// create slice profile
ServiceInstance rspi = createSliceProfileInstance(sliceTaskInfo, sliceProfileName, oStatus)
@@ -544,6 +547,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
allocateCnNssi.nssiName = "nssi_cn" + execution.getVariable("sliceServiceInstanceName")
allocateCnNssi.sliceProfile = sliceTaskInfo.sliceProfile.trans2CnProfile()
allocateCnNssi.sliceProfile.sliceProfileId = sliceTaskInfo.sliceInstanceId
+ allocateCnNssi.scriptName = sliceTaskInfo.getScriptName()
NsiInfo nsiInfo = new NsiInfo()
nsiInfo.nsiId = sliceParams.suggestNsiId
@@ -602,7 +606,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
String serviceInstanceId = UUID.randomUUID().toString()
sliceTaskInfo.setSliceInstanceId(serviceInstanceId)
- String sliceProfileName = "tn_" + sliceParams.serviceName
+ String sliceProfileName = "sliceprofile_tn_" + sliceParams.serviceName
//execution.setVariable("cnSliceProfileInstanceId", serviceInstanceId) //todo:
// create slice profile
@@ -671,6 +675,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
AllocateTnNssi allocateTnNssi = new AllocateTnNssi()
allocateTnNssi.setNssiId(sliceTaskInfo.suggestNssiId)
+ allocateTnNssi.scriptName = sliceTaskInfo.getScriptName()
//todo: AllocateTnNssi
//todo: endPointId -> set into tn
List<TransportSliceNetwork> transportSliceNetworks = new ArrayList<>()
@@ -943,6 +948,7 @@ class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{
rspi.setModelVersionId(sliceTaskInfo.NSSTInfo.UUID)
rspi.setWorkloadContext(sliceTaskInfo.subnetType.subnetType)
rspi.setEnvironmentContext(sliceTaskInfo.sliceProfile.getSNSSAIList())
+ rspi.setServiceFunction(sliceTaskInfo.sliceProfile.getResourceSharingLevel())
//timestamp format YYYY-MM-DD hh:mm:ss
rspi.setCreatedAt(new Date(System.currentTimeMillis()).format("yyyy-MM-dd HH:mm:ss", TimeZone.getDefault()))
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy
index 8859af25f6..f6be861bde 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoModifyAccessNSSI.groovy
@@ -388,12 +388,12 @@ class DoModifyAccessNSSI extends AbstractServiceTaskProcessor {
Optional<org.onap.aai.domain.yang.LogicalLink> resource = wrapper01.asBean(org.onap.aai.domain.yang.LogicalLink.class)
if (resource.isPresent()) {
org.onap.aai.domain.yang.LogicalLink logicalLinkInstance = resource.get()
- if(domainType.equalsIgnoreCase("TN-FH"))
+ if(domainType.equalsIgnoreCase("TN_FH"))
{
execution.setVariable("tranportEp_ID_RU",logicalLinkInstance.getLinkName())
execution.setVariable("tranportEp_ID_DUIN",logicalLinkInstance.getLinkName2())
}
- else if(domainType.equalsIgnoreCase("TN-MH"))
+ else if(domainType.equalsIgnoreCase("TN_MH"))
{
execution.setVariable("tranportEp_ID_DUEG",logicalLinkInstance.getLinkName())
execution.setVariable("tranportEp_ID_CUIN",logicalLinkInstance.getLinkName2())
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy
index 7e505d1912..146ceddab4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/ModifySliceSubnet.groovy
@@ -142,7 +142,8 @@ class ModifySliceSubnet extends AbstractServiceTaskProcessor {
ResourceOperationStatus initStatus = new ResourceOperationStatus()
initStatus.setServiceId(nsiId)
initStatus.setOperationId(jobId)
- initStatus.setResourceTemplateUUID(modelUuid)
+ //initStatus.setResourceTemplateUUID(modelUuid)
+ initStatus.setResourceInstanceID(nssiId)
initStatus.setOperType("Modify")
requestDBUtil.prepareInitResourceOperationStatus(execution, initStatus)