summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCoreBPMN/src/test')
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java140
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsTest.java65
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml10
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/json-examples/SDNCServiceResponseExample.json10
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/json-examples/SNIROExample.json163
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/requestArray.json6
-rw-r--r--bpmn/MSOCoreBPMN/src/test/resources/requestSchema.json225
7 files changed, 551 insertions, 68 deletions
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java
index 58f1ae264d..9643db7834 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/JsonUtilsTest.java
@@ -36,18 +36,24 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- */
+ */
package org.openecomp.mso.bpmn.core;
-import static org.assertj.core.api.AssertionsForClassTypes.assertThat;
+
+
+import static org.assertj.core.api.Assertions.assertThat;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
+
+import org.json.JSONObject;
+import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.openecomp.mso.apihandler.common.ValidationException;
import org.openecomp.mso.bpmn.core.json.JsonUtils;
import org.openecomp.mso.bpmn.core.xml.XmlTool;
import org.xmlunit.builder.DiffBuilder;
@@ -62,7 +68,7 @@ public class JsonUtilsTest {
private static final String EOL = "\n";
private static final String XML_REQ =
- "<vnf-request xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + EOL +
+ "<vnf-request xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + EOL +
" <request-info>" + EOL +
" <request-id>DEV-VF-0021</request-id>" + EOL +
" <action>CREATE_VF_MODULE</action>" + EOL +
@@ -91,9 +97,9 @@ public class JsonUtilsTest {
" <param name=\"server\">server1111</param>" + EOL +
" </vnf-params> " + EOL +
"</vnf-request>" + EOL;
-
+
private static final String XML_REQ_NO_ATTRS =
- "<vnf-request xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + EOL +
+ "<vnf-request xmlns=\"http://org.openecomp/mso/infra/vnf-request/v1\">" + EOL +
" <request-info>" + EOL +
" <action>DELETE_VF_MODULE</action>" + EOL +
" <source>PORTAL</source>" + EOL +
@@ -114,49 +120,49 @@ public class JsonUtilsTest {
"</vnf-request>" + EOL;
private static final String XML_ARRAY_REQ =
- "<ucpeInfo>" + EOL +
+ "<ucpeInfo>" + EOL +
" <outOfBandManagementModem>BROADBAND</outOfBandManagementModem>" + EOL +
- " <internetTopology>IVLAN</internetTopology>" + EOL +
- " <ucpeAliasHostName>SHELLUCPE31</ucpeAliasHostName>" + EOL +
- " <wanList>" + EOL +
- " <wanInfo>" + EOL +
- " <wanType>AVPN</wanType>" + EOL +
- " <interfaceType>1000BASE-T</interfaceType>" + EOL +
- " <transportProviderName>ATT</transportProviderName>" + EOL +
- " <circuitId>BT/SLIR/70911</circuitId>" + EOL +
- " <dualMode>Active</dualMode>" + EOL +
- " <wanPortNumber>WAN1</wanPortNumber>" + EOL +
- " <transportManagementOption>ATT</transportManagementOption>" + EOL +
- " <transportVendorTotalBandwidth>100</transportVendorTotalBandwidth>" + EOL +
- " <mediaType>ELECTRICAL</mediaType>" + EOL +
- " </wanInfo>" + EOL +
- " <wanInfo>" + EOL +
- " <wanType>AVPN</wanType>" + EOL +
- " <interfaceType>10/100/1000BASE-T</interfaceType>" + EOL +
- " <transportProviderName>ATT</transportProviderName>" + EOL +
- " <circuitId>AS/KRFN/34611</circuitId>" + EOL +
- " <dualMode>Active</dualMode>" + EOL +
- " <wanPortNumber>WAN2</wanPortNumber>" + EOL +
- " <transportManagementOption>ATT</transportManagementOption>" + EOL +
- " <transportVendorTotalBandwidth>10000</transportVendorTotalBandwidth>" + EOL +
- " <mediaType>MMF</mediaType>" + EOL +
- " </wanInfo>" + EOL +
- " </wanList>" + EOL +
- " <ucpeActivationCode>ASD-987-M31</ucpeActivationCode>" + EOL +
- " <ucpeHostName>USOSTCDALTX0101UJZZ31</ucpeHostName>" + EOL +
- " <ucpePartNumber>FG-VM00*</ucpePartNumber>" + EOL +
+ " <internetTopology>IVLAN</internetTopology>" + EOL +
+ " <ucpeAliasHostName>SHELLUCPE31</ucpeAliasHostName>" + EOL +
+ " <wanList>" + EOL +
+ " <wanInfo>" + EOL +
+ " <wanType>AVPN</wanType>" + EOL +
+ " <interfaceType>1000BASE-T</interfaceType>" + EOL +
+ " <transportProviderName>ATT</transportProviderName>" + EOL +
+ " <circuitId>BT/SLIR/70911</circuitId>" + EOL +
+ " <dualMode>Active</dualMode>" + EOL +
+ " <wanPortNumber>WAN1</wanPortNumber>" + EOL +
+ " <transportManagementOption>ATT</transportManagementOption>" + EOL +
+ " <transportVendorTotalBandwidth>100</transportVendorTotalBandwidth>" + EOL +
+ " <mediaType>ELECTRICAL</mediaType>" + EOL +
+ " </wanInfo>" + EOL +
+ " <wanInfo>" + EOL +
+ " <wanType>AVPN</wanType>" + EOL +
+ " <interfaceType>10/100/1000BASE-T</interfaceType>" + EOL +
+ " <transportProviderName>ATT</transportProviderName>" + EOL +
+ " <circuitId>AS/KRFN/34611</circuitId>" + EOL +
+ " <dualMode>Active</dualMode>" + EOL +
+ " <wanPortNumber>WAN2</wanPortNumber>" + EOL +
+ " <transportManagementOption>ATT</transportManagementOption>" + EOL +
+ " <transportVendorTotalBandwidth>10000</transportVendorTotalBandwidth>" + EOL +
+ " <mediaType>MMF</mediaType>" + EOL +
+ " </wanInfo>" + EOL +
+ " </wanList>" + EOL +
+ " <ucpeActivationCode>ASD-987-M31</ucpeActivationCode>" + EOL +
+ " <ucpeHostName>USOSTCDALTX0101UJZZ31</ucpeHostName>" + EOL +
+ " <ucpePartNumber>FG-VM00*</ucpePartNumber>" + EOL +
"</ucpeInfo>";
// JSON request w/ embedded XML will be read from a file
private static String jsonReq;
private static String jsonReqArray;
-
+
@BeforeClass
public static void initialize() throws Exception {
jsonReq = readFileToString("src/test/resources/request.json");
jsonReqArray = readFileToString("src/test/resources/requestArray.json");
- }
-
+ }
+
private static String readFileToString(String path) throws IOException {
File file = new File(path);
return new String(Files.readAllBytes(file.toPath()), StandardCharsets.UTF_8);
@@ -164,16 +170,16 @@ public class JsonUtilsTest {
@Test
public void shouldConvertXmlToJsonAndBackToSameXml() throws Exception {
- // Note: the current version of the JsonUtils.json2xml() method
- // does not support converting the JSONObject representation
- // of XML attributes (JSONArray) back to XML. So this test will
- // only succeed if the original XML does not contain attributes
-
+ // Note: the current version of the JsonUtils.json2xml() method
+ // does not support converting the JSONObject representation
+ // of XML attributes (JSONArray) back to XML. So this test will
+ // only succeed if the original XML does not contain attributes
+
// given
String xmlIn = XmlTool.removeNamespaces(XML_REQ_NO_ATTRS);
// when
String json = JsonUtils.xml2json(XML_REQ_NO_ATTRS);
- String xmlOut = JsonUtils.json2xml(json);
+ String xmlOut = JsonUtils.json2xml(json);
// then
Diff diffXml = DiffBuilder.compare(xmlIn).withTest(xmlOut).ignoreWhitespace()
.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName)).checkForSimilar().build();
@@ -233,7 +239,7 @@ public class JsonUtilsTest {
assertThat(JsonUtils.getJsonParamValue(json, "vnf-request.vnf-params.param", "name", 2))
.withFailMessage("Expected null for index out of bound").isNull();
}
-
+
@Test
public void shouldAddJsonValue() throws Exception {
// given
@@ -259,7 +265,7 @@ public class JsonUtilsTest {
// then
String extractedValue = JsonUtils.getJsonValue(jsonUpd, key);
assertThat(extractedValue).isEqualTo(oldValue).isNotEqualTo(newValue);
- }
+ }
@Test
public void shouldUpdateValueInJson() throws Exception {
@@ -286,6 +292,11 @@ public class JsonUtilsTest {
// then
String extractedValue = JsonUtils.getJsonValue(jsonUpd, key);
assertThat(extractedValue).isNotEqualTo(oldValue).isNull();
+ JSONObject jsonObj = new JSONObject(json);
+ Integer intValue = JsonUtils.getJsonIntValueForKey(jsonObj, "persona-model-version");
+ Assert.assertTrue(intValue == 1);
+ Boolean boolValue = JsonUtils.getJsonBooleanValueForKey(jsonObj, "is-base-module");
+ Assert.assertTrue(boolValue);
}
@Test
@@ -298,29 +309,48 @@ public class JsonUtilsTest {
// then
assertThat(jsonUpd).isEqualTo(json);
}
-
+
@Test
public void shouldConvertXmlToJsonAndBackToSameXmlExtractedFromTheRequest() throws Exception {
// given
- String value = JsonUtils.getJsonValue(jsonReq, "variables.bpmnRequest.value");
- String xmlReq = XmlTool.removeNamespaces(XmlTool.normalize(value));
+ String value = JsonUtils.getJsonValue(jsonReq, "variables.bpmnRequest.value");
+ String xmlReq = XmlTool.removeNamespaces(XmlTool.normalize(value));
// when
- String json = JsonUtils.xml2json(xmlReq);
- String xmlOut = JsonUtils.json2xml(json);
+ String json = JsonUtils.xml2json(xmlReq);
+ String xmlOut = JsonUtils.json2xml(json);
// then
Diff diffXml = DiffBuilder.compare(xmlReq).withTest(xmlOut).ignoreWhitespace()
.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName)).checkForSimilar().build();
assertThat(diffXml.hasDifferences()).withFailMessage(diffXml.toString()).isFalse();
- }
-
+ }
+
@Test
public void shouldConvertJsonContainingArrayToXml() throws Exception {
// when
- String jsonParm = JsonUtils.getJsonNodeValue(jsonReqArray, "requestDetails.requestParameters.ucpeInfo");
- String xmlOut = JsonUtils.json2xml(jsonParm);
+ String jsonParm = JsonUtils.getJsonNodeValue(jsonReqArray, "requestDetails.requestParameters.ucpeInfo");
+ String xmlOut = JsonUtils.json2xml(jsonParm);
// then
Diff diffXml = DiffBuilder.compare(XML_ARRAY_REQ).withTest(xmlOut).ignoreWhitespace()
.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byName)).checkForSimilar().build();
assertThat(diffXml.hasDifferences()).withFailMessage(diffXml.toString()).isFalse();
}
+
+ @Test
+ // Tests the jsonSchemaValidation() method
+ public void testJsonSchemaValidation() {
+ try {
+ String myReqArray = jsonReqArray;
+ String result = JsonUtils.jsonSchemaValidation(myReqArray, "src/test/resources/requestSchema.json");
+ System.out.println("Schema Validation Result: " + result);
+ Assert.assertTrue(result.contains("success"));
+ // remove a required parameter from the JSON doc so that validation fails
+ myReqArray = JsonUtils.delJsonValue(myReqArray, "requestDetails.requestParameters.ucpeInfo.ucpeHostName");
+ result = JsonUtils.jsonSchemaValidation(myReqArray, "src/test/resources/requestSchema.json");
+ System.out.println("Schema Validation Result: " + result);
+ Assert.assertTrue(result.contains("failure"));
+ Assert.assertTrue(result.contains("error: object has missing required properties ([\"ucpeHostName\"])"));
+ } catch (ValidationException e) {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsTest.java
new file mode 100644
index 0000000000..7bb10007ac
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/json/JsonUtilsTest.java
@@ -0,0 +1,65 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.mso.bpmn.core.json;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.Map;
+
+import org.camunda.bpm.engine.delegate.DelegateExecution;
+import org.json.JSONArray;
+import org.json.JSONObject;
+import org.junit.Test;
+import org.mockito.Mock;
+
+public class JsonUtilsTest {
+
+ @Mock public DelegateExecution execution;
+ private final String fileLocation = "src/test/resources/json-examples/";
+
+ @Test
+ public void jsonStringToMapTest() throws IOException {
+
+ JsonUtils utils = new JsonUtils();
+ String response = this.getJson("SDNCServiceResponseExample.json");
+ String entry = utils.getJsonValue(response, "SDNCServiceResponse.params");
+ Map<String, String> map = utils.jsonStringToMap(execution, entry);
+ assertEquals(map.get("e2e-vpn-key"), "my-key");
+ }
+
+ @Test
+ public void entryArrayToMapTest() throws IOException {
+ JsonUtils utils = new JsonUtils();
+ String response = this.getJson("SNIROExample.json");
+ String entry = utils.getJsonValue(response, "solutionInfo.placementInfo");
+ JSONArray arr = new JSONArray(entry);
+ JSONObject homingDataJson = arr.getJSONObject(0);
+ JSONArray assignmentInfo = homingDataJson.getJSONArray("assignmentInfo");
+ Map<String, String> map = utils.entryArrayToMap(execution, assignmentInfo.toString(), "variableName", "variableValue");
+ assertEquals(map.get("cloudOwner"), "att-aic");
+ }
+ private String getJson(String filename) throws IOException {
+ return new String(Files.readAllBytes(Paths.get(fileLocation + filename)));
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml b/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml
index 3fa222988c..bc218f0125 100644
--- a/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml
+++ b/bpmn/MSOCoreBPMN/src/test/resources/camunda.cfg.xml
@@ -19,14 +19,6 @@
<property name="history" value="full" />
- <property name="customPostBPMNParseListeners">
- <list>
- <bean class="org.camunda.bpm.engine.impl.bpmn.parser.FoxFailedJobParseListener" />
- </list>
- </property>
-
- <property name="failedJobCommandFactory" ref="foxFailedJobCommandFactory" />
-
<!--<property name="idGenerator" ref="uuidGenerator" />-->
<!-- engine plugins -->
@@ -46,8 +38,6 @@
<!-- Needed until all subflows generate MSOWorkflowException events -->
<bean id="workflowExceptionPlugin" class="org.openecomp.mso.bpmn.core.plugins.WorkflowExceptionPlugin" />
- <bean id="foxFailedJobCommandFactory" class="org.camunda.bpm.engine.impl.jobexecutor.FoxFailedJobCommandFactory" />
-
<!--<bean id="uuidGenerator" class="org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator" />-->
<!-- engine plugin beans -->
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/json-examples/SDNCServiceResponseExample.json b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/SDNCServiceResponseExample.json
new file mode 100644
index 0000000000..aefdfa8685
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/SDNCServiceResponseExample.json
@@ -0,0 +1,10 @@
+{
+ "SDNCServiceResponse": {
+ "responseCode": "200",
+ "ackFinalIndicator": "Y",
+ "params": {
+ "e2e-vpn-key": "my-key"
+ },
+ "sdncRequestId": "my-id"
+ }
+}
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/json-examples/SNIROExample.json b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/SNIROExample.json
new file mode 100644
index 0000000000..838bcd85a7
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/json-examples/SNIROExample.json
@@ -0,0 +1,163 @@
+{
+ "solutionInfo": {
+ "licenseInfo": [
+ {
+ "resourceModuleName": "vHNF for DHV Test_1 0",
+ "serviceResourceId": "eb05bdec-e815-40cd-99dd-7175f462d2ba",
+ "licenseKeyGroupList": [],
+ "entitlementPoolList": [
+ "92718B2A0F91410B912F2A2C87AAA307",
+ "1EEF79979AD14EE498D31A7EF9DC9004"
+ ]
+ }
+ ],
+ "placementInfo": [
+ {
+ "assignmentInfo": [
+ {
+ "variableValue": "FRNKGE1A10",
+ "variableName": "aicClli"
+ },
+ {
+ "variableValue": "3.0",
+ "variableName": "aicVersion"
+ },
+ {
+ "variableValue": "att-aic",
+ "variableName": "cloudOwner"
+ }
+ ],
+ "inventoryType": "cloud",
+ "resourceModuleName": "Primary IP_Mux_Demux updated_1 0",
+ "serviceResourceId": "7d3d786b-ce6d-4498-813e-3e3028aebea8",
+ "cloudRegionId": "fnkge1a",
+ "serviceInstanceId": ""
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableValue": "MDTWNJ2B12",
+ "variableName": "aicClli"
+ },
+ {
+ "variableValue": "vig20004vm002vig001",
+ "variableName": "vnfHostName"
+ },
+ {
+ "variableValue": "3.0",
+ "variableName": "aicVersion"
+ },
+ {
+ "variableValue": "att-aic",
+ "variableName": "cloudOwner"
+ },
+ {
+ "variableValue": "vig20004vm002vig001",
+ "variableName": "vnfHostName"
+ }
+ ],
+ "inventoryType": "service",
+ "resourceModuleName": "Primary Tunnel_XConn for DHV Testing_1 0",
+ "serviceResourceId": "98fe07e7-4d9c-4f93-8138-18563c05a047",
+ "cloudRegionId": "mtrnj1b",
+ "serviceInstanceId": "519630c1-9b5c-45fb-8b84-3500ead7d77e"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableValue": "FRNKGE1A10",
+ "variableName": "aicClli"
+ },
+ {
+ "variableValue": "3.0",
+ "variableName": "aicVersion"
+ },
+ {
+ "variableValue": "att-aic",
+ "variableName": "cloudOwner"
+ }
+ ],
+ "inventoryType": "cloud",
+ "resourceModuleName": "Secondary Service_Admin for DHV Test_1 1",
+ "serviceResourceId": "9a1abd7e-5afc-4e85-8f27-251454452350",
+ "cloudRegionId": "fnkge1a",
+ "serviceInstanceId": ""
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableValue": "FRNKGE1B10",
+ "variableName": "aicClli"
+ },
+ {
+ "variableValue": "3.0",
+ "variableName": "aicVersion"
+ },
+ {
+ "variableValue": "att-aic",
+ "variableName": "cloudOwner"
+ }
+ ],
+ "inventoryType": "cloud",
+ "resourceModuleName": "Primary Service_Admin for DHV Test_1 0",
+ "serviceResourceId": "11f557a2-72e3-4977-b2a3-5bf5d73e581c",
+ "cloudRegionId": "frkge1b",
+ "serviceInstanceId": ""
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableValue": "MDTWNJ2A22",
+ "variableName": "aicClli"
+ },
+ {
+ "variableValue": "vig20004vm001vig001",
+ "variableName": "vnfHostName"
+ },
+ {
+ "variableValue": "1.0",
+ "variableName": "aicVersion"
+ },
+ {
+ "variableValue": "att-aic",
+ "variableName": "cloudOwner"
+ },
+ {
+ "variableValue": "vig20004vm001vig001",
+ "variableName": "vnfHostName"
+ }
+ ],
+ "inventoryType": "service",
+ "resourceModuleName": "Secondary Tunnel_XConn for DHV Testing_1 1",
+ "serviceResourceId": "73f1b218-a062-43de-82ae-98682ca78392",
+ "cloudRegionId": "mtrn2",
+ "serviceInstanceId": "7b594c13-6b72-41bd-893a-2656f5dbb87a"
+ },
+ {
+ "assignmentInfo": [
+ {
+ "variableValue": "FRNKGE1B10",
+ "variableName": "aicClli"
+ },
+ {
+ "variableValue": "3.0",
+ "variableName": "aicVersion"
+ },
+ {
+ "variableValue": "att-aic",
+ "variableName": "cloudOwner"
+ }
+ ],
+ "inventoryType": "cloud",
+ "resourceModuleName": "Secondary IP_Mux_Demux updated_1 1",
+ "serviceResourceId": "20901d7f-4864-454b-99f1-5239fc353cfc",
+ "cloudRegionId": "frkge1b",
+ "serviceInstanceId": ""
+ }
+ ]
+ },
+ "requestId": "90462920-208a-4e5e-bdf3-fcbe0454dde6",
+ "statusMessage": "",
+ "requestState": "done",
+ "transactionId": ""
+} \ No newline at end of file
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/requestArray.json b/bpmn/MSOCoreBPMN/src/test/resources/requestArray.json
index 238128865b..97a6359345 100644
--- a/bpmn/MSOCoreBPMN/src/test/resources/requestArray.json
+++ b/bpmn/MSOCoreBPMN/src/test/resources/requestArray.json
@@ -7,10 +7,10 @@
},
"modelInfo": {
"modelType": "service",
- "modelId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
- "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+ "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+ "modelVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
"modelName": "UCPE",
- "modelVersion": 1
+ "modelVersion": "1"
},
"subscriberInfo": {
"globalSubscriberId": "83031",
diff --git a/bpmn/MSOCoreBPMN/src/test/resources/requestSchema.json b/bpmn/MSOCoreBPMN/src/test/resources/requestSchema.json
new file mode 100644
index 0000000000..113528784b
--- /dev/null
+++ b/bpmn/MSOCoreBPMN/src/test/resources/requestSchema.json
@@ -0,0 +1,225 @@
+{
+ "$schema":"http://json-schema.org/draft-03/schema#",
+ "type":"object",
+ "properties":{
+ "requestDetails":{
+ "properties":{
+ "modelInfo":{
+ "type":"object",
+ "required":true,
+ "properties":{
+ "modelCustomizationId":{
+ "type":"string",
+ "pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
+ "required":false
+ },
+ "modelCustomizationName":{
+ "type":"string",
+ "required":false
+ },
+ "modelInvariantId":{
+ "type":"string",
+ "pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
+ "required":true
+ },
+ "modelVersionId":{
+ "type":"string",
+ "pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$",
+ "required":true
+ },
+ "modelName":{
+ "type":"string",
+ "required":true
+ },
+ "modelType":{
+ "type":"string",
+ "enum":[
+ "service"
+ ],
+ "required":true
+ },
+ "modelVersion":{
+ "type":"string",
+ "required":true
+ }
+ }
+ },
+ "requestInfo":{
+ "type":"object",
+ "required":true,
+ "properties":{
+ "billingAccountNumber":{
+ "type":"string",
+ "required":false
+ },
+ "callbackUrl":{
+ "type":"string",
+ "required":true
+ },
+ "correlator":{
+ "type":"string",
+ "required":false
+ },
+ "instanceName":{
+ "type":"string",
+ "required":true
+ },
+ "orderNumber":{
+ "type":"string",
+ "required":false
+ },
+ "orderVersion":{
+ "type":"number",
+ "required":false
+ },
+ "productFamilyId":{
+ "type":"string",
+ "required":false
+ },
+ "source":{
+ "type":"string",
+ "required":true
+ },
+ "suppressRollback":{
+ "type":"boolean",
+ "required":false
+ }
+ }
+ },
+ "subscriberInfo":{
+ "type":"object",
+ "required":true,
+ "properties":{
+ "globalSubscriberId":{
+ "type":"string",
+ "required":true
+ },
+ "subscriberCommonSiteId":{
+ "type":"string",
+ "required":false
+ },
+ "subscriberName":{
+ "type":"string",
+ "required":true
+ }
+ }
+ },
+ "requestParameters":{
+ "type":"object",
+ "required":true,
+ "properties":{
+ "ucpeInfo":{
+ "type":"object",
+ "required":true,
+ "properties":{
+ "internetTopology":{
+ "type":"string",
+ "enum":[
+ "IVLAN",
+ "LAN",
+ "WAN"
+ ],
+ "required":true
+ },
+ "outOfBandManagementModem":{
+ "type":"string",
+ "required":false
+ },
+ "ucpeActivationCode":{
+ "type":"string",
+ "required":true
+ },
+ "ucpeAliasHostName":{
+ "type":"string",
+ "required":false
+ },
+ "ucpeHostName":{
+ "type":"string",
+ "required":true
+ },
+ "ucpePartNumber":{
+ "type":"string",
+ "required":true
+ },
+ "wanList":{
+ "type":"array",
+ "required":true,
+ "items":{
+ "type":"object",
+ "required":true,
+ "properties":{
+ "wanInfo":{
+ "type":"object",
+ "required":true,
+ "properties":{
+ "circuitId":{
+ "type":"string",
+ "required":false
+ },
+ "dualMode":{
+ "type":"string",
+ "enum":[
+ "Active",
+ "Standby"
+ ],
+ "required":false
+ },
+ "interfaceType":{
+ "type":"string",
+ "required":false
+ },
+ "mediaType":{
+ "type":"string",
+ "enum":[
+ "ELECTRICAL",
+ "MMF",
+ "SMF"
+ ],
+ "required":false
+ },
+ "transportManagementOption":{
+ "type":"string",
+ "required":false
+ },
+ "transportProviderName":{
+ "type":"string",
+ "required":false
+ },
+ "transportVendorTotalBandwidth":{
+ "type":"string",
+ "required":false
+ },
+ "wanPortNumber":{
+ "type":"string",
+ "enum":[
+ "WAN1",
+ "WAN2"
+ ],
+ "required":true
+ },
+ "wanType":{
+ "type":"string",
+ "enum":[
+ "3RDPARTYINTERNET",
+ "AVPN",
+ "AVPNIVLAN",
+ "GMIS",
+ "HSIA-E",
+ "MIS",
+ "PREMISESROUTER"
+ ],
+ "required":true
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file