aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation
diff options
context:
space:
mode:
Diffstat (limited to 'vid-automation')
-rw-r--r--vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java15
-rw-r--r--vid-automation/src/test/resources/asyncInstantiation/templates__instance_template_network.json110
2 files changed, 122 insertions, 3 deletions
diff --git a/vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java b/vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java
index 145db8b9d..cf3d508e8 100644
--- a/vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java
+++ b/vid-automation/src/test/java/org/onap/vid/api/InstantiationTemplatesApiTest.java
@@ -28,6 +28,7 @@ import org.springframework.http.HttpEntity;
import org.springframework.http.HttpMethod;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import vid.automation.test.Constants.Users;
import vid.automation.test.infra.FeatureTogglingTest;
@@ -88,10 +89,18 @@ public class InstantiationTemplatesApiTest extends AsyncInstantiationBase {
return uri.toASCIIString() + "/instantiationTemplates/templateTopology/" + jobId;
}
- @Test
- public void templateTopology_givenDeployFromCypressE2E_getTemplateTopologyDataIsEquivalent() {
+ @DataProvider
+ public static Object[][] deployFromCypressE2EFilenames() {
+ return new Object[][]{
+ {"asyncInstantiation/templates__instance_template.json"},
+ {"asyncInstantiation/templates__instance_template_network.json"},
+ };
+ }
+
+ @Test(dataProvider = "deployFromCypressE2EFilenames")
+ public void templateTopology_givenDeployFromCypressE2E_getTemplateTopologyDataIsEquivalent(String fileName) {
templateTopology_givenDeploy_templateTopologyIsEquivalentToBody(
- fileAsJsonNode("asyncInstantiation/templates__instance_template.json"));
+ fileAsJsonNode(fileName));
}
@Test
diff --git a/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template_network.json b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template_network.json
new file mode 100644
index 000000000..5669ee285
--- /dev/null
+++ b/vid-automation/src/test/resources/asyncInstantiation/templates__instance_template_network.json
@@ -0,0 +1,110 @@
+{
+ "modelInfo": {
+ "modelInvariantId": "ce23786e-b2b1-4258-b561-f77ef93ada9c",
+ "modelVersionId": "a1a14610-ee40-4049-8007-0608a20dd1fa",
+ "modelName": "int_pktmirror_net NC SRIOV network",
+ "modelType": "service",
+ "modelVersion": "3.0"
+ },
+ "owningEntityId": "d61e6f2d-12fa-4cc2-91df-7c244011d6fc",
+ "owningEntityName": "WayneHolland",
+ "projectName": "WATKINS",
+ "globalSubscriberId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "subscriberName": "SILVIA ROBBINS",
+ "productFamilyId": null,
+ "instanceName": "SDN_int_pktmirror_net_svc",
+ "subscriptionServiceType": "TYLER SILVIA",
+ "lcpCloudRegionId": null,
+ "tenantId": null,
+ "tenantName": null,
+ "aicZoneId": null,
+ "aicZoneName": null,
+ "existingVNFCounterMap": {},
+ "existingVRFCounterMap": {},
+ "existingVnfGroupCounterMap": {},
+ "existingNetworksCounterMap": {
+ "f6b6d141-0d4c-427d-ad35-797f3d1abe71": 1,
+ "e01e26b2-aa26-4e11-9243-105d4589ff08": 1
+ },
+ "existingNames": {
+ },
+ "vnfs": {},
+ "networks": {
+ "SR-IOV Provider 2-1": {
+ "modelInfo": {
+ "modelCustomizationName": "SR-IOV Provider 2-1",
+ "modelCustomizationId": "f6b6d141-0d4c-427d-ad35-797f3d1abe71",
+ "modelInvariantId": "ffb9e45c-e674-4289-aad3-00040ad746e4",
+ "modelVersionId": "01f4c475-3f89-4f00-a2f4-39a873dba0ae",
+ "modelName": "NETWORK_CLOUD_PROVIDER_NETWORK",
+ "modelType": "network",
+ "modelVersion": "1.0"
+ },
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "instanceName": "SDN_int_pktmirror_net_1",
+ "action": "Create",
+ "platformName": "xxx1",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
+ "instanceParams": [
+ {}
+ ],
+ "rollbackOnFailure": true,
+ "instanceId": null,
+ "trackById": "2e8455cb-4c28-4aa7-929d-f1e1881aaaa1",
+ "isFailed": false,
+ "statusMessage": null,
+ "position": null,
+ "lineOfBusiness": "zzz1"
+ },
+ "SR-IOV Provider 2-2": {
+ "modelInfo": {
+ "modelCustomizationName": "SR-IOV Provider 2-2",
+ "modelCustomizationId": "e01e26b2-aa26-4e11-9243-105d4589ff08",
+ "modelInvariantId": "ffb9e45c-e674-4289-aad3-00040ad746e4",
+ "modelVersionId": "01f4c475-3f89-4f00-a2f4-39a873dba0ae",
+ "modelName": "NETWORK_CLOUD_PROVIDER_NETWORK",
+ "modelType": "network",
+ "modelVersion": "1.0"
+ },
+ "productFamilyId": "e433710f-9217-458d-a79d-1c7aff376d89",
+ "instanceName": "SDN_int_pktmirror_net_2",
+ "action": "Create",
+ "platformName": "xxx1",
+ "lcpCloudRegionId": "hvf6",
+ "tenantId": "4914ab0ab3a743e58f0eefdacc1dde77",
+ "instanceParams": [
+ {}
+ ],
+ "rollbackOnFailure": true,
+ "instanceId": null,
+ "trackById": "e43ffa05-ea78-4c34-a0c8-02449851d827",
+ "isFailed": false,
+ "statusMessage": null,
+ "position": null,
+ "lineOfBusiness": "zzz1"
+ }
+ },
+ "vnfGroups": {},
+ "vrfs": {},
+ "instanceParams": [
+ {}
+ ],
+ "pause": false,
+ "bulkSize": 1,
+ "rollbackOnFailure": "true",
+ "isALaCarte": true,
+ "testApi": "GR_API",
+ "instanceId": null,
+ "action": "Create",
+ "trackById": "4157dcfb-fa22-435d-8df9-659628137177",
+ "isFailed": false,
+ "statusMessage": null,
+ "vidNotions": {
+ "instantiationUI": "networkWithPropertyNetworkTechnologyEqualsStandardSriovOrOvs",
+ "modelCategory": "5G Provider Network",
+ "viewEditUI": "legacy",
+ "instantiationType": "ALaCarte"
+ },
+ "position": null
+}