aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy146
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy1
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/BPMNLogger.java37
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java61
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfRollback.java28
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java37
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java18
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java5
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java8
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy4
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy6
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy5
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy9
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy2
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy3
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy1
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy1
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java4
22 files changed, 215 insertions, 173 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
index ccbd682ef6..c2e4ee4454 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/MsoUtils.groovy
@@ -28,7 +28,6 @@ import java.text.SimpleDateFormat
import org.apache.commons.codec.binary.Base64
import org.apache.commons.lang3.StringEscapeUtils
-import org.onap.so.bpmn.core.BPMNLogger
import org.onap.so.bpmn.core.xml.XmlTool
import org.onap.so.logger.MessageEnum
import org.slf4j.Logger
@@ -89,7 +88,7 @@ class MsoUtils {
}
return nodes
}
-
+
def getNodeXml(xmlInput,element){
return getNodeXml(xmlInput, element, true)
}
@@ -106,7 +105,7 @@ class MsoUtils {
return unescapeNodeContents(nodeToSerialize, nodeAsText)
}
-
+
def unescapeNodeContents(NodeChild node, String text) {
if (!node.childNodes().hasNext()) {
return StringEscapeUtils.unescapeXml(text)
@@ -125,7 +124,7 @@ class MsoUtils {
}
}
-
+
/***** Utilities when using XmlParser *****/
/**
@@ -139,12 +138,12 @@ class MsoUtils {
nodeAsString = removeXmlPreamble(nodeAsString)
return formatXml(nodeAsString)
}
-
+
/**
* Get the specified child Node of the specified parent. If there are
* multiple children of the same name, only the first one is returned.
* If there are no children with the specified name, 'null' is returned.
- *
+ *
* @param parent Parent Node in which to find a child.
* @param childNodeName Name of the child Node to get.
* @return the (first) child Node with the specified name or 'null'
@@ -158,11 +157,11 @@ class MsoUtils {
return nodeList.get(0)
}
}
-
+
/**
* Get the textual value of the specified child Node of the specified parent.
* If there are no children with the specified name, 'null' is returned.
- *
+ *
* @param parent Parent Node in which to find a child.
* @param childNodeName Name of the child Node whose value to get.
* @return the textual value of child Node with the specified name or 'null'
@@ -176,11 +175,11 @@ class MsoUtils {
return childNode.text()
}
}
-
+
/**
* Get all of the child nodes from the specified parent that have the
* specified name. The returned NodeList could be empty.
- *
+ *
* @param parent Parent Node in which to find children.
* @param childNodeName Name of the children to get.
* @return a NodeList of all the children from the parent with the specified
@@ -192,14 +191,14 @@ class MsoUtils {
/***** End of Utilities when using XmlParser *****/
-
+
/** these are covered under the common function above**/
def getSubscriberName(xmlInput,element){
def rtn=null
if(xmlInput!=null){
def xml= new XmlSlurper().parseText(xmlInput)
rtn= xml.'**'.find{node->node.name()==element}.text()
- }
+ }
return rtn
}
def getTenantInformation(xmlInput,element){
@@ -227,7 +226,7 @@ class MsoUtils {
}
return ret
}
-
+
def searchMetaDataNode(fxml, searchName, searchValue){
def ret = fxml.'**'.find {it.metaname.text() == searchName && it.metaval.text() == searchValue}
if(ret != null){
@@ -235,7 +234,7 @@ class MsoUtils {
}
return ret
}
-
+
// for Trinity L3 add/delete bonding
def getPBGFList(isDebugLogEnabled, xmlInput){
log("DEBUG", "getPBGFList: xmlInput " + xmlInput,isDebugLogEnabled)
@@ -271,20 +270,18 @@ class MsoUtils {
}
myNodes.add(XmlUtil.serialize(nodeToAdd))
}
-
}
}
-
return myNodes
}else{
return null
}
}
-
+
def getPBGFList(xmlInput){
getPBGFList("false", xmlInput)
}
-
+
def getMetaVal(node, name){
try{
return node.'**'.find {it.metaname.text() == name}.metaval.text()
@@ -295,16 +292,15 @@ class MsoUtils {
def log(logmode,logtxt,isDebugLogEnabled="false"){
if ("INFO"==logmode) {
- logger.info(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG, logtxt, "BPMN");
+ logger.info(MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), logtxt, "BPMN");
} else if ("WARN"==logmode) {
logger.warn ("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_WARNING.toString(), logtxt, "BPMN",
ErrorCode.UnknownError.getValue(), logtxt);
} else if ("ERROR"==logmode) {
logger.error("{} {} {} {} {}", MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), logtxt, "BPMN",
ErrorCode.UnknownError.getValue(), logtxt);
-
} else {
- BPMNLogger.debug(isDebugLogEnabled, logtxt);
+ logger.debug(logtxt);
}
}
@@ -317,7 +313,7 @@ class MsoUtils {
}
return rtn
}
-
+
/**
* Gets the children of the specified element.
*/
@@ -336,10 +332,10 @@ class MsoUtils {
}
return out.toString();
}
-
+
/**
* Encodes a value so it can be used inside an XML text element.
- *
+ *
* <b>Will double encode</b>
* @param s the string to encode
* @return the encoded string
@@ -347,7 +343,7 @@ class MsoUtils {
public static String xmlEscape(Object value) {
return XmlTool.encode(value)
}
-
+
/**
* Removes the preamble, if present, from an XML document.
* Also, for historical reasons, this also trims leading and trailing
@@ -395,29 +391,29 @@ class MsoUtils {
public String formatXml(def xml) {
return XmlTool.normalize(xml);
}
-
+
// build single elements
def buildElements(xmlInput, elementList, parentName) {
String var = ""
def xmlBuild = ""
if (parentName != "") {
xmlBuild += "<tns2:"+parentName+">"
- }
+ }
if (xmlInput != null) {
for (element in elementList) {
def xml= new XmlSlurper().parseText(xmlInput)
var = xml.'**'.find {it.name() == element}
if (var != null) {
xmlBuild += "<tns2:"+element+">"+var.toString()+"</tns2:"+element+">"
- }
+ }
}
}
if (parentName != "") {
xmlBuild += "</tns2:"+parentName+">"
- }
+ }
return xmlBuild
}
-
+
// build the Unbounded elements
def buildElementsUnbounded(xmlInput, elementList, parentName) {
def varParents = ""
@@ -445,7 +441,7 @@ class MsoUtils {
}
return xmlBuildUnbounded
}
-
+
// Build l2-homing-information
def buildL2HomingInformation(xmlInput) {
def elementsL2HomingList = ["evc-name", "topology", "preferred-aic-clli","aic-version"]
@@ -455,7 +451,7 @@ class MsoUtils {
}
return rebuildL2Home
}
-
+
// Build internet-evc-access-information
def buildInternetEvcAccessInformation(xmlInput) {
def elementsInternetEvcAccessInformationList = ["internet-evc-speed-value", "internet-evc-speed-units", "ip-version"]
@@ -465,7 +461,7 @@ class MsoUtils {
}
return rebuildInternetEvcAccess
}
-
+
// Build ucpe-vms-service-information
def buildUcpeVmsServiceInformation(xmlInput) {
def rebuildUcpeVmsServiceInformation = ''
@@ -497,7 +493,7 @@ class MsoUtils {
log("DEBUG", " rebuildUcpeVmsServiceInformation - " + rebuildUcpeVmsServiceInformation)
return rebuildUcpeVmsServiceInformation
}
-
+
// Build internet-service-change-details
def buildInternetServiceChangeDetails(xmlInput) {
def rebuildInternetServiceChangeDetails = ""
@@ -527,33 +523,33 @@ class MsoUtils {
}
}
return rebuildInternetServiceChangeDetails
- }
-
- // Build vr-lan
+ }
+
+ // Build vr-lan
def buildVrLan(xmlInput) {
-
+
def rebuildVrLan = ''
if (xmlInput != null) {
-
+
rebuildVrLan = "<tns2:vr-lan>"
def vrLan = getNodeXml(xmlInput, "vr-lan").drop(38).trim()
rebuildVrLan += buildElements(vrLan, ["routing-protocol"], "")
-
+
// vr-lan-interface
def rebuildVrLanInterface = "<tns2:vr-lan-interface>"
def vrLanInterface = getNodeXml(vrLan, "vr-lan-interface").drop(38).trim()
rebuildVrLanInterface += buildVrLanInterfacePartial(vrLanInterface)
-
+
// dhcp
def dhcp = getNodeXml(vrLan, "dhcp").drop(38).trim()
def rebuildDhcp = buildDhcp(dhcp)
rebuildVrLanInterface += rebuildDhcp
-
+
// pat
def pat = getNodeXml(vrLan, "pat").drop(38).trim()
def rebuildPat = buildPat(pat)
rebuildVrLanInterface += rebuildPat
-
+
// nat
def rebuildNat = ""
try { // optional
@@ -563,31 +559,31 @@ class MsoUtils {
log("ERROR", " Optional - Exception 'nat' ")
}
rebuildVrLanInterface += rebuildNat
-
+
// firewall-lite
def firewallLite = getNodeXml(vrLan, "firewall-lite").drop(38).trim()
def rebuildFirewallLite = buildFirewallLite(firewallLite)
rebuildVrLanInterface += rebuildFirewallLite
-
+
// static-routes
def rebuildStaticRoutes = ""
- try { // optional
+ try { // optional
def staticRoutes = getNodeXml(vrLan, "static-routes").drop(38).trim()
rebuildStaticRoutes = buildStaticRoutes(staticRoutes)
} catch (Exception e) {
log("ERROR", " Optional - Exception 'static-routes' ")
}
rebuildVrLanInterface += rebuildStaticRoutes
-
+
rebuildVrLan += rebuildVrLanInterface
rebuildVrLan += "</tns2:vr-lan-interface>"
rebuildVrLan += "</tns2:vr-lan>"
-
+
}
log("DEBUG", " rebuildVrLan - " + rebuildVrLan)
- return rebuildVrLan
+ return rebuildVrLan
}
-
+
// Build vr-lan-interface
def buildVrLanInterfacePartial(xmlInput) {
def rebuildingVrLanInterface = ''
@@ -616,7 +612,7 @@ class MsoUtils {
log("DEBUG", " rebuildingVrLanInterface - " + rebuildingVrLanInterface)
return rebuildingVrLanInterface
}
-
+
// Build dhcp
def buildDhcp(xmlInput) {
def rebuildingDhcp = ''
@@ -686,10 +682,10 @@ class MsoUtils {
log("ERROR", " Optional - Exception DHCP 'v6-dhcp-pools' ")
}
rebuildingDhcp += "</tns2:dhcp>"
- }
+ }
log("DEBUG", " rebuildingDhcp - " + rebuildingDhcp)
return rebuildingDhcp
- }
+ }
// Build pat
def buildPat(xmlInput) {
@@ -710,7 +706,7 @@ class MsoUtils {
log("DEBUG", " rebuildingPat - " + rebuildingPat)
return rebuildingPat
}
-
+
// Build nat
def buildNat(xmlInput) {
def rebuildingNat = ''
@@ -728,19 +724,19 @@ class MsoUtils {
}
log("DEBUG", " rebuildingNat - " + rebuildingNat)
return rebuildingNat
- }
-
+ }
+
// Build firewall-lite
def buildFirewallLite(xmlInput) {
def rebuildingFirewallLite = ''
-
+
if (xmlInput != null) {
-
+
def firewallLiteData = new XmlSlurper().parseText(xmlInput)
rebuildingFirewallLite = "<tns2:firewall-lite>"
def firewallLiteList = ["stateful-firewall-lite-v4-enabled", "stateful-firewall-lite-v6-enabled"]
rebuildingFirewallLite += buildElements(xmlInput, firewallLiteList, "")
-
+
try { // optional
def v4FirewallPacketFilters = firewallLiteData.'**'.findAll {it.name() == "v4-firewall-packet-filters"}
def v4FirewallPacketFiltersSize = v4FirewallPacketFilters.size()
@@ -768,7 +764,7 @@ class MsoUtils {
} catch (Exception e) {
log("ERROR", " Optional - Exception FIREWALL-LITE 'v4-firewall-packet-filters' ")
}
-
+
try { // optional
def v6FirewallPacketFilters = firewallLiteData.'**'.findAll {it.name() == "v6-firewall-packet-filters"}
def v6FirewallPacketFiltersSize = v6FirewallPacketFilters.size()
@@ -801,7 +797,7 @@ class MsoUtils {
log("DEBUG", " rebuildingFirewallLite - " + rebuildingFirewallLite)
return rebuildingFirewallLite
}
-
+
def buildStaticRoutes(xmlInput) {
def rebuildingStaticRoutes = ''
if (xmlInput != null) {
@@ -815,21 +811,21 @@ class MsoUtils {
log("DEBUG", " rebuildingStaticRoutes - " + rebuildingStaticRoutes)
return rebuildingStaticRoutes
}
-
+
public String generateCurrentTimeInUtc(){
final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
final String utcTime = sdf.format(new Date());
return utcTime;
}
-
+
public String generateCurrentTimeInGMT(){
final SimpleDateFormat sdf = new SimpleDateFormat("E, d MMM yyyy h:m:s z");
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
final String utcTime = sdf.format(new Date());
return utcTime;
}
-
+
/**
* @param encryptedAuth: encrypted credentials from urn properties
@@ -850,7 +846,7 @@ class MsoUtils {
throw ex
}
}
-
+
def encrypt(toEncrypt, msokey){
try {
String result = CryptoUtils.encrypt(toEncrypt, msokey);
@@ -860,7 +856,7 @@ class MsoUtils {
log("ERROR", "Failed to encrypt credentials")
}
}
-
+
def decrypt(toDecrypt, msokey){
try {
String result = CryptoUtils.decrypt(toDecrypt, msokey);
@@ -871,7 +867,7 @@ class MsoUtils {
throw e
}
}
-
+
/**
* Return URL with qualified host name (if any) or urn mapping
* @param String url from urn mapping
@@ -890,9 +886,9 @@ class MsoUtils {
log("DEBUG", "unable to grab qualified host name, using what's in urn properties for callbackurl. Exception was: " + e.printStackTrace())
}
return callbackUrlToUse
-
+
}
-
+
/**
* Retrieves text context of the element if the element exists, returns empty string otherwise
* @param com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl element to parse
@@ -907,7 +903,7 @@ class MsoUtils {
}
return text
}
-
+
/**
*
* Find the lowest unused module-index value in a given xml
@@ -915,14 +911,14 @@ class MsoUtils {
public String getLowestUnusedIndex(String xml) {
if (xml == null || xml.isEmpty()) {
return "0"
- }
- def moduleIndexList = getMultNodes(xml, "module-index")
- if (moduleIndexList == null || moduleIndexList.size() == 0) {
+ }
+ def moduleIndexList = getMultNodes(xml, "module-index")
+ if (moduleIndexList == null || moduleIndexList.size() == 0) {
return "0"
}
-
+
def sortedModuleIndexList = moduleIndexList.sort{ a, b -> a as Integer <=> b as Integer}
-
+
for (i in 0..sortedModuleIndexList.size()-1) {
if (Integer.parseInt(sortedModuleIndexList[i]) != i) {
return i.toString()
diff --git a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy
index afc180e8a4..75ddca5e98 100644
--- a/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy
+++ b/bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy
@@ -85,6 +85,7 @@ public class VnfAdapterRestV1Test {
<volumeGroupId>8a07b246-155e-4b08-b56e-76e98a3c2d66</volumeGroupId>
<volumeGroupStackId>phmaz401me6-vpevre-VOLUMEGROUP/dbd560b6-b03f-4a17-92e7-8942459a60c1</volumeGroupStackId>
<cloudSiteId>mtrnj1b</cloudSiteId>
+ <cloudOwnerId>CloudOwner</cloudOwnerId>
<tenantId>cfb5e0a790374c9a98a1c0d2044206a7</tenantId>
<volumeGroupCreated>true</volumeGroupCreated>
<msoRequest>
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/BPMNLogger.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/BPMNLogger.java
deleted file mode 100644
index ede515650e..0000000000
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/BPMNLogger.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Modifications Copyright (c) 2019 Samsung
- * ================================================================================
- * 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.core;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class BPMNLogger {
- private static Logger logger = LoggerFactory.getLogger(BPMNLogger.class);
-
- public static void debug (String isDebugLogEnabled, String LogText) {
- logger.debug(LogText);
- }
-
-
-}
-
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
index 6166071437..fb794e251d 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/onap/so/bpmn/core/ResponseBuilder.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* 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
@@ -21,6 +23,8 @@
package org.onap.so.bpmn.core;
import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Used in the output variable mapping configuration of subflow call activity
@@ -36,6 +40,7 @@ import org.camunda.bpm.engine.delegate.DelegateExecution;
*/
public class ResponseBuilder implements java.io.Serializable {
private static final long serialVersionUID = 1L;
+ private static final Logger logger = LoggerFactory.getLogger(ResponseBuilder.class);
/**
* Creates a WorkflowException using data from the execution variables.
@@ -48,28 +53,28 @@ public class ResponseBuilder implements java.io.Serializable {
String method = getClass().getSimpleName() + ".buildWorkflowException(" +
"execution=" + execution.getId() +
")";
- String isDebugLogEnabled = (String) execution.getVariable("isDebugLogEnabled");
- logDebug("Entered " + method, isDebugLogEnabled);
-
+
+ logger.debug("Entered " + method);
+
String prefix = (String) execution.getVariable("prefix");
String processKey = getProcessKey(execution);
- logDebug("processKey=" + processKey, isDebugLogEnabled);
+ logger.debug("processKey=" + processKey);
// See if there"s already a WorkflowException object in the execution.
WorkflowException theException = (WorkflowException) execution.getVariable("WorkflowException");
if (theException != null) {
- logDebug("Exited " + method + " - propagated " + theException, isDebugLogEnabled);
+ logger.debug("Exited " + method + " - propagated " + theException);
return theException;
}
-
+
// Look in the legacy variables: ErrorResponse and ResponseCode
String errorResponse = trimString(execution.getVariable(prefix + "ErrorResponse"), null);
String responseCode = trimString(execution.getVariable(prefix + "ResponseCode"), null);
- logDebug("errorResponse=" + errorResponse, isDebugLogEnabled);
- logDebug("responseCode=" + responseCode, isDebugLogEnabled);
+ logger.debug("errorResponse=" + errorResponse);
+ logger.debug("responseCode=" + responseCode);
if (errorResponse != null || !isOneOf(responseCode, null, "0", "200", "201", "202", "204")) {
// This is an error condition. We need to return a WorkflowExcpetion
@@ -93,8 +98,8 @@ public class ResponseBuilder implements java.io.Serializable {
String xmlErrorCode = trimString(getXMLTextElement(maybeXML, "ErrorCode"), null);
if (xmlErrorMessage != null || xmlErrorCode != null) {
- logDebug("xmlErrorMessage=" + xmlErrorMessage, isDebugLogEnabled);
- logDebug("xmlErrorCode=" + xmlErrorCode, isDebugLogEnabled);
+ logger.debug("xmlErrorMessage=" + xmlErrorMessage);
+ logger.debug("xmlErrorCode=" + xmlErrorCode);
if (xmlErrorMessage == null) {
errorResponse = "Received error code " + xmlErrorCode + " from " + processKey;
@@ -135,27 +140,26 @@ public class ResponseBuilder implements java.io.Serializable {
theException = new WorkflowException(processKey, intResponseCode, errorResponse);
execution.setVariable("WorkflowException", theException);
- logDebug("Exited " + method + " - created " + theException, isDebugLogEnabled);
+ logger.debug("Exited " + method + " - created " + theException);
return theException;
}
- logDebug("Exited " + method + " - no WorkflowException", isDebugLogEnabled);
+ logger.debug("Exited " + method + " - no WorkflowException");
return null;
}
-
+
/**
* Returns the "Response" variable, unless the execution variables
* indicate there was an error. In that case, null is returned.
* @param execution the execution
*/
public Object buildWorkflowResponse(DelegateExecution execution) {
-
+
String method = getClass().getSimpleName() + ".buildWorkflowResponse(" +
"execution=" + execution.getId() +
")";
- String isDebugLogEnabled = (String) execution.getVariable("isDebugLogEnabled");
- logDebug("Entered " + method, isDebugLogEnabled);
-
+ logger.debug("Entered " + method);
+
String prefix = (String) execution.getVariable("prefix");
String processKey = getProcessKey(execution);
@@ -169,16 +173,16 @@ public class ResponseBuilder implements java.io.Serializable {
isOneOf(responseCode, null, "0", "200", "201", "202", "204")) {
theResponse = execution.getVariable("WorkflowResponse");
-
+
if (theResponse == null) {
theResponse = execution.getVariable(processKey + "Response");
}
}
- logDebug("Exited " + method, isDebugLogEnabled);
+ logger.debug("Exited " + method);
return theResponse;
}
-
+
/**
* Checks if the specified item is one of the specified values.
* @param item the item
@@ -201,10 +205,10 @@ public class ResponseBuilder implements java.io.Serializable {
}
}
}
-
+
return false;
}
-
+
/**
* Creates a string value of the specified object, trimming whitespace in
* the process. If the result is null or empty, the specified empty string
@@ -221,7 +225,7 @@ public class ResponseBuilder implements java.io.Serializable {
String s = String.valueOf(object).trim();
return s.equals("") ? emptyStringValue : s;
}
-
+
/**
* Returns the process definition key (i.e. the process name) from the
* execution.
@@ -237,16 +241,7 @@ public class ResponseBuilder implements java.io.Serializable {
return execution.getProcessEngineServices().getRepositoryService()
.getProcessDefinition(execution.getProcessDefinitionId()).getKey();
}
-
- /**
- * Logs a message at the DEBUG level.
- * @param message the message
- * @param isDebugLogEnabled a flag indicating if DEBUG level is enabled
- */
- private void logDebug(String message, String isDebugLogEnabled) {
- BPMNLogger.debug(isDebugLogEnabled, message);
- }
-
+
/**
* Removes namespace definitions and prefixes from XML, if any.
*/
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfRollback.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfRollback.java
index 194ce58fe9..9fd3bc596f 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfRollback.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/common/adapter/vnf/VnfRollback.java
@@ -36,6 +36,7 @@ import javax.xml.bind.annotation.XmlType;
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="cloudSiteId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="cloudOwner" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* &lt;element name="msoRequest" type="{http://org.onap.so/vnfNotify}msoRequest" minOccurs="0"/>
* &lt;element name="tenantCreated" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;element name="tenantId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
@@ -52,6 +53,7 @@ import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "vnfRollback", propOrder = {
"cloudSiteId",
+ "cloudOwner",
"msoRequest",
"tenantCreated",
"tenantId",
@@ -61,6 +63,7 @@ import javax.xml.bind.annotation.XmlType;
public class VnfRollback {
protected String cloudSiteId;
+ protected String cloudOwner;
protected MsoRequest msoRequest;
protected boolean tenantCreated;
protected String tenantId;
@@ -92,6 +95,30 @@ public class VnfRollback {
}
/**
+ * Gets the value of the cloudOwner property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCloudOwner() {
+ return cloudOwner;
+ }
+
+ /**
+ * Sets the value of the cloudOwner property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCloudOwner(String value) {
+ this.cloudOwner = value;
+ }
+
+ /**
* Gets the value of the msoRequest property.
*
* @return
@@ -201,6 +228,7 @@ public class VnfRollback {
return
"<cloudSiteId>"+cloudSiteId+"</cloudSiteId>" + '\n' +
+ "<cloudOwner>"+cloudOwner+"</cloudOwner>" + '\n' +
msoRequestElement +
"<tenantCreated>"+tenantCreated+"</tenantCreated>" + '\n' +
"<tenantId>"+tenantId+"</tenantId>" + '\n' +
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
index f795bcc40e..3eed14bc30 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/LoggingAndURNMappingPlugin.java
@@ -53,7 +53,6 @@ import org.camunda.bpm.model.bpmn.impl.instance.FlowNodeImpl;
import org.camunda.bpm.model.bpmn.instance.EndEvent;
import org.camunda.bpm.model.bpmn.instance.FlowNode;
import org.camunda.bpm.model.bpmn.instance.StartEvent;
-import org.onap.so.bpmn.core.BPMNLogger;
import org.slf4j.Logger;
@@ -71,11 +70,11 @@ import org.springframework.stereotype.Component;
* Plugin for MSO logging and URN mapping.
*/
@Component
-public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
-
+public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
+
@Autowired
private LoggingParseListener loggingParseListener;
-
+
@Override
public void preInit(
ProcessEngineConfigurationImpl processEngineConfiguration) {
@@ -87,14 +86,14 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
}
preParseListeners.add(loggingParseListener);
}
-
+
/**
* Called when a process flow is parsed so we can inject listeners.
*/
@Component
- public class LoggingParseListener extends AbstractBpmnParseListener {
-
-
+ public class LoggingParseListener extends AbstractBpmnParseListener {
+
+
private void injectLogExecutionListener(ActivityImpl activity) {
activity.addListener(
ExecutionListener.EVENTNAME_END,
@@ -115,7 +114,7 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
@Override
public void parseStartEvent(Element startEventElement, ScopeImpl scope, ActivityImpl startEventActivity) {
- // Inject these listeners only on the main start event for the flow, not on any embedded subflow start events
+ // Inject these listeners only on the main start event for the flow, not on any embedded subflow start events
injectLogExecutionListener(startEventActivity);
}
@@ -275,15 +274,15 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
injectLogExecutionListener(messageActivity);
}
}
-
+
/**
* Logs details about the current activity.
- */
+ */
public class LoggingExecutionListener implements ExecutionListener {
private final Logger logger = LoggerFactory.getLogger(LoggingExecutionListener.class);
private String event;
-
+
public LoggingExecutionListener() {
this.event = "";
}
@@ -291,31 +290,31 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
public LoggingExecutionListener(String event) {
this.event = event;
}
-
+
public String getEvent() {
return event;
}
@Override
- public void notify(DelegateExecution execution) throws Exception {
+ public void notify(DelegateExecution execution) throws Exception {
//required for legacy groovy processing in camunda
execution.setVariable("isDebugLogEnabled", "true");
if (!isBlank(execution.getCurrentActivityName())) {
try {
-
+
String id = execution.getId();
- if (id != null ) {
+ if (id != null ) {
RepositoryService repositoryService = execution.getProcessEngineServices().getRepositoryService();
String processName = repositoryService.createProcessDefinitionQuery()
.processDefinitionId(execution.getProcessDefinitionId())
.singleResult()
- .getName();
+ .getName();
+
-
String requestId = (String) execution.getVariable("mso-request-id");
String svcid = (String) execution.getVariable("mso-service-instance-id");
}
- } catch(Exception e) {
+ } catch(Exception e) {
logger.error("Exception occurred", e);
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java
index 9b8f6cd5cc..8bc0055343 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/core/plugins/WorkflowExceptionPlugin.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* 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
@@ -40,9 +42,10 @@ import org.camunda.bpm.engine.impl.pvm.process.ActivityImpl;
import org.camunda.bpm.engine.impl.pvm.process.TransitionImpl;
import org.camunda.bpm.engine.impl.util.xml.Element;
-import org.onap.so.bpmn.core.BPMNLogger;
import org.onap.so.bpmn.core.WorkflowException;
import org.springframework.stereotype.Component;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* This plugin does the following:
@@ -60,7 +63,8 @@ import org.springframework.stereotype.Component;
*/
@Component
public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
-
+ private static final Logger logger = LoggerFactory.getLogger(WorkflowExceptionPlugin.class);
+
@Override
public void preInit(ProcessEngineConfigurationImpl processEngineConfiguration) {
List<BpmnParseListener> preParseListeners =
@@ -73,7 +77,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
preParseListeners.add(new WorkflowExceptionParseListener());
}
-
+
public static class WorkflowExceptionParseListener extends AbstractBpmnParseListener {
@Override
public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
@@ -131,7 +135,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
}
}
}
-
+
/**
* If there is a WorkflowException object in the execution, this method
* removes it (saving a copy of it in a different variable).
@@ -147,8 +151,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
saveName = "SavedWorkflowException" + (++index);
}
- BPMNLogger.debug((String)execution.getVariable("isDebugLogEnabled"),
- "WorkflowExceptionResetTask is moving WorkflowException to " + saveName);
+ logger.debug("WorkflowExceptionResetTask is moving WorkflowException to " + saveName);
execution.setVariable(saveName, workflowException);
execution.setVariable("WorkflowException", null);
@@ -163,8 +166,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
public static class WorkflowExceptionTriggerTask implements JavaDelegate {
public void execute(DelegateExecution execution) throws Exception {
if (execution.getVariable("WorkflowException") instanceof WorkflowException) {
- BPMNLogger.debug((String)execution.getVariable("isDebugLogEnabled"),
- "WorkflowExceptionTriggerTask is generating a MSOWorkflowException event");
+ logger.debug("WorkflowExceptionTriggerTask is generating a MSOWorkflowException event");
throw new BpmnError("MSOWorkflowException");
}
}
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
index ad08f8b2bb..1ef864b543 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/VnfAdapterRestV1IT.java
@@ -59,6 +59,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
private final String CREATE_VF_MODULE_REQUEST =
"<createVfModuleRequest>" + EOL +
" <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+ " <cloudOwner>cloudOwner</cloudOwner>" + EOL +
" <tenantId>tenantId</tenantId>" + EOL +
" <vnfId>vnfId</vnfId>" + EOL +
" <vfModuleName>vfModuleName</vfModuleName>" + EOL +
@@ -94,6 +95,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
private final String UPDATE_VF_MODULE_REQUEST =
"<updateVfModuleRequest>" + EOL +
" <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+ " <cloudOwner>cloudOwner</cloudOwner>" + EOL +
" <tenantId>tenantId</tenantId>" + EOL +
" <vnfId>vnfId</vnfId>" + EOL +
" <vfModuleName>vfModuleName</vfModuleName>" + EOL +
@@ -130,6 +132,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
private final String DELETE_VF_MODULE_REQUEST =
"<deleteVfModuleRequest>" + EOL +
" <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+ " <cloudOwner>cloudOwner</cloudOwner>" + EOL +
" <tenantId>tenantId</tenantId>" + EOL +
" <vnfId>vnfId</vnfId>" + EOL +
" <vfModuleId>vfModuleId</vfModuleId>" + EOL +
@@ -150,6 +153,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
" <skipAAI>true</skipAAI>" + EOL +
" <vfModuleRollback>" + EOL +
" <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
+ " <cloudOwner>cloudOwner</cloudOwner>" + EOL +
" <tenantId>tenantId</tenantId>" + EOL +
" <vnfId>vnfId</vnfId>" + EOL +
" <vfModuleId>vfModuleId</vfModuleId>" + EOL +
@@ -186,6 +190,7 @@ public class VnfAdapterRestV1IT extends BaseIntegrationTest {
" <vfModuleStackId>vfModuleStackId</vfModuleStackId>" + EOL +
" <vfModuleCreated>true</vfModuleCreated>" + EOL +
" <tenantId>tenantId</tenantId>" + EOL +
+ " <cloudOwner>cloudOwner</cloudOwner>" + EOL +
" <cloudSiteId>cloudSiteId</cloudSiteId>" + EOL +
" <msoRequest>" + EOL +
" <requestId>requestId</requestId>" + EOL +
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
index 117d3b213a..eed2978bc7 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/common/WorkflowTest.java
@@ -1100,6 +1100,10 @@ public abstract class WorkflowTest {
"/tns:createVnfNotification/tns:rollback/tns:cloudSiteId/text()");
rollback.setCloudSiteId(cloudSiteId);
+ String cloudOwner = xpathTool.evaluate(
+ "/tns:createVnfNotification/tns:rollback/tns:cloudOwner/text()");
+ rollback.setCloudOwner(cloudOwner);
+
String requestId = xpathTool.evaluate(
"/tns:createVnfNotification/tns:rollback/tns:msoRequest/tns:requestId/text()");
String serviceInstanceId = xpathTool.evaluate(
@@ -1276,6 +1280,10 @@ public abstract class WorkflowTest {
"/tns:updateVnfNotification/tns:rollback/tns:cloudSiteId/text()");
rollback.setCloudSiteId(cloudSiteId);
+ String cloudOwner = xpathTool.evaluate(
+ "/tns:updateVnfNotification/tns:rollback/tns:cloudOwner/text()");
+ rollback.setCloudOwner(cloudOwner);
+
String requestId = xpathTool.evaluate(
"/tns:updateVnfNotification/tns:rollback/tns:msoRequest/tns:requestId/text()");
String serviceInstanceId = xpathTool.evaluate(
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
index ccd9f9bd02..cf53aff878 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteVfModuleVolumeInfraV1.groovy
@@ -68,6 +68,7 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
execution.setVariable('DELVfModVol_vnfType', null)
execution.setVariable('DELVfModVol_serviceId', null)
execution.setVariable('DELVfModVol_cloudRegion', null)
+ execution.setVariable('DELVfModVol_cloudOwner', null)
execution.setVariable('DELVfModVol_tenantId', null)
execution.setVariable('DELVfModVol_volumeParams', null)
execution.setVariable('DELVfModVol_volumeGroupHeatStackId', null)
@@ -141,6 +142,7 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
execution.setVariable('DELVfModVol_volumeOutputs', utils.getNodeXml(request, 'volume-outputs', false))
execution.setVariable('DELVfModVol_volumeParams', utils.getNodeXml(request, 'volume-params'))
execution.setVariable('DELVfModVol_cloudRegion', utils.getNodeText(request, 'aic-cloud-region'))
+ execution.setVariable('DELVfModVol_cloudOwner', utils.getNodeText(request, 'cloud-owner'))
setBasicDBAuthHeader(execution, isDebugLogEnabled)
@@ -308,6 +310,7 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
public void prepareVnfAdapterDeleteRequest(DelegateExecution execution, isDebugLogEnabled) {
def cloudRegion = execution.getVariable('DELVfModVol_cloudRegion')
+ def cloudOwner = execution.getVariable('DELVfModVol_cloudOwner')
def tenantId = execution.getVariable('DELVfModVol_tenantId')
def volumeGroupId = execution.getVariable('DELVfModVol_volumeGroupId')
def volumeGroupHeatStackId = execution.getVariable('DELVfModVol_volumeGroupHeatStackId')
@@ -324,6 +327,7 @@ public class DeleteVfModuleVolumeInfraV1 extends AbstractServiceTaskProcessor {
String vnfAdapterRestRequest = """
<deleteVolumeGroupRequest>
<cloudSiteId>${MsoUtils.xmlEscape(cloudRegion)}</cloudSiteId>
+ <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
<volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
<volumeGroupStackId>${MsoUtils.xmlEscape(volumeGroupHeatStackId)}</volumeGroupStackId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
index c03f9f9c95..7a606d515c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModule.groovy
@@ -982,6 +982,8 @@ public class DoCreateVfModule extends VfModuleBase {
//Get variables
//cloudSiteId
def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+ //cloudOwner
+ def cloudOwner = execution.getVariable("DCVFM_cloudOwner")
//tenantId
def tenantId = execution.getVariable("DCVFM_tenantId")
//vnfType
@@ -1070,6 +1072,7 @@ public class DoCreateVfModule extends VfModuleBase {
String createVnfARequest = """
<createVfModuleRequest>
<cloudSiteId>${MsoUtils.xmlEscape(cloudSiteId)}</cloudSiteId>
+ <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
<vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
<vnfName>${MsoUtils.xmlEscape(vnfName)}</vnfName>
@@ -1233,6 +1236,7 @@ public class DoCreateVfModule extends VfModuleBase {
def vfModuleModelName = execution.getVariable("DCVFM_vfModuleModelName")
def vnfId = execution.getVariable("DCVFM_vnfId")
def cloudSiteId = execution.getVariable("DCVFM_cloudSiteId")
+ def cloudOwner = execution.getVariable("DCVFM_cloudOwner")
def sdncVersion = execution.getVariable("DCVFM_sdncVersion")
def serviceModelInfo = execution.getVariable("serviceModelInfo")
def vnfModelInfo = execution.getVariable("vnfModelInfo")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
index a6040ac290..07ffa38498 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollback.groovy
@@ -92,6 +92,8 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
execution.setVariable("DCVFMR_vfModuleModelName", vfModuleModelName)
String cloudSiteId = rollbackData.get("VFMODULE", "aiccloudregion")
execution.setVariable("DCVFMR_cloudSiteId", cloudSiteId)
+ String cloudOwner = rollbackData.get("VFMODULE", "cloudowner")
+ execution.setVariable("DCVFMR_cloudOwner", cloudOwner)
String heatStackId = rollbackData.get("VFMODULE", "heatstackid")
execution.setVariable("DCVFMR_heatStackId", heatStackId)
String requestId = rollbackData.get("VFMODULE", "msorequestid")
@@ -358,6 +360,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
String origRequestId = execution.getVariable("DCVFMR_requestId")
String srvInstId = execution.getVariable("DCVFMR_serviceInstanceId")
String aicCloudRegion = execution.getVariable("DCVFMR_cloudSiteId")
+ String cloudOwner = execution.getVariable("DCVFMR_cloudOwner")
String vnfId = execution.getVariable("DCVFMR_vnfId")
String vfModuleId = execution.getVariable("DCVFMR_vfModuleId")
String vfModuleStackId = execution.getVariable("DCVFMR_heatStackId")
@@ -373,6 +376,7 @@ public class DoCreateVfModuleRollback extends AbstractServiceTaskProcessor{
String request = """
<deleteVfModuleRequest>
<cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
<vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
<vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
index bedf5e0948..05ccfa02ba 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModule.groovy
@@ -111,6 +111,8 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
execution.setVariable("tenantId", tenantId)
String cloudSiteId = jsonUtil.getJsonValue(cloudConfiguration, "lcpCloudRegionId")
execution.setVariable("cloudSiteId", cloudSiteId)
+ String cloudOwner = jsonUtil.getJsonValue(cloudConfiguration, "cloudOwner")
+ execution.setVariable("cloudOwner", cloudOwner)
// Source is HARDCODED
String source = "VID"
execution.setVariable("source", source)
@@ -176,6 +178,8 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
execution.setVariable("vfModuleModelName", vfModuleModelName)
String cloudSiteId = utils.getNodeText(xml, "aic-cloud-region")
execution.setVariable("cloudSiteId", cloudSiteId)
+ String cloudOwner = utils.getNodeText(xml, "cloud-owner")
+ execution.setVariable("cloudOwner", cloudOwner)
}
// formulate the request for PrepareUpdateAAIVfModule
@@ -281,6 +285,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
def origRequestId = execution.getVariable('requestId')
def srvInstId = execution.getVariable("serviceInstanceId")
def aicCloudRegion = execution.getVariable("cloudSiteId")
+ def cloudOwner = execution.getVariable("cloudOwner")
def vnfId = execution.getVariable("vnfId")
def vfModuleId = execution.getVariable("vfModuleId")
def vfModuleStackId = execution.getVariable('DoDVfMod_heatStackId')
@@ -296,6 +301,7 @@ public class DoDeleteVfModule extends AbstractServiceTaskProcessor{
String request = """
<deleteVfModuleRequest>
<cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
<vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
<vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
index 3be52f50f7..47aec46277 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleFromVnf.groovy
@@ -79,6 +79,9 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
String cloudSiteId = execution.getVariable("lcpCloudRegionId")
execution.setVariable("cloudSiteId", cloudSiteId)
logger.debug("cloudSiteId: " + cloudSiteId)
+ String cloudOwner = execution.getVariable("cloudOwner")
+ execution.setVariable("cloudOwner", cloudOwner)
+ logger.debug("cloudOwner: " + cloudOwner)
// Source is HARDCODED
String source = "VID"
execution.setVariable("source", source)
@@ -363,6 +366,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
def origRequestId = execution.getVariable('requestId')
def srvInstId = execution.getVariable("serviceInstanceId")
def aicCloudRegion = execution.getVariable("cloudSiteId")
+ def cloudOwner = execution.getVariable("cloudOwner")
def vnfId = execution.getVariable("vnfId")
def vfModuleId = execution.getVariable("vfModuleId")
def vfModuleStackId = execution.getVariable('DDVMFV_heatStackId')
@@ -378,6 +382,7 @@ public class DoDeleteVfModuleFromVnf extends VfModuleBase {
String request = """
<deleteVfModuleRequest>
<cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
<vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
<vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
index 787b582808..6acf2223b0 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteVfModuleVolumeV2.groovy
@@ -217,6 +217,7 @@ class DoDeleteVfModuleVolumeV2 extends AbstractServiceTaskProcessor{
*/
public void prepareVnfAdapterDeleteRequest(DelegateExecution execution, isDebugLogEnabled) {
def cloudRegion = execution.getVariable(prefix+'aicCloudRegion')
+ def cloudOwner = execution.getVariable(prefix+'cloudOwner')
def tenantId = execution.getVariable('tenantId') // input parameter (optional) - see preProcessRequest
def volumeGroupId = execution.getVariable('volumeGroupId') // input parameter (required)
def volumeGroupHeatStackId = execution.getVariable(prefix+'volumeGroupHeatStackId') // from AAI query volume group
@@ -233,6 +234,7 @@ class DoDeleteVfModuleVolumeV2 extends AbstractServiceTaskProcessor{
String vnfAdapterRestRequest = """
<deleteVolumeGroupRequest>
<cloudSiteId>${MsoUtils.xmlEscape(cloudRegion)}</cloudSiteId>
+ <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
<volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
<volumeGroupStackId>${MsoUtils.xmlEscape(volumeGroupHeatStackId)}</volumeGroupStackId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
index a17dc9d7fe..013f66b008 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModule.groovy
@@ -143,6 +143,12 @@ public class DoUpdateVfModule extends VfModuleBase {
execution.setVariable("DOUPVfMod_aicCloudRegion", cloudSiteId)
logger.debug("cloudSiteId: " + cloudSiteId)
+
+ //cloudOwner
+ def cloudOwner = execution.getVariable("cloudOwner")
+ execution.setVariable("DOUPVfMod_cloudOwner", cloudOwner)
+ logger.debug("cloudOwner: " + cloudOwner)
+
//vnfType
def vnfType = execution.getVariable("vnfType")
execution.setVariable("DOUPVfMod_vnfType", vnfType)
@@ -304,6 +310,7 @@ public class DoUpdateVfModule extends VfModuleBase {
execution.setVariable('DOUPVfMod_modelCustomizationUuid', getNodeTextForce(vnfInputs, 'model-customization-id'))
execution.setVariable('DOUPVfMod_serviceId', getRequiredNodeText(execution, vnfInputs, 'service-id'))
execution.setVariable('DOUPVfMod_aicCloudRegion', getRequiredNodeText(execution, vnfInputs, 'aic-cloud-region'))
+ execution.setVariable('DOUPVfMod_cloudOwner', getRequiredNodeText(execution, vnfInputs, 'cloud-owner'))
execution.setVariable('DOUPVfMod_tenantId', getRequiredNodeText(execution, vnfInputs, 'tenant-id'))
//isBaseVfModule
def isBaseVfModule = "false"
@@ -640,6 +647,7 @@ public class DoUpdateVfModule extends VfModuleBase {
heatStackId = vfModule.getHeatStackId()
}
def cloudId = execution.getVariable('DOUPVfMod_aicCloudRegion')
+ def cloudOwner = execution.getVariable('DOUPVfMod_cloudOwner')
def vnfType = execution.getVariable('DOUPVfMod_vnfType')
def vnfName = execution.getVariable('DOUPVfMod_vnfName')
def vfModuleModelName = execution.getVariable('DOUPVfMod_vfModuleModelName')
@@ -672,6 +680,7 @@ public class DoUpdateVfModule extends VfModuleBase {
String vnfAdapterRestRequest = """
<updateVfModuleRequest>
<cloudSiteId>${MsoUtils.xmlEscape(cloudId)}</cloudSiteId>
+ <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
<vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
<vfModuleId>${MsoUtils.xmlEscape(vfModuleId)}</vfModuleId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
index 0c3294778a..3e9b934a2e 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolume.groovy
@@ -100,6 +100,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
execution.setVariable('UPDVfModVol_vnfType', getRequiredNodeText(execution, volumeInputs, 'vnf-type'))
execution.setVariable('UPDVfModVol_serviceId', getRequiredNodeText(execution, volumeInputs, 'service-id'))
execution.setVariable('UPDVfModVol_aicCloudRegion', getRequiredNodeText(execution, volumeInputs, 'aic-cloud-region'))
+ execution.setVariable('UPDVfModVol_cloudOwner', getRequiredNodeText(execution, volumeInputs, 'cloud-owner'))
execution.setVariable('UPDVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
def volumeParams = utils.getNodeXml(request, 'volume-params')
@@ -255,6 +256,7 @@ class UpdateVfModuleVolume extends VfModuleBase {
String vnfAdapterRestRequest = """
<updateVolumeGroupRequest>
<cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
<volumeGroupId>${MsoUtils.xmlEscape(volumeGroupId)}</volumeGroupId>
<volumeGroupStackId>${MsoUtils.xmlEscape(volumeGroupHeatStackId)}</volumeGroupStackId>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
index 361d6a2173..ab7b659b51 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1.groovy
@@ -135,6 +135,7 @@ class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
execution.setVariable('UPDVfModVol_vnfVersion', getRequiredNodeText(execution, volumeInputs, 'asdc-service-model-version'))
execution.setVariable('UPDVfModVol_serviceId', utils.getNodeText(volumeInputs, 'service-id'))
execution.setVariable('UPDVfModVol_aicCloudRegion', getRequiredNodeText(execution, volumeInputs, 'aic-cloud-region'))
+ execution.setVariable('UPDVfModVol_cloudRegion', getRequiredNodeText(execution, volumeInputs, 'cloud-owner'))
execution.setVariable('UPDVfModVol_tenantId', getRequiredNodeText(execution, volumeInputs, 'tenant-id'))
//execution.setVariable('UPDVfModVol_modelCustomizationId', getRequiredNodeText(execution, volumeInputs, 'model-customization-id'))
@@ -328,6 +329,7 @@ class UpdateVfModuleVolumeInfraV1 extends VfModuleBase {
String vnfAdapterRestRequest = """
<updateVolumeGroupRequest>
<cloudSiteId>${MsoUtils.xmlEscape(aicCloudRegion)}</cloudSiteId>
+ <cloudOwner>${MsoUtils.xmlEscape(cloudOwner)}</cloudOwner>
<tenantId>${MsoUtils.xmlEscape(tenantId)}</tenantId>
<vnfId>${MsoUtils.xmlEscape(vnfId)}</vnfId>
<vnfName>${MsoUtils.xmlEscape(vnfName)}</vnfName>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
index e7ebe23e75..fc5960b92f 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateVfModuleRollbackTest.groovy
@@ -165,6 +165,7 @@ class DoCreateVfModuleRollbackTest extends MsoGroovyTest{
when(mockExecution.getVariable("prefix")).thenReturn(prefix)
when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
when(mockExecution.getVariable("DCVFM_cloudSiteId")).thenReturn("12345")
+ when(mockExecution.getVariable("DCVFM_cloudOwner")).thenReturn("CloudOwner")
when(mockExecution.getVariable("rollbackData")).thenReturn(new RollbackData())
List fqdnList = new ArrayList()
fqdnList.add("test")
@@ -194,6 +195,7 @@ class DoCreateVfModuleRollbackTest extends MsoGroovyTest{
when(mockExecution.getVariable("prefix")).thenReturn(prefix)
when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
when(mockExecution.getVariable("DCVFM_cloudSiteId")).thenReturn("12345")
+ when(mockExecution.getVariable("DCVFM_cloudOwner")).thenReturn("CloudOwner")
when(mockExecution.getVariable("rollbackData")).thenReturn(new RollbackData())
List fqdnList = new ArrayList()
fqdnList.add("test")
@@ -223,6 +225,7 @@ class DoCreateVfModuleRollbackTest extends MsoGroovyTest{
when(mockExecution.getVariable("prefix")).thenReturn(prefix)
when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
when(mockExecution.getVariable("DCVFM_cloudSiteId")).thenReturn("12345")
+ when(mockExecution.getVariable("DCVFM_cloudOwner")).thenReturn("CloudOwner")
when(mockExecution.getVariable("rollbackData")).thenReturn(new RollbackData())
List fqdnList = new ArrayList()
fqdnList.add("test")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
index d635b2311a..59a2b0eda3 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/DoUpdateVfModuleTest.groovy
@@ -182,6 +182,7 @@ class DoUpdateVfModuleTest extends MsoGroovyTest{
ExecutionEntity mockExecution = setupMock()
when(mockExecution.getVariable("prefix")).thenReturn(prefix)
when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "cloudRegion")).thenReturn("CloudOwner")
when(mockExecution.getVariable(prefix + "vfModuleId")).thenReturn("cb510af0-5b21-4bc7-86d9-323cb396ce32")
when(mockExecution.getVariable(prefix + "volumeGroupStackId")).thenReturn("12345")
when(mockExecution.getVariable(prefix + "vfModuleName")).thenReturn("PCRF::module-0-2")
diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
index 06ae576307..8af15de75b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/UpdateVfModuleVolumeInfraV1Test.groovy
@@ -143,6 +143,7 @@ class UpdateVfModuleVolumeInfraV1Test extends MsoGroovyTest{
when(mockExecution.getVariable("prefix")).thenReturn(prefix)
when(mockExecution.getVariable("isDebugLogEnabled")).thenReturn("true")
when(mockExecution.getVariable(prefix + "aicCloudRegion")).thenReturn("RDM2WAGPLCP")
+ when(mockExecution.getVariable(prefix + "cloudOwner")).thenReturn("CloudOwner")
when(mockExecution.getVariable(prefix + "tenantId")).thenReturn("")
VolumeGroup volumeGroup = new VolumeGroup();
volumeGroup.setHeatStackId("heatStackId")
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
index 98174d59b6..258bea9a01 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/mapper/VnfAdapterVfModuleObjectMapper.java
@@ -121,6 +121,7 @@ public class VnfAdapterVfModuleObjectMapper {
CreateVfModuleRequest createVfModuleRequest = new CreateVfModuleRequest();
createVfModuleRequest.setCloudSiteId(cloudRegion.getLcpCloudRegionId());
+ createVfModuleRequest.setCloudOwner(cloudRegion.getCloudOwner());
createVfModuleRequest.setTenantId(cloudRegion.getTenantId());
createVfModuleRequest.setVfModuleId(vfModule.getVfModuleId());
createVfModuleRequest.setVfModuleName(vfModule.getVfModuleName());
@@ -776,6 +777,7 @@ public class VnfAdapterVfModuleObjectMapper {
VfModule vfModule) throws IOException {
DeleteVfModuleRequest deleteVfModuleRequest = new DeleteVfModuleRequest();
deleteVfModuleRequest.setCloudSiteId(cloudRegion.getLcpCloudRegionId());
+ deleteVfModuleRequest.setCloudOwner(cloudRegion.getCloudOwner());
deleteVfModuleRequest.setTenantId(cloudRegion.getTenantId());
deleteVfModuleRequest.setVnfId(genericVnf.getVnfId());
deleteVfModuleRequest.setVfModuleId(vfModule.getVfModuleId());
@@ -823,4 +825,4 @@ public class VnfAdapterVfModuleObjectMapper {
}
return baseVfModule;
}
-} \ No newline at end of file
+}