summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2020-02-16 19:37:28 +0200
committerIttay Stern <ittay.stern@att.com>2020-02-16 19:37:28 +0200
commit9ea739c84733dc140fd573a4eef463b3c6240598 (patch)
treec9252f51ecd7013d013e3f273b7cd05b7fac6a36
parentcdd9b9bbc017ea323483dd153773e4ee158fceed (diff)
Remove tenant and lcpCloudRegionId - adjust test createNewServiceInstance_aLaCarte_WithVnf
Issue-ID: VID-758 Change-Id: I232a42bd12429a97d59eb6a93fe5ef07fde7dd56 Signed-off-by: Ittay Stern <ittay.stern@att.com>
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java10
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java10
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java23
3 files changed, 32 insertions, 11 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java
index 185c4bfe8..440db879e 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java
@@ -11,6 +11,8 @@ public class PresetMSOCreateVfModuleALaCarteE2E extends PresetMSOCreateVfModuleB
private final String instanceName;
private final ModelInfoWithCustomization resourceModelInfo;
private final String relatedInstance;
+ protected final String lcpCloudRegionId;
+ protected final String tenantId;
public PresetMSOCreateVfModuleALaCarteE2E(
String overrideRequestId,
@@ -21,13 +23,15 @@ public class PresetMSOCreateVfModuleALaCarteE2E extends PresetMSOCreateVfModuleB
ModelInfo serviceModelInfo,
String instanceName,
ModelInfoWithCustomization resourceModelInfo,
- String relatedInstance) {
+ String relatedInstance, String lcpCloudRegionId, String tenantId) {
super(overrideRequestId, responseInstanceId, serviceInstanceId, vnfInstanceId, resourceModelInfo.resourceType);
this.requestorId = requestorId;
this.serviceModelInfo = serviceModelInfo;
this.instanceName = instanceName;
this.resourceModelInfo = resourceModelInfo;
this.relatedInstance = relatedInstance;
+ this.lcpCloudRegionId = lcpCloudRegionId;
+ this.tenantId = tenantId;
}
@Override
@@ -36,9 +40,9 @@ public class PresetMSOCreateVfModuleALaCarteE2E extends PresetMSOCreateVfModuleB
+ " \"requestDetails\": {"
+ resourceModelInfo.createMsoModelInfo()
+ " \"cloudConfiguration\": {"
- + " \"lcpCloudRegionId\": \"hvf6\","
+ + " \"lcpCloudRegionId\": \"" + lcpCloudRegionId + "\","
+ addCloudOwnerIfNeeded()
- + " \"tenantId\": \"bae71557c5bb4d5aac6743a4e5f1d054\""
+ + " \"tenantId\": \"" + tenantId + "\""
+ " },"
+ " \"requestInfo\": {"
+ addInstanceName()
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java
index 07839ba6b..5e9266a33 100644
--- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java
@@ -6,6 +6,8 @@ public class PresetMSOCreateVnfALaCarteE2E extends PresetMSOCreateVnfBase {
private final String requestorId;
protected String lineOfBusinessName;
+ protected final String lcpCloudRegionId;
+ protected final String tenantId;
protected final ModelInfo serviceModelInfo;
public PresetMSOCreateVnfALaCarteE2E(
@@ -14,10 +16,12 @@ public class PresetMSOCreateVnfALaCarteE2E extends PresetMSOCreateVnfBase {
String vnfInstanceId,
String lineOfBusinessName,
String requestorId,
- ModelInfo serviceModelInfo) {
+ String lcpCloudRegionId, String tenantId, ModelInfo serviceModelInfo) {
super(overrideRequestId, serviceInstanceId, vnfInstanceId);
this.lineOfBusinessName = lineOfBusinessName;
this.requestorId = requestorId;
+ this.lcpCloudRegionId = lcpCloudRegionId;
+ this.tenantId = tenantId;
this.serviceModelInfo = serviceModelInfo;
}
@@ -35,9 +39,9 @@ public class PresetMSOCreateVnfALaCarteE2E extends PresetMSOCreateVnfBase {
+ " \"modelVersion\": \"4.0\""
+ " },"
+ " \"cloudConfiguration\": {"
- + " \"lcpCloudRegionId\": \"some legacy region\","
+ + " \"lcpCloudRegionId\": \"" + lcpCloudRegionId + "\","
+ addCloudOwnerIfNeeded()
- + " \"tenantId\": \"092eb9e8e4b7412e8787dd091bc58e86\""
+ + " \"tenantId\": \"" + tenantId + "\""
+ " },"
+ " \"requestInfo\": {"
+ " \"productFamilyId\":\"e433710f-9217-458d-a79d-1c7aff376d89\","
diff --git a/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
index 5590c0acd..4fdf825d3 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java
@@ -669,6 +669,19 @@ public class NewServiceInstanceTest extends ModernUITestBase {
+ " \"instanceName\": \""+vgName+"\""
+ " }}";
+ String vnfLcpCloudRegionId = "some legacy region";
+ String vnfTenantId = "092eb9e8e4b7412e8787dd091bc58e86";
+
+ String vfmoduleLcpCloudRegionId;
+ String vfmoduleTenantId;
+
+ if (FLAG_2006_VFMODULE_TAKES_TENANT_AND_REGION_FROM_VNF.isActive()) {
+ vfmoduleLcpCloudRegionId = vnfLcpCloudRegionId;
+ vfmoduleTenantId = vnfTenantId;
+ } else {
+ vfmoduleLcpCloudRegionId = "hvf6";
+ vfmoduleTenantId = "bae71557c5bb4d5aac6743a4e5f1d054";
+ }
registerExpectationFromPresets(
ImmutableList.of(
@@ -678,16 +691,16 @@ public class NewServiceInstanceTest extends ModernUITestBase {
requestorID, serviceModelInfo),
PRESET_SOME_LEGACY_REGION_TO_ATT_AIC,
new PresetMSOOrchestrationRequestGet(COMPLETE, serviceRequestId),
- new PresetMSOCreateVnfALaCarteE2E(vnfRequestId, serviceInstanceId, vnfInstanceId, "ONAP", requestorID, serviceModelInfo),
+ new PresetMSOCreateVnfALaCarteE2E(vnfRequestId, serviceInstanceId, vnfInstanceId, "ONAP", requestorID, vnfLcpCloudRegionId, vnfTenantId, serviceModelInfo),
new PresetMSOOrchestrationRequestGet(COMPLETE, vnfRequestId),
PRESET_MTN6_TO_ATT_AIC,
- new PresetMSOCreateVfModuleALaCarteE2E(vfm0RequestId, vfm0InstanceId, serviceInstanceId, vnfInstanceId, requestorID, serviceModelInfo, null, vfm0, null),
+ new PresetMSOCreateVfModuleALaCarteE2E(vfm0RequestId, vfm0InstanceId, serviceInstanceId, vnfInstanceId, requestorID, serviceModelInfo, null, vfm0, null, vfmoduleLcpCloudRegionId, vfmoduleTenantId),
new PresetMSOOrchestrationRequestGet(COMPLETE, vfm0RequestId),
- new PresetMSOCreateVfModuleALaCarteE2E(vg1RequestId, vg1InstanceId, serviceInstanceId, vnfInstanceId, requestorID, serviceModelInfo, vgName, vg1, null),
+ new PresetMSOCreateVfModuleALaCarteE2E(vg1RequestId, vg1InstanceId, serviceInstanceId, vnfInstanceId, requestorID, serviceModelInfo, vgName, vg1, null, vfmoduleLcpCloudRegionId, vfmoduleTenantId),
new PresetMSOOrchestrationRequestGet(COMPLETE, vg1RequestId),
- new PresetMSOCreateVfModuleALaCarteE2E(vfm1RequestId, vfm1InstanceId, serviceInstanceId, vnfInstanceId, requestorID, serviceModelInfo, null, vfm1, vgRelatedInstance),
+ new PresetMSOCreateVfModuleALaCarteE2E(vfm1RequestId, vfm1InstanceId, serviceInstanceId, vnfInstanceId, requestorID, serviceModelInfo, null, vfm1, vgRelatedInstance, vfmoduleLcpCloudRegionId, vfmoduleTenantId),
new PresetMSOOrchestrationRequestGet(COMPLETE, vfm1RequestId),
- new PresetMSOCreateVfModuleALaCarteE2E(vfm12RequestId, vfm12InstanceId, serviceInstanceId, vnfInstanceId, requestorID, serviceModelInfo, null, vfm12, null),
+ new PresetMSOCreateVfModuleALaCarteE2E(vfm12RequestId, vfm12InstanceId, serviceInstanceId, vnfInstanceId, requestorID, serviceModelInfo, null, vfm12, null, vfmoduleLcpCloudRegionId, vfmoduleTenantId),
new PresetMSOOrchestrationRequestGet(COMPLETE, vfm12RequestId)
),
APPEND