aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-03-20 20:26:41 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-20 20:26:41 +0000
commitcfab2fdde91df35e9f134e128495371939b305a0 (patch)
treeac2c9e4f0765ac0862ac79da18656b75d9f9bb2a /bpmn
parent26c6548520475894fa23231987f5e3fa69fed6d9 (diff)
parent9a409f9ea4c3cc5f73d5756dba833889040e7dda (diff)
Merge "Add cloudOwner to VNF adapter call"
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/src/test/groovy/org/onap/so/bpmn/common/scripts/VnfAdapterRestV1Test.groovy1
-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/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
17 files changed, 88 insertions, 1 deletions
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/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/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
+}