diff options
Diffstat (limited to 'vid-automation')
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 |