summaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-infra/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'mso-api-handlers/mso-api-handler-infra/src/test')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java24
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java83
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceInstanceVpnBondingService.json57
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceVpnBondingService.json57
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceId.json56
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameNetwork.json56
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameVpnBinding.json56
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelInvariantId.json57
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelType.json56
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql3
10 files changed, 505 insertions, 0 deletions
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java
index c30b9dedf2..bc10aa744e 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/MsoRequestTest.java
@@ -83,6 +83,12 @@ public class MsoRequestTest extends BaseTest {
return input;
}
+ public String inputStreamVpnBonding(String JsonInput) throws IOException {
+ JsonInput = "src/test/resources/Validation" + JsonInput;
+ String input = new String(Files.readAllBytes(Paths.get(JsonInput)));
+ return input;
+ }
+
// Tests for successful validation of incoming JSON requests through the parse method
@Test
@Parameters(method = "successParameters")
@@ -188,6 +194,8 @@ public class MsoRequestTest extends BaseTest {
instanceIdMapTest, Action.addRelationships, "5"},
{mapper.readValue(inputStream("/SuccessfulValidation/ServiceAssign.json"),
ServiceInstancesRequest.class), instanceIdMapTest, Action.assignInstance, "7"},
+ {mapper.readValue(inputStream("/RelatedInstances/ServiceInstanceVpnBondingService.json"),
+ ServiceInstancesRequest.class), instanceIdMapTest, Action.createInstance, "7"},
{mapper.readValue(inputStream("/SuccessfulValidation/ServiceUnassign.json"),
ServiceInstancesRequest.class), instanceIdMapTest, Action.unassignInstance, "7"}});
}
@@ -546,6 +554,22 @@ public class MsoRequestTest extends BaseTest {
mapper.readValue(inputStream("/RelatedInstances/v6AddRelationshipsInstanceName.json"),
ServiceInstancesRequest.class),
instanceIdMapTest, Action.addRelationships, 6},
+ {"No valid modelType in relatedInstance is specified",
+ mapper.readValue(inputStreamVpnBonding("/VpnBondingValidation/NoModelType.json"),
+ ServiceInstancesRequest.class),
+ instanceIdMapTest, Action.createInstance, 7},
+ {"No valid instanceId in relatedInstance is specified",
+ mapper.readValue(inputStreamVpnBonding("/VpnBondingValidation/NoInstanceId.json"),
+ ServiceInstancesRequest.class),
+ instanceIdMapTest, Action.createInstance, 7},
+ {"No valid instanceName in relatedInstance for vpnBinding modelType is specified",
+ mapper.readValue(inputStreamVpnBonding("/VpnBondingValidation/NoInstanceNameVpnBinding.json"),
+ ServiceInstancesRequest.class),
+ instanceIdMapTest, Action.createInstance, 7},
+ {"No valid instanceName in relatedInstance for network modelType is specified",
+ mapper.readValue(inputStreamVpnBonding("/VpnBondingValidation/NoInstanceNameNetwork.json"),
+ ServiceInstancesRequest.class),
+ instanceIdMapTest, Action.createInstance, 7},
{"No valid modelCustomizationName or modelCustomizationId in relatedInstance of vnf is specified",
mapper.readValue(inputStream("/RelatedInstances/RelatedInstancesModelCustomizationId.json"),
ServiceInstancesRequest.class),
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java
index 54da0baa92..93a19a9531 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/onap/so/apihandlerinfra/validation/RelatedInstancesValidationTest.java
@@ -25,15 +25,38 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.HashMap;
+import org.junit.Rule;
import org.junit.Test;
+import org.junit.rules.ExpectedException;
import org.onap.so.apihandlerinfra.Action;
import org.onap.so.apihandlerinfra.BaseTest;
import org.onap.so.exceptions.ValidationException;
+import org.onap.so.serviceinstancebeans.RelatedInstanceList;
import org.onap.so.serviceinstancebeans.ServiceInstancesRequest;
import com.fasterxml.jackson.databind.ObjectMapper;
public class RelatedInstancesValidationTest extends BaseTest {
+ RelatedInstancesValidation validation = new RelatedInstancesValidation();
+
+ @Rule
+ public ExpectedException thrown = ExpectedException.none();
+
+ public ValidationInformation setupValidationInformation(String path) throws IOException {
+ String jsonInput = new String(Files.readAllBytes(Paths.get(path)));
+ ObjectMapper mapper = new ObjectMapper();
+ ServiceInstancesRequest sir = mapper.readValue(jsonInput, ServiceInstancesRequest.class);
+ ValidationInformation info = new ValidationInformation(sir, null, Action.createInstance, 7, false,
+ sir.getRequestDetails().getRequestParameters());
+
+ info.setRequestScope("service");
+ sir.setServiceInstanceId("0fd90c0c-0e3a-46e2-abb5-4c4820d5985b");
+ sir.getRequestDetails().getModelInfo().setModelCustomizationName("name");
+
+ info.setRequestInfo(sir.getRequestDetails().getRequestInfo());
+ return info;
+ }
+
@Test
public void testCreateVnfNetworkInstanceGroup() throws IOException, ValidationException {
String requestJson = new String(Files.readAllBytes(
@@ -50,4 +73,64 @@ public class RelatedInstancesValidationTest extends BaseTest {
assertEquals(info.getVnfType(), "Test/name");
}
+
+ @Test
+ public void testCreateSIVpnBonding() throws IOException, ValidationException {
+ String requestJson = new String(Files.readAllBytes(
+ Paths.get("src/test/resources/MsoRequestTest/RelatedInstances/ServiceInstanceVpnBondingService.json")));
+ ObjectMapper mapper = new ObjectMapper();
+ ServiceInstancesRequest sir = mapper.readValue(requestJson, ServiceInstancesRequest.class);
+ ValidationInformation info = new ValidationInformation(sir, new HashMap<String, String>(),
+ Action.createInstance, 7, false, sir.getRequestDetails().getRequestParameters());
+ info.setRequestScope("service");
+ sir.setServiceInstanceId("0fd90c0c-0e3a-46e2-abb5-4c4820d5985b");
+ sir.getRequestDetails().getModelInfo().setModelCustomizationName("name");
+ RelatedInstancesValidation validation = new RelatedInstancesValidation();
+ validation.validate(info);
+ RelatedInstanceList[] instanceList = sir.getRequestDetails().getRelatedInstanceList();
+
+ assertEquals(info.getRequestScope(), "service");
+ assertEquals(instanceList[0].getRelatedInstance().getModelInfo().getModelType().toString(), "vpnBinding");
+ assertEquals(instanceList[1].getRelatedInstance().getModelInfo().getModelType().toString(), "network");
+ }
+
+ @Test
+ public void validateModelTypeExceptionTest() throws IOException, ValidationException {
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid modelType in relatedInstance is specified");
+ validation.validate(
+ setupValidationInformation("src/test/resources/Validation/VpnBondingValidation/NoModelType.json"));
+ }
+
+ @Test
+ public void validateInstanceNameVpnBindingExceptionTest() throws IOException, ValidationException {
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid instanceName in relatedInstance for vpnBinding modelType is specified");
+ validation.validate(setupValidationInformation(
+ "src/test/resources/Validation/VpnBondingValidation/NoInstanceNameVpnBinding.json"));
+ }
+
+ @Test
+ public void validateInstanceNameNetworkExceptionTest() throws IOException, ValidationException {
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid instanceName in relatedInstance for network modelType is specified");
+ validation.validate(setupValidationInformation(
+ "src/test/resources/Validation/VpnBondingValidation/NoInstanceNameNetwork.json"));
+ }
+
+ @Test
+ public void validateInstanceIdExceptionTest() throws IOException, ValidationException {
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid instanceId in relatedInstance is specified");
+ validation.validate(
+ setupValidationInformation("src/test/resources/Validation/VpnBondingValidation/NoInstanceId.json"));
+ }
+
+ @Test
+ public void validatemodelInvariantIdExceptionTest() throws IOException, ValidationException {
+ thrown.expect(ValidationException.class);
+ thrown.expectMessage("No valid modelInvariantId in relatedInstance is specified");
+ validation.validate(setupValidationInformation(
+ "src/test/resources/Validation/VpnBondingValidation/NoModelInvariantId.json"));
+ }
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceInstanceVpnBondingService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceInstanceVpnBondingService.json
new file mode 100644
index 0000000000..573b7a3ebb
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/MsoRequestTest/RelatedInstances/ServiceInstanceVpnBondingService.json
@@ -0,0 +1,57 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "cloudOwner": "test-mgr",
+ "lcpCloudRegionId": "abc1",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "TEST_123",
+ "subscriberName": "TEST_123"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "vpn-name",
+ "modelInfo": {
+ "modelType": "vpnBinding"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "network-name",
+ "modelInfo": {
+ "modelType": "network"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "subscriptionServiceType": "dev-service-type",
+ "aLaCarte": false
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceVpnBondingService.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceVpnBondingService.json
new file mode 100644
index 0000000000..573b7a3ebb
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/ServiceInstanceTest/ServiceInstanceVpnBondingService.json
@@ -0,0 +1,57 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "cloudOwner": "test-mgr",
+ "lcpCloudRegionId": "abc1",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "TEST_123",
+ "subscriberName": "TEST_123"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "vpn-name",
+ "modelInfo": {
+ "modelType": "vpnBinding"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "network-name",
+ "modelInfo": {
+ "modelType": "network"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "subscriptionServiceType": "dev-service-type",
+ "aLaCarte": false
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceId.json
new file mode 100644
index 0000000000..97e480c8d8
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceId.json
@@ -0,0 +1,56 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "cloudOwner": "test-mgr",
+ "lcpCloudRegionId": "abc1",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "TEST_123",
+ "subscriberName": "TEST_123"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceName": "vpn-name",
+ "modelInfo": {
+ "modelType": "vpnBinding"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "network-name",
+ "modelInfo": {
+ "modelType": "network"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "subscriptionServiceType": "dev-service-type",
+ "aLaCarte": false
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameNetwork.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameNetwork.json
new file mode 100644
index 0000000000..f7ba4761b6
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameNetwork.json
@@ -0,0 +1,56 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "cloudOwner": "test-mgr",
+ "lcpCloudRegionId": "abc1",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "TEST_123",
+ "subscriberName": "TEST_123"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "vpn-name",
+ "modelInfo": {
+ "modelType": "vpnBinding"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "network"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "subscriptionServiceType": "dev-service-type",
+ "aLaCarte": false
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameVpnBinding.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameVpnBinding.json
new file mode 100644
index 0000000000..ac570b3830
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoInstanceNameVpnBinding.json
@@ -0,0 +1,56 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "cloudOwner": "test-mgr",
+ "lcpCloudRegionId": "abc1",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "TEST_123",
+ "subscriberName": "TEST_123"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "modelInfo": {
+ "modelType": "vpnBinding"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "network-name",
+ "modelInfo": {
+ "modelType": "network"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "subscriptionServiceType": "dev-service-type",
+ "aLaCarte": false
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelInvariantId.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelInvariantId.json
new file mode 100644
index 0000000000..ca02c5371a
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelInvariantId.json
@@ -0,0 +1,57 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "cloudOwner": "test-mgr",
+ "lcpCloudRegionId": "abc1",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "TEST_123",
+ "subscriberName": "TEST_123"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "vpn-name",
+ "modelInfo": {
+ "modelType": "vnf"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "network-name",
+ "modelInfo": {
+ "modelType": "service"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "subscriptionServiceType": "dev-service-type",
+ "aLaCarte": false
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelType.json b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelType.json
new file mode 100644
index 0000000000..1d46ce2ccd
--- /dev/null
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/Validation/VpnBondingValidation/NoModelType.json
@@ -0,0 +1,56 @@
+{
+ "requestDetails": {
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "1710f6e8-1c29-4990-9aea-e943a2ec3d21",
+ "modelVersionId": "1710966e-097c-4d63-afda-e0d3bb7015fb",
+ "modelName": "Test",
+ "modelVersion": "1.0"
+ },
+ "cloudConfiguration": {
+ "cloudOwner": "test-mgr",
+ "lcpCloudRegionId": "abc1",
+ "tenantId": "19123c2924c648eb8e42a3c1f14b7682"
+ },
+ "owningEntity": {
+ "owningEntityId": "038d99af-0427-42c2-9d15-971b99b9b489",
+ "owningEntityName": "PACKET CORE"
+ },
+ "project": {
+ "projectName": "projectName"
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "TEST_123",
+ "subscriberName": "TEST_123"
+ },
+ "requestInfo": {
+ "productFamilyId": "a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb",
+ "requestorId": "xxxxxx",
+ "source": "VID",
+ "suppressRollback": false
+ },
+ "relatedInstanceList": [
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "vpn-name",
+ "modelInfo": {
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "ff305d54-75b4-431b-adb2-eb6b9e5ff000",
+ "instanceName": "network-name",
+ "modelInfo": {
+ "modelType": "network"
+ }
+ }
+ }
+ ],
+ "requestParameters": {
+ "subscriptionServiceType": "dev-service-type",
+ "aLaCarte": false
+ }
+ }
+} \ No newline at end of file
diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
index c2eb21b18e..948283453b 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
+++ b/mso-api-handlers/mso-api-handler-infra/src/test/resources/schema.sql
@@ -806,6 +806,9 @@ CREATE TABLE `service` (
`WORKLOAD_CONTEXT` varchar(200) DEFAULT NULL,
`SERVICE_CATEGORY` varchar(200) DEFAULT NULL,
`RESOURCE_ORDER` varchar(200) default NULL,
+ `OVERALL_DISTRIBUTION_STATUS` varchar(45),
+ `ONAP_GENERATED_NAMING` TINYINT(1) DEFAULT NULL,
+ `NAMING_POLICY` varchar(200) DEFAULT NULL,
PRIMARY KEY (`MODEL_UUID`),
KEY `fk_service__tosca_csar1_idx` (`TOSCA_CSAR_ARTIFACT_UUID`),
CONSTRAINT `fk_service__tosca_csar1` FOREIGN KEY (`TOSCA_CSAR_ARTIFACT_UUID`) REFERENCES `tosca_csar` (`ARTIFACT_UUID`) ON DELETE CASCADE ON UPDATE CASCADE