diff options
author | Eylon Malin <eylon.malin@intl.att.com> | 2019-11-13 16:41:33 +0200 |
---|---|---|
committer | Ittay Stern <ittay.stern@att.com> | 2019-11-19 17:41:46 +0200 |
commit | 4728ff865a7c6ab7a27bb3a12ad88b304fcf8d3d (patch) | |
tree | 2f08b173a1ae398607dbd7c41488cfa12dd2c989 /vid-automation/src/main/java/org | |
parent | ab4243c9b71a08f760d85529abebea521eb45c7f (diff) |
a-la-carte services new instantiation ui selenium test
Issue-ID: VID-701
Change-Id: I72f5245493d0ad3e3cc4447617c4b6a011bfd41c
Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/main/java/org')
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte.java (renamed from vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte5GServiceWithNetwork.java) | 22 | ||||
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteCypress.java | 20 | ||||
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java | 75 | ||||
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleBase.java | 23 | ||||
-rw-r--r-- | vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java | 67 |
5 files changed, 178 insertions, 29 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte5GServiceWithNetwork.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte.java index 40c18fa55..180aaefd1 100644 --- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte5GServiceWithNetwork.java +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateServiceInstanceAlacarte.java @@ -1,16 +1,20 @@ package org.onap.simulator.presetGenerator.presets.mso; -import java.util.Map; - import static org.onap.simulator.presetGenerator.presets.mso.PresetMSOServiceInstanceGen2WithNames.Keys.SERVICE_NAME; -public class PresetMSOCreateServiceInstanceAlacarte5GServiceWithNetwork extends PresetMSOCreateServiceInstanceGen2WithNames { +import java.util.Map; +import vid.automation.test.infra.ModelInfo; + +public class PresetMSOCreateServiceInstanceAlacarte extends PresetMSOCreateServiceInstanceGen2WithNames { private final String requestorId; + protected final ModelInfo modelInfo; - public PresetMSOCreateServiceInstanceAlacarte5GServiceWithNetwork(Map<Keys, String> names, String requestId, String requestorId) { - super(names, 0, requestId); + public PresetMSOCreateServiceInstanceAlacarte(Map<Keys, String> names, String requestId, String responseInstanceId, + String requestorId, ModelInfo modelInfo) { + super(names, 0, requestId, responseInstanceId); this.requestorId = requestorId; + this.modelInfo = modelInfo; } @Override @@ -22,13 +26,7 @@ public class PresetMSOCreateServiceInstanceAlacarte5GServiceWithNetwork extends public Object getRequestBody() { return "{" + " \"requestDetails\": {" + - " \"modelInfo\": {" + - " \"modelInvariantId\": \"16e56d12-40b3-4db1-a40e-d48c36679e2e\"," + - " \"modelVersionId\": \"4659e8bd-0920-4eed-8ec5-550b4c8dceeb\"," + - " \"modelName\": \"SR-IOV Provider-1\"," + - " \"modelType\": \"service\"," + - " \"modelVersion\": \"1.0\"" + - " }," + + modelInfo.createMsoModelInfo()+ " \"owningEntity\": {" + " \"owningEntityId\": \"d61e6f2d-12fa-4cc2-91df-7c244011d6fc\"," + " \"owningEntityName\": \"WayneHolland\"" + diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteCypress.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteCypress.java index 7b434d559..ace17888f 100644 --- a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteCypress.java +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteCypress.java @@ -1,12 +1,10 @@ package org.onap.simulator.presetGenerator.presets.mso; import com.google.common.collect.ImmutableMap; - import java.util.Map; -public class PresetMSOCreateVfModuleALaCarteCypress extends PresetMSOBaseCreateInstancePost { - private String serviceInstanceId; - private String vnfInstanceId; +public class PresetMSOCreateVfModuleALaCarteCypress extends PresetMSOCreateVfModuleBase { + protected final Map<Keys, String> names; public enum Keys { @@ -34,25 +32,13 @@ public class PresetMSOCreateVfModuleALaCarteCypress extends PresetMSOBaseCreateI .build(); public PresetMSOCreateVfModuleALaCarteCypress(String overrideRequestId, String serviceInstanceId, String vnfInstanceId, Map<Keys, String> names, String testApi, boolean withTestApi) { - super(overrideRequestId); - this.vnfInstanceId = vnfInstanceId; - this.serviceInstanceId = serviceInstanceId; + super(overrideRequestId, serviceInstanceId, vnfInstanceId); this.names = names; this.msoTestApi = testApi; this.withTestApi = withTestApi; } @Override - public boolean isStrictMatch() { - return true; - } - - @Override - public String getReqPath() { - return getRootPath() + "/serviceInstantiation/v./serviceInstances/" + serviceInstanceId + "/vnfs/" + vnfInstanceId + "/vfModules"; - } - - @Override public Object getRequestBody() { return "" + "{" + 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 new file mode 100644 index 000000000..57d15bd40 --- /dev/null +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleALaCarteE2E.java @@ -0,0 +1,75 @@ +package org.onap.simulator.presetGenerator.presets.mso; + +import vid.automation.test.infra.ModelInfo; + +public class PresetMSOCreateVfModuleALaCarteE2E extends PresetMSOCreateVfModuleBase { + + protected final String requestorId; + protected final ModelInfo serviceModelInfo; + + public PresetMSOCreateVfModuleALaCarteE2E( + String overrideRequestId, + String serviceInstanceId, + String vnfInstanceId, + String requestorId, + ModelInfo serviceModelInfo) { + super(overrideRequestId, serviceInstanceId, vnfInstanceId); + this.requestorId = requestorId; + this.serviceModelInfo = serviceModelInfo; + } + + @Override + public Object getRequestBody() { + return "{" + + " \"requestDetails\": {" + + " \"modelInfo\": {" + + " \"modelCustomizationName\": \"Vocg1804Vf..base_ocg..module-0\"," + + " \"modelCustomizationId\": \"a7b333d7-7633-4197-b40d-80fcfcadee94\"," + + " \"modelInvariantId\": \"e9c795c8-6b98-4db3-bd90-a84b8ca5181b\"," + + " \"modelVersionId\": \"815db6e5-bdfd-4cb6-9575-82c36df8747a\"," + + " \"modelName\": \"Vocg1804Vf..base_ocg..module-0\"," + + " \"modelType\": \"vfModule\"," + + " \"modelVersion\": \"4\"" + + " }," + + " \"cloudConfiguration\": {" + + " \"lcpCloudRegionId\": \"hvf6\"," + + addCloudOwnerIfNeeded() + + " \"tenantId\": \"bae71557c5bb4d5aac6743a4e5f1d054\"" + + " }," + + " \"requestInfo\": {" + + " \"source\": \"VID\"," + + " \"suppressRollback\": false," + + " \"requestorId\": \""+requestorId+"\"" + + " }," + + " \"relatedInstanceList\": [{" + + " \"relatedInstance\": {" + + serviceModelInfo.createMsoModelInfo() + + " \"instanceId\": \""+serviceInstanceId+"\"" + + " }" + + " }, {" + + " \"relatedInstance\": {" + + " \"modelInfo\": {" + + " \"modelCustomizationName\": \"vOCG_1804_VF 0\"," + + " \"modelCustomizationId\": \"e9ed1da0-c078-426a-8e84-6f4e85eace59\"," + + " \"modelInvariantId\": \"db23d71a-4cb4-4030-9c9b-e3f886c2b35c\"," + + " \"modelVersionId\": \"aca3f7b1-15f9-45a5-b182-b8b5aca84a76\"," + + " \"modelName\": \"vOCG_1804_VF\"," + + " \"modelType\": \"vnf\"," + + " \"modelVersion\": \"4.0\"" + + " }," + + " \"instanceId\": \""+vnfInstanceId+"\"" + + " }" + + " }" + + " ]," + + " \"requestParameters\": {" + + " \"userParams\": [{" + + " \"param\": \"ABCD\"," + + " \"vnf_instance_name\": \"sample\"" + + " }" + + " ]," + + " \"testApi\": \"VNF_API\"" + + " }" + + " }" + + "}"; + } +} diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleBase.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleBase.java new file mode 100644 index 000000000..344f43cdd --- /dev/null +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVfModuleBase.java @@ -0,0 +1,23 @@ +package org.onap.simulator.presetGenerator.presets.mso; + +public class PresetMSOCreateVfModuleBase extends PresetMSOBaseCreateInstancePost { + + protected String serviceInstanceId; + protected String vnfInstanceId; + + public PresetMSOCreateVfModuleBase(String requestId, String serviceInstanceId, String vnfInstanceId) { + super(requestId); + this.serviceInstanceId = serviceInstanceId; + this.vnfInstanceId = vnfInstanceId; + } + + @Override + public boolean isStrictMatch() { + return true; + } + + @Override + public String getReqPath() { + return getRootPath() + "/serviceInstantiation/v./serviceInstances/" + serviceInstanceId + "/vnfs/" + vnfInstanceId + "/vfModules"; + } +} 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 new file mode 100644 index 000000000..dba42f32f --- /dev/null +++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/mso/PresetMSOCreateVnfALaCarteE2E.java @@ -0,0 +1,67 @@ +package org.onap.simulator.presetGenerator.presets.mso; + +import vid.automation.test.infra.ModelInfo; + +public class PresetMSOCreateVnfALaCarteE2E extends PresetMSOCreateVnfBase { + + private final String requestorId; + protected String lineOfBusinessName; + protected final ModelInfo serviceModelInfo; + + public PresetMSOCreateVnfALaCarteE2E( + String overrideRequestId, + String serviceInstanceId, + String vnfInstanceId, + String lineOfBusinessName, + String requestorId, + ModelInfo serviceModelInfo) { + super(overrideRequestId, serviceInstanceId, vnfInstanceId); + this.lineOfBusinessName = lineOfBusinessName; + this.requestorId = requestorId; + this.serviceModelInfo = serviceModelInfo; + } + + @Override + public Object getRequestBody() { + return "{" + + " \"requestDetails\": {" + + " \"modelInfo\": {" + + " \"modelCustomizationName\": \"vOCG_1804_VF 0\"," + + " \"modelCustomizationId\": \"e9ed1da0-c078-426a-8e84-6f4e85eace59\"," + + " \"modelInvariantId\": \"db23d71a-4cb4-4030-9c9b-e3f886c2b35c\"," + + " \"modelVersionId\": \"aca3f7b1-15f9-45a5-b182-b8b5aca84a76\"," + + " \"modelName\": \"vOCG_1804_VF\"," + + " \"modelType\": \"vnf\"," + + " \"modelVersion\": \"4.0\"" + + " }," + + " \"cloudConfiguration\": {" + + " \"lcpCloudRegionId\": \"some legacy region\"," + + addCloudOwnerIfNeeded() + + " \"tenantId\": \"092eb9e8e4b7412e8787dd091bc58e86\"" + + " }," + + " \"requestInfo\": {" + + " \"source\": \"VID\"," + + " \"suppressRollback\": false," + + " \"requestorId\": \""+requestorId+"\"" + + " }," + + " \"platform\": {" + + " \"platformName\": \"platform\"" + + " }," + + " \"lineOfBusiness\": {" + + " \"lineOfBusinessName\": \""+lineOfBusinessName+"\"" + + " }," + + " \"relatedInstanceList\": [{" + + " \"relatedInstance\": {" + + serviceModelInfo.createMsoModelInfo() + + " \"instanceId\": \""+serviceInstanceId+"\"" + + " }" + + " }" + + " ]," + + " \"requestParameters\": {" + + " \"userParams\": []," + + " \"testApi\": \"VNF_API\"" + + " }" + + " }" + + "}"; + } +} |