aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main
diff options
context:
space:
mode:
authorEinat Vinouze <einat.vinouze@intl.att.com>2019-08-27 16:01:01 +0300
committerIttay Stern <ittay.stern@att.com>2019-09-09 07:01:36 +0000
commite1f7974f0badbd4440d5b7ea5f1b1cb2d4973818 (patch)
tree46be9cdc44cbb475527bc3c43df23d16f7579d29 /vid-automation/src/main
parente25b88b5a7a0f3bf63ca7160a441b53145484bcc (diff)
Adding feature: Replace vfmodule
Issue-ID: VID-603 Change-Id: I59068a0979d6fb733e4243c8f78921f396dc9d17 Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com> Signed-off-by: Amichai Hemli <amichai.hemli@intl.att.com> Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-automation/src/main')
-rw-r--r--vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAIModelVersionsByInvariantId.java91
-rw-r--r--vid-automation/src/main/java/vid/automation/test/infra/Features.java1
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/NewServiceInstanceTest.java2
-rw-r--r--vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java4
4 files changed, 95 insertions, 3 deletions
diff --git a/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAIModelVersionsByInvariantId.java b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAIModelVersionsByInvariantId.java
new file mode 100644
index 000000000..5a43e10dc
--- /dev/null
+++ b/vid-automation/src/main/java/org/onap/simulator/presetGenerator/presets/aai/PresetAAIModelVersionsByInvariantId.java
@@ -0,0 +1,91 @@
+package org.onap.simulator.presetGenerator.presets.aai;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import org.onap.simulator.presetGenerator.presets.BasePresets.BaseAAIPreset;
+import org.springframework.http.HttpMethod;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+public class PresetAAIModelVersionsByInvariantId extends BaseAAIPreset {
+
+
+ @Override
+ public String getReqPath() {
+ return getRootPath() + "/query";
+ }
+
+ @Override
+ public Map<String, List> getQueryParams() {
+ return ImmutableMap.of(
+ "format", Collections.singletonList("resource"),
+ "depth", Collections.singletonList("0")
+ );
+ }
+
+ @Override
+ public Object getRequestBody() {
+ return ImmutableMap.of(
+ "start", ImmutableList.of("service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea"),
+ "query", "query/serviceModels-byDistributionStatus?distributionStatus=DISTRIBUTION_COMPLETE_OK"
+ );
+ // "{" +
+ // " \"start\": [\"service-design-and-creation/models/model/f6342be5-d66b-4d03-a1aa-c82c3094c4ea"]," +
+ // " \"query\": \"query/serviceModels-byDistributionStatus?distributionStatus=DISTRIBUTION_COMPLETE_OK\"" +
+ // "}";
+ }
+
+ @Override
+ public Object getResponseBody() {
+ return "{" +
+ " \"results\": [" +
+ " {" +
+ " \"model\": {" +
+ " \"model-invariant-id\": \"f6342be5-d66b-4d03-a1aa-c82c3094c4ea\"," +
+ " \"model-type\": \"service\"," +
+ " \"resource-version\": \"1534274421300\"" +
+ " }" +
+ " }," +
+ " {" +
+ " \"model-ver\": {" +
+ " \"model-version-id\": \"a92f899d-a3ec-465b-baed-1663b0a5aee1\"," +
+ " \"model-name\": \"NCM_VLAN_SVC_ym161f\"," +
+ " \"model-version\": \"3.0\"," +
+ " \"distribution-status\": \"DISTRIBUTION_COMPLETE_OK\"," +
+ " \"model-description\": \"Network Collection service for vLAN tagging\"," +
+ " \"resource-version\": \"1534788756086\"" +
+ " }" +
+ " }," +
+ " {" +
+ " \"model-ver\": {" +
+ " \"model-version-id\": \"d2fda667-e92e-4cfa-9620-5da5de01a319\"," +
+ " \"model-name\": \"NCM_VLAN_SVC_ym161f\"," +
+ " \"model-version\": \"1.0\"," +
+ " \"distribution-status\": \"DISTRIBUTION_COMPLETE_OK\"," +
+ " \"model-description\": \"Network Collection service for vLAN tagging\"," +
+ " \"resource-version\": \"1534444087221\"" +
+ " }" +
+ " }," +
+ " {" +
+ " \"model-ver\": {" +
+ " \"model-version-id\": \"0e97a118-b1b6-40d5-bbad-98cdd51b1c48\"," +
+ " \"model-name\": \"NCM_VLAN_SVC_ym161f\"," +
+ " \"model-version\": \"11.0\"," +
+ " \"distribution-status\": \"DISTRIBUTION_COMPLETE_OK\"," +
+ " \"model-description\": \"Network Collection service for vLAN tagging the-newest-version\"," +
+ " \"resource-version\": \"1550783120267\"" +
+ " }" +
+ " }" +
+ " ]" +
+
+ "}";
+ }
+
+ @Override
+ public HttpMethod getReqMethod() {
+ return HttpMethod.PUT;
+ }
+
+}
diff --git a/vid-automation/src/main/java/vid/automation/test/infra/Features.java b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
index 059500cd5..dd02609bd 100644
--- a/vid-automation/src/main/java/vid/automation/test/infra/Features.java
+++ b/vid-automation/src/main/java/vid/automation/test/infra/Features.java
@@ -43,6 +43,7 @@ public enum Features implements Feature {
FLAG_1908_VNF_FC_NEW_INSTANTIATION_UI,
FLAG_HANDLE_SO_WORKFLOWS,
FLAG_1908_MACRO_NOT_TRANSPORT_NEW_VIEW_EDIT,
+ FLAG_FLASH_REPLACE_VF_MODULE,
;
public boolean isActive() {
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 d7903ceef..a701f1029 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
@@ -352,7 +352,7 @@ public class NewServiceInstanceTest extends CreateInstanceDialogBaseTest {
SimulatorApi.registerExpectationFromPresets(ImmutableList.of(
PresetAAIGetCloudOwnersByCloudRegionId.PRESET_MTN6_TO_ATT_AIC,
- new PresetAAIGetL3NetworksByCloudRegionSpecificState("irma-aic", "hvf6", "AIN Web Tool-15-D-testalexandria"),
+ new PresetAAIGetL3NetworksByCloudRegionSpecificState("irma-aic", "hvf6", "bae71557c5bb4d5aac6743a4e5f1d054"),
new PresetAAIGetVpnsByType()
), APPEND);
diff --git a/vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java b/vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java
index 40af6f8a1..073db0999 100644
--- a/vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java
+++ b/vid-automation/src/main/java/vid/automation/test/test/ViewEditWithDrawingBoardTest.java
@@ -54,7 +54,7 @@ public class ViewEditWithDrawingBoardTest extends VidBaseTestCase {
private String serviceType = "TYLER SILVIA";
private String serviceInstanceToResumeName;
- @FeatureTogglingTest(Features.FLAG_1902_VNF_GROUPING)
+ @FeatureTogglingTest({Features.FLAG_1902_VNF_GROUPING, Features.FLAG_FLASH_REPLACE_VF_MODULE})
@Test
public void testDeleteVnfGroupWithMembers() {
@@ -184,7 +184,7 @@ public class ViewEditWithDrawingBoardTest extends VidBaseTestCase {
);
}
- @FeatureTogglingTest({Features.FLAG_1908_MACRO_NOT_TRANSPORT_NEW_VIEW_EDIT, Features.FLAG_1908_RESUME_MACRO_SERVICE})
+ @FeatureTogglingTest({Features.FLAG_1908_MACRO_NOT_TRANSPORT_NEW_VIEW_EDIT, Features.FLAG_1908_RESUME_MACRO_SERVICE, Features.FLAG_FLASH_REPLACE_VF_MODULE})
@Test
public void testResumeServiceInstanceWithCollectionResource() {