aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/onap/clamp/clds/client/CdsServicesTest.java58
-rw-r--r--src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTestItCase.java85
-rw-r--r--src/test/java/org/onap/clamp/loop/PolicyComponentTest.java17
-rw-r--r--src/test/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilderTest.java13
-rw-r--r--src/test/resources/example/cds-response/vFW-CDS-modify-config-wf-expected-result.json58
-rw-r--r--src/test/resources/example/cds-response/vFW-CDS-modify-config-workflow.json75
-rw-r--r--src/test/resources/example/cds-response/vFW-CDS-resource-assignment-wf-expected-result.json42
-rw-r--r--src/test/resources/example/cds-response/vFW-CDS-resource-assignment-workflow.json78
-rw-r--r--src/test/resources/example/json-editor-schema/tca-policy-json-editor-schema.json2
-rw-r--r--src/test/resources/tosca/model-properties-cds.json151
-rw-r--r--src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json144
-rw-r--r--src/test/resources/tosca/operational-policy-cds-payload-with-list.json742
-rw-r--r--src/test/resources/tosca/operational-policy-json-schema.json144
-rw-r--r--src/test/resources/tosca/pdp-group-policy-payload.json8
-rw-r--r--src/test/resources/tosca/policy-yaml-to-json-with-constraints.json2
-rw-r--r--src/test/resources/tosca/policy-yaml-to-json-with-datatypes.json2
-rw-r--r--src/test/resources/tosca/policy-yaml-to-json.json2
-rw-r--r--src/test/resources/tosca/tosca_metadata_clamp_possible_values_json_schema.json16
-rw-r--r--src/test/resources/tosca/tosca_with_date_time_json_schema.json240
19 files changed, 1641 insertions, 238 deletions
diff --git a/src/test/java/org/onap/clamp/clds/client/CdsServicesTest.java b/src/test/java/org/onap/clamp/clds/client/CdsServicesTest.java
new file mode 100644
index 000000000..ec39fc3db
--- /dev/null
+++ b/src/test/java/org/onap/clamp/clds/client/CdsServicesTest.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CLAMP
+ * ================================================================================
+ * Copyright (C) 2020 Huawei Technologies Co., Ltd.
+ * ================================================================================
+ * 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.onap.clamp.clds.client;
+
+import com.google.gson.JsonObject;
+
+import java.io.IOException;
+
+import org.junit.Test;
+import org.onap.clamp.clds.util.JsonUtils;
+import org.onap.clamp.clds.util.ResourceFileUtil;
+import org.skyscreamer.jsonassert.JSONAssert;
+
+public class CdsServicesTest {
+
+ @Test
+ public void testParseCdsListTypeProperties() throws IOException {
+ String cdsResponse = ResourceFileUtil
+ .getResourceAsString("example/cds-response/vFW-CDS-resource-assignment-workflow.json");
+ CdsServices services = new CdsServices();
+ JsonObject output = services.parseCdsResponse(cdsResponse);
+ JSONAssert.assertEquals(ResourceFileUtil
+ .getResourceAsString("example/cds-response/vFW-CDS-resource-assignment-wf-expected-result.json"),
+ JsonUtils.GSON.toJson(output), true);
+ }
+
+ @Test
+ public void testParseCdsResponse() throws IOException {
+ String cdsResponse = ResourceFileUtil
+ .getResourceAsString("example/cds-response/vFW-CDS-modify-config-workflow.json");
+ CdsServices services = new CdsServices();
+ JsonObject output = services.parseCdsResponse(cdsResponse);
+ JSONAssert.assertEquals(ResourceFileUtil
+ .getResourceAsString("example/cds-response/vFW-CDS-modify-config-wf-expected-result.json"),
+ JsonUtils.GSON.toJson(output), true);
+ }
+
+} \ No newline at end of file
diff --git a/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTestItCase.java b/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTestItCase.java
index a32d4995e..b26f3ede8 100644
--- a/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTestItCase.java
+++ b/src/test/java/org/onap/clamp/clds/tosca/ToscaYamlToJsonConvertorTestItCase.java
@@ -57,7 +57,7 @@ public class ToscaYamlToJsonConvertorTestItCase {
* Schema.
*
* @throws IOException In case of issue when opening the tosca yaml file and
- * converted json file
+ * converted json file
*/
@Test
public final void testParseToscaYaml() throws IOException {
@@ -65,11 +65,11 @@ public class ToscaYamlToJsonConvertorTestItCase {
ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor();
String parsedJsonSchema =
- convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.cdap.tca.hi.lo.app");
+ convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.cdap.tca.hi.lo.app");
assertNotNull(parsedJsonSchema);
JSONAssert.assertEquals(
- ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json.json"),
- parsedJsonSchema, true);
+ ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json.json"),
+ parsedJsonSchema, true);
}
/**
@@ -77,20 +77,20 @@ public class ToscaYamlToJsonConvertorTestItCase {
* based on JSON Editor Schema.
*
* @throws IOException In case of issue when opening the tosca yaml file and
- * converted json file
+ * converted json file
*/
@Test
public final void testParseToscaYamlWithConstraints() throws IOException {
String toscaModelYaml =
- ResourceFileUtil.getResourceAsString("tosca/tosca-with-constraints.yaml");
+ ResourceFileUtil.getResourceAsString("tosca/tosca-with-constraints.yaml");
ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor();
String parsedJsonSchema =
- convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
+ convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
assertNotNull(parsedJsonSchema);
JSONAssert.assertEquals(
- ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-constraints.json"),
- parsedJsonSchema, true);
+ ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-constraints.json"),
+ parsedJsonSchema, true);
}
/**
@@ -98,20 +98,20 @@ public class ToscaYamlToJsonConvertorTestItCase {
* conversion based on JSON Editor Schema.
*
* @throws IOException In case of issue when opening the tosca yaml file and
- * converted json file
+ * converted json file
*/
@Test
public final void testParseToscaYamlWithTypes() throws IOException {
String toscaModelYaml =
- ResourceFileUtil.getResourceAsString("tosca/tosca-with-datatypes.yaml");
+ ResourceFileUtil.getResourceAsString("tosca/tosca-with-datatypes.yaml");
ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor();
String parsedJsonSchema =
- convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
+ convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
assertNotNull(parsedJsonSchema);
JSONAssert.assertEquals(
- ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-datatypes.json"),
- parsedJsonSchema, true);
+ ResourceFileUtil.getResourceAsString("tosca/policy-yaml-to-json-with-datatypes.json"),
+ parsedJsonSchema, true);
}
/**
@@ -119,11 +119,35 @@ public class ToscaYamlToJsonConvertorTestItCase {
* parameters which defines the Tosca Policy name and its short name.
*
* @throws IOException In case of issue when opening the tosca yaml file and
- * converted json file
+ * converted json file
*/
@Test
@Transactional
public final void testMetadataClampPossibleValues() throws IOException {
+ setupDictionary();
+ String toscaModelYaml =
+ ResourceFileUtil.getResourceAsString("tosca/tosca_metadata_clamp_possible_values.yaml");
+
+ JsonObject jsonObject = toscaYamlToJsonConvertor.validateAndConvertToJson(toscaModelYaml);
+ assertNotNull(jsonObject);
+ String policyModelType = toscaYamlToJsonConvertor.getValueFromMetadata(jsonObject,
+ ToscaSchemaConstants.METADATA_POLICY_MODEL_TYPE);
+ String acronym = toscaYamlToJsonConvertor.getValueFromMetadata(jsonObject,
+ ToscaSchemaConstants.METADATA_ACRONYM);
+ String parsedJsonSchema =
+ toscaYamlToJsonConvertor.parseToscaYaml(toscaModelYaml, policyModelType);
+
+ assertNotNull(parsedJsonSchema);
+ assertEquals("onap.policies.monitoring.cdap.tca.hi.lo.app", policyModelType);
+ assertEquals("tca", acronym);
+ JSONAssert.assertEquals(
+ ResourceFileUtil
+ .getResourceAsString("tosca/tosca_metadata_clamp_possible_values_json_schema.json"),
+ parsedJsonSchema, true);
+
+ }
+
+ private void setupDictionary() {
// Set up dictionary elements
Dictionary dictionaryTest = new Dictionary();
@@ -150,6 +174,15 @@ public class ToscaYamlToJsonConvertorTestItCase {
element1.setDescription("Alarm Condition");
dictionaryTest1.addDictionaryElements(element1);
+ dictionaryTest1 = dictionaryService.saveOrUpdateDictionary(dictionaryTest1);
+
+ DictionaryElement element3 = new DictionaryElement();
+ element3.setName("timeEpoch");
+ element3.setShortName("timeEpoch");
+ element3.setType("datetime");
+ element3.setDescription("Time Epoch");
+ dictionaryTest1.addDictionaryElements(element3);
+
dictionaryService.saveOrUpdateDictionary(dictionaryTest1);
Dictionary dictionaryTest2 = new Dictionary();
@@ -159,30 +192,10 @@ public class ToscaYamlToJsonConvertorTestItCase {
DictionaryElement element2 = new DictionaryElement();
element2.setName("equals");
element2.setShortName("equals");
- element2.setType("string");
+ element2.setType("string|datetime");
element2.setDescription("equals");
dictionaryTest2.addDictionaryElements(element2);
dictionaryService.saveOrUpdateDictionary(dictionaryTest2);
-
- String toscaModelYaml =
- ResourceFileUtil.getResourceAsString("tosca/tosca_metadata_clamp_possible_values.yaml");
-
- JsonObject jsonObject = toscaYamlToJsonConvertor.validateAndConvertToJson(toscaModelYaml);
- assertNotNull(jsonObject);
- String policyModelType = toscaYamlToJsonConvertor.getValueFromMetadata(jsonObject,
- ToscaSchemaConstants.METADATA_POLICY_MODEL_TYPE);
- String acronym = toscaYamlToJsonConvertor.getValueFromMetadata(jsonObject,
- ToscaSchemaConstants.METADATA_ACRONYM);
- String parsedJsonSchema =
- toscaYamlToJsonConvertor.parseToscaYaml(toscaModelYaml, policyModelType);
-
- assertNotNull(parsedJsonSchema);
- assertEquals("onap.policies.monitoring.cdap.tca.hi.lo.app", policyModelType);
- assertEquals("tca", acronym);
- JSONAssert.assertEquals(
- ResourceFileUtil
- .getResourceAsString("tosca/tosca_metadata_clamp_possible_values_json_schema.json"),
- parsedJsonSchema, true);
}
}
diff --git a/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java b/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java
index 432de6065..6449a8966 100644
--- a/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java
+++ b/src/test/java/org/onap/clamp/loop/PolicyComponentTest.java
@@ -24,7 +24,6 @@
package org.onap.clamp.loop;
import static org.assertj.core.api.Assertions.assertThat;
-
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.io.IOException;
@@ -32,6 +31,7 @@ import org.apache.camel.Exchange;
import org.apache.camel.Message;
import org.junit.Test;
import org.mockito.Mockito;
+import org.onap.clamp.clds.config.LegacyOperationalPolicyController;
import org.onap.clamp.clds.util.ResourceFileUtil;
import org.onap.clamp.loop.components.external.ExternalComponentState;
import org.onap.clamp.loop.components.external.PolicyComponent;
@@ -267,7 +267,8 @@ public class PolicyComponentTest {
new Gson().fromJson("{\"configtype\":\"json\"}", JsonObject.class), null, "pdpGroup2", "pdpSubgroup1");
loopTest.addMicroServicePolicy(microServicePolicy2);
- PolicyModel policyModel2 = new PolicyModel("onap.policies.controlloop.Operational", null, "1.0.0");
+ PolicyModel policyModel2 = new PolicyModel(LegacyOperationalPolicyController.OPERATIONAL_POLICY_LEGACY, null,
+ "1.0.0");
OperationalPolicy opPolicy =
new OperationalPolicy("opPolicy", new Gson().fromJson("{\"configtype\":\"json\"}", JsonObject.class),
new Gson().fromJson("{\"jsonschema\":\"schema\"}", JsonObject.class), policyModel2, null,
@@ -275,16 +276,22 @@ public class PolicyComponentTest {
"pdpSubgroup2");
loopTest.addOperationalPolicy(opPolicy);
+ OperationalPolicy opLegacyPolicy =
+ new OperationalPolicy("opLegacyPolicy", new Gson().fromJson(
+ "{\"guard_policies\":[{\"policy-id\":\"guard1\"}]}", JsonObject.class),
+ new Gson().fromJson("{\"jsonschema\":\"schema\"}", JsonObject.class), policyModel2, null,
+ "pdpGroup2",
+ "pdpSubgroup2");
+
+ loopTest.addOperationalPolicy(opLegacyPolicy);
LoopTemplate loopTemplate = new LoopTemplate("test", "yaml", "svg", 1, null);
loopTemplate.setDcaeBlueprintId("UUID-blueprint");
loopTest.setLoopTemplate(loopTemplate);
- String payload = PolicyComponent.createPoliciesPayloadPdpGroup(loopTest);
+ String payload = PolicyComponent.createPoliciesPayloadPdpGroup(loopTest, "POST");
String expectedRes = ResourceFileUtil.getResourceAsString("tosca/pdp-group-policy-payload.json");
assertThat(payload).isEqualTo(expectedRes);
-
- assertThat(PolicyComponent.listPolicyNamesPdpGroup(loopTest)).containsExactlyInAnyOrder("opPolicy","configPolicyTest","configPolicyTest2");
}
}
diff --git a/src/test/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilderTest.java b/src/test/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilderTest.java
index 4e9b56206..a6a496821 100644
--- a/src/test/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilderTest.java
+++ b/src/test/java/org/onap/clamp/policy/operational/OperationalPolicyRepresentationBuilderTest.java
@@ -50,4 +50,17 @@ public class OperationalPolicyRepresentationBuilderTest {
new GsonBuilder().create().toJson(jsonSchema), false);
}
+ @Test
+ public void testOperationalPolicyPayloadConstructionForCds() throws IOException {
+ JsonObject jsonModel = new GsonBuilder().create()
+ .fromJson(ResourceFileUtil.getResourceAsString("tosca/model-properties-cds.json"), JsonObject.class);
+ Service service = new Service(jsonModel.get("serviceDetails").getAsJsonObject(),
+ jsonModel.get("resourceDetails").getAsJsonObject(),
+ "1.0");
+
+ JsonObject jsonSchema = OperationalPolicyRepresentationBuilder.generateOperationalPolicySchema(service);
+ assertThat(jsonSchema).isNotNull();
+ JSONAssert.assertEquals(ResourceFileUtil.getResourceAsString("tosca/operational-policy-cds-payload-with-list.json"),
+ new GsonBuilder().create().toJson(jsonSchema), false);
+ }
}
diff --git a/src/test/resources/example/cds-response/vFW-CDS-modify-config-wf-expected-result.json b/src/test/resources/example/cds-response/vFW-CDS-modify-config-wf-expected-result.json
new file mode 100644
index 000000000..7e78bb062
--- /dev/null
+++ b/src/test/resources/example/cds-response/vFW-CDS-modify-config-wf-expected-result.json
@@ -0,0 +1,58 @@
+{
+ "inputs": {
+ "resolution-key": {
+ "required": true,
+ "type": "string"
+ },
+ "modify-config-properties": {
+ "vpg_onap_private_ip_0": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "service-instance.service-instance-id": {
+ "type": "string"
+ },
+ "vnf-id": {
+ "type": "string"
+ },
+ "data": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": "dt-data"
+ }
+ },
+ "service-instance-id": {
+ "type": "string"
+ },
+ "update-active-streams": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": "dt-data"
+ }
+ },
+ "generic-vnf.vnf-id": {
+ "type": "string"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/example/cds-response/vFW-CDS-modify-config-workflow.json b/src/test/resources/example/cds-response/vFW-CDS-modify-config-workflow.json
new file mode 100644
index 000000000..e46da6760
--- /dev/null
+++ b/src/test/resources/example/cds-response/vFW-CDS-modify-config-workflow.json
@@ -0,0 +1,75 @@
+{
+ "blueprintName": "vFW-CDS",
+ "version": "1.0.0",
+ "workFlowData": {
+ "workFlowName": "modify-config",
+ "inputs": {
+ "resolution-key": {
+ "required": true,
+ "type": "string"
+ },
+ "modify-config-properties": {
+ "description": "Dynamic PropertyDefinition for workflow(modify-config).",
+ "required": true,
+ "type": "dt-modify-config-properties"
+ }
+ }
+ },
+ "dataTypes": {
+ "dt-modify-config-properties": {
+ "description": "Dynamic DataType definition for workflow(modify-config).",
+ "version": "1.0.0",
+ "properties": {
+ "vpg_onap_private_ip_0": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ },
+ "service-instance.service-instance-id": {
+ "type": "string"
+ },
+ "vnf-id": {
+ "type": "string"
+ },
+ "data": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": "dt-data"
+ }
+ },
+ "service-instance-id": {
+ "type": "string"
+ },
+ "update-active-streams": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": "dt-data"
+ }
+ },
+ "generic-vnf.vnf-id": {
+ "type": "string"
+ }
+ },
+ "derived_from": "tosca.datatypes.Dynamic"
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/example/cds-response/vFW-CDS-resource-assignment-wf-expected-result.json b/src/test/resources/example/cds-response/vFW-CDS-resource-assignment-wf-expected-result.json
new file mode 100644
index 000000000..5b373a45e
--- /dev/null
+++ b/src/test/resources/example/cds-response/vFW-CDS-resource-assignment-wf-expected-result.json
@@ -0,0 +1,42 @@
+{
+ "inputs": {
+ "template-prefix": {
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "template-prefix-with-complex-type": {
+ "type": "list",
+ "properties": {
+ "prefix-id": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ }
+ }
+ },
+ "resource-assignment-properties": {
+ "private1-prefix-id": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/example/cds-response/vFW-CDS-resource-assignment-workflow.json b/src/test/resources/example/cds-response/vFW-CDS-resource-assignment-workflow.json
new file mode 100644
index 000000000..d0f78cf1d
--- /dev/null
+++ b/src/test/resources/example/cds-response/vFW-CDS-resource-assignment-workflow.json
@@ -0,0 +1,78 @@
+{
+ "blueprintName": "vFW-CDS",
+ "version": "1.0.0",
+ "workFlowData": {
+ "workFlowName": "resource-assignment",
+ "inputs": {
+ "template-prefix": {
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "template-prefix-with-complex-type": {
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "dt-template-prefix-properties"
+ }
+ },
+ "resource-assignment-properties": {
+ "description": "Dynamic PropertyDefinition for workflow(resource-assignment).",
+ "required": true,
+ "type": "dt-resource-assignment-properties"
+ }
+ },
+ "outputs": {
+ "meshed-template": {
+ "type": "json",
+ "value": {
+ "get_attribute": [
+ "resource-assignment",
+ "assignment-params"
+ ]
+ }
+ }
+ }
+ },
+ "dataTypes": {
+ "dt-resource-assignment-properties": {
+ "description": "Dynamic DataType definition for workflow(resource-assignment).",
+ "version": "1.0.0",
+ "properties": {
+ "private1-prefix-id": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ }
+ },
+ "derived_from": "tosca.datatypes.Dynamic"
+ },
+ "dt-template-prefix-properties": {
+ "description": "Dynamic DataType definition for workflow(template-prefix).",
+ "version": "1.0.0",
+ "properties": {
+ "prefix-id": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/example/json-editor-schema/tca-policy-json-editor-schema.json b/src/test/resources/example/json-editor-schema/tca-policy-json-editor-schema.json
index 11b91dfb4..91603972d 100644
--- a/src/test/resources/example/json-editor-schema/tca-policy-json-editor-schema.json
+++ b/src/test/resources/example/json-editor-schema/tca-policy-json-editor-schema.json
@@ -1,7 +1,7 @@
{
"schema": {
"uniqueItems": "true",
- "format": "tabs-top",
+ "format": "tabs",
"type": "array",
"title": "Thresholds",
"items": {
diff --git a/src/test/resources/tosca/model-properties-cds.json b/src/test/resources/tosca/model-properties-cds.json
new file mode 100644
index 000000000..591840b49
--- /dev/null
+++ b/src/test/resources/tosca/model-properties-cds.json
@@ -0,0 +1,151 @@
+{
+ "serviceDetails": {
+ "serviceType": "",
+ "namingPolicy": "",
+ "environmentContext": "General_Revenue-Bearing",
+ "serviceEcompNaming": "true",
+ "serviceRole": "",
+ "name": "vLoadBalancerMS",
+ "description": "vLBMS",
+ "invariantUUID": "30ec5b59-4799-48d8-ac5f-1058a6b0e48f",
+ "ecompGeneratedNaming": "true",
+ "category": "Network L4+",
+ "type": "Service",
+ "UUID": "63cac700-ab9a-4115-a74f-7eac85e3fce0",
+ "instantiationType": "A-la-carte"
+ },
+ "resourceDetails": {
+ "CP": {},
+ "VL": {},
+ "VF": {
+ "vLoadBalancerMS 0": {
+ "resourceVendor": "Test",
+ "resourceVendorModelNumber": "",
+ "name": "vLoadBalancerMS",
+ "description": "vLBMS",
+ "invariantUUID": "1a31b9f2-e50d-43b7-89b3-a040250cf506",
+ "subcategory": "Load Balancer",
+ "category": "Application L4+",
+ "type": "VF",
+ "UUID": "b4c4f3d7-929e-4b6d-a1cd-57e952ddc3e6",
+ "version": "1.0",
+ "resourceVendorRelease": "1.0",
+ "customizationUUID": "465246dc-7748-45f4-a013-308d92922552",
+ "controllerProperties": {
+ "sdnc_model_name": "baseconfiguration",
+ "sdnc_model_version": "1.0.0",
+ "workflows": {
+ "resource-assignment": {
+ "inputs": {
+ "template-prefix": {
+ "required": true,
+ "type": "list",
+ "entry_schema": {
+ "type": "string"
+ }
+ },
+ "template-prefix-with-complex-type": {
+ "type": "list",
+ "properties": {
+ "prefix-id": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ }
+ }
+ },
+ "resource-assignment-properties": {
+ "private1-prefix-id": {
+ "description": "",
+ "required": false,
+ "type": "string",
+ "status": "",
+ "constraints": [
+ {}
+ ],
+ "entry_schema": {
+ "type": ""
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "CR": {},
+ "VFC": {},
+ "PNF": {},
+ "Service": {},
+ "CVFC": {},
+ "Service Proxy": {},
+ "Configuration": {},
+ "AllottedResource": {},
+ "VFModule": {
+ "Vloadbalancerms..vpkg..module-1": {
+ "vfModuleModelInvariantUUID": "ca052563-eb92-4b5b-ad41-9111768ce043",
+ "vfModuleModelVersion": "1",
+ "vfModuleModelName": "Vloadbalancerms..vpkg..module-1",
+ "vfModuleModelUUID": "1e725ccc-b823-4f67-82b9-4f4367070dbc",
+ "vfModuleModelCustomizationUUID": "1bffdc31-a37d-4dee-b65c-dde623a76e52",
+ "min_vf_module_instances": 0,
+ "vf_module_label": "vpkg",
+ "max_vf_module_instances": 1,
+ "vf_module_type": "Expansion",
+ "isBase": false,
+ "initial_count": 0,
+ "volume_group": false
+ },
+ "Vloadbalancerms..vdns..module-3": {
+ "vfModuleModelInvariantUUID": "4c10ba9b-f88f-415e-9de3-5d33336047fa",
+ "vfModuleModelVersion": "1",
+ "vfModuleModelName": "Vloadbalancerms..vdns..module-3",
+ "vfModuleModelUUID": "4fa73b49-8a6c-493e-816b-eb401567b720",
+ "vfModuleModelCustomizationUUID": "bafcdab0-801d-4d81-9ead-f464640a38b1",
+ "min_vf_module_instances": 0,
+ "vf_module_label": "vdns",
+ "max_vf_module_instances": 50,
+ "vf_module_type": "Expansion",
+ "isBase": false,
+ "initial_count": 0,
+ "volume_group": false
+ },
+ "Vloadbalancerms..base_template..module-0": {
+ "vfModuleModelInvariantUUID": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3",
+ "vfModuleModelVersion": "1",
+ "vfModuleModelName": "Vloadbalancerms..base_template..module-0",
+ "vfModuleModelUUID": "63734409-f745-4e4d-a38b-131638a0edce",
+ "vfModuleModelCustomizationUUID": "86baddea-c730-4fb8-9410-cd2e17fd7f27",
+ "min_vf_module_instances": 1,
+ "vf_module_label": "base_template",
+ "max_vf_module_instances": 1,
+ "vf_module_type": "Base",
+ "isBase": true,
+ "initial_count": 1,
+ "volume_group": false
+ },
+ "Vloadbalancerms..vlb..module-2": {
+ "vfModuleModelInvariantUUID": "a772a1f4-0064-412c-833d-4749b15828dd",
+ "vfModuleModelVersion": "1",
+ "vfModuleModelName": "Vloadbalancerms..vlb..module-2",
+ "vfModuleModelUUID": "0f5c3f6a-650a-4303-abb6-fff3e573a07a",
+ "vfModuleModelCustomizationUUID": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806",
+ "min_vf_module_instances": 0,
+ "vf_module_label": "vlb",
+ "max_vf_module_instances": 1,
+ "vf_module_type": "Expansion",
+ "isBase": false,
+ "initial_count": 0,
+ "volume_group": false
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json b/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json
index 12edd7738..793ba5e7f 100644
--- a/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json
+++ b/src/test/resources/tosca/new-converter/tosca_apex_with_metadata.json
@@ -87,8 +87,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -99,38 +98,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -156,8 +148,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -168,38 +159,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -225,8 +209,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -237,38 +220,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -294,8 +270,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -306,38 +281,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -363,8 +331,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -375,38 +342,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -432,8 +392,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -444,38 +403,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
diff --git a/src/test/resources/tosca/operational-policy-cds-payload-with-list.json b/src/test/resources/tosca/operational-policy-cds-payload-with-list.json
new file mode 100644
index 000000000..24269ec79
--- /dev/null
+++ b/src/test/resources/tosca/operational-policy-cds-payload-with-list.json
@@ -0,0 +1,742 @@
+{
+ "type": "object",
+ "title": "Configuration",
+ "required": [
+ "operational_policy",
+ "guard_policies"
+ ],
+ "properties": {
+ "operational_policy": {
+ "type": "object",
+ "title": "Related Parameters",
+ "required": [
+ "controlLoop",
+ "policies"
+ ],
+ "properties": {
+ "controlLoop": {
+ "type": "object",
+ "title": "Control Loop details",
+ "required": [
+ "timeout",
+ "abatement",
+ "trigger_policy",
+ "controlLoopName"
+ ],
+ "properties": {
+ "timeout": {
+ "type": "string",
+ "title": "Overall Time Limit",
+ "default": "0",
+ "format": "number"
+ },
+ "abatement": {
+ "type": "string",
+ "title": "Abatement",
+ "enum": [
+ "True",
+ "False"
+ ]
+ },
+ "trigger_policy": {
+ "type": "string",
+ "title": "Policy Decision Entry"
+ },
+ "controlLoopName": {
+ "type": "string",
+ "title": "Control loop name",
+ "readOnly": "True"
+ }
+ }
+ },
+ "policies": {
+ "uniqueItems": "true",
+ "id": "policies_array",
+ "type": "array",
+ "title": "Policy Decision Tree",
+ "format": "tabs-top",
+ "items": {
+ "title": "Policy Decision",
+ "type": "object",
+ "id": "policy_item",
+ "headerTemplate": "{{self.id}} - {{self.recipe}}",
+ "format": "categories",
+ "basicCategoryTitle": "recipe",
+ "required": [
+ "id",
+ "retry",
+ "timeout",
+ "actor",
+ "success",
+ "failure",
+ "failure_timeout",
+ "failure_retries",
+ "failure_exception",
+ "failure_guard",
+ "target"
+ ],
+ "properties": {
+ "id": {
+ "default": "Policy 1",
+ "title": "Policy ID",
+ "type": "string"
+ },
+ "retry": {
+ "default": "0",
+ "title": "Number of Retry",
+ "type": "string",
+ "format": "number"
+ },
+ "timeout": {
+ "default": "0",
+ "title": "Timeout",
+ "type": "string",
+ "format": "number"
+ },
+ "actor": {
+ "type": "object",
+ "title": "Actor",
+ "anyOf": [
+ {
+ "title": "APPC",
+ "type": "object",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "APPC",
+ "options": {
+ "hidden": true
+ }
+ },
+ "recipe": {
+ "title": "recipe",
+ "type": "string",
+ "default": "",
+ "enum": [
+ "Restart",
+ "Rebuild",
+ "Migrate",
+ "Health-Check",
+ "ModifyConfig"
+ ]
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "SO",
+ "type": "object",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "SO",
+ "options": {
+ "hidden": true
+ }
+ },
+ "recipe": {
+ "title": "recipe",
+ "type": "string",
+ "default": "",
+ "enum": [
+ "VF Module Create",
+ "VF Module Delete"
+ ]
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "SDNC",
+ "type": "object",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "SDNC",
+ "options": {
+ "hidden": true
+ }
+ },
+ "recipe": {
+ "title": "recipe",
+ "type": "string",
+ "default": "",
+ "enum": [
+ "Reroute",
+ "BandwidthOnDemand"
+ ]
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "VFC",
+ "type": "object",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "VFC",
+ "options": {
+ "hidden": true
+ }
+ },
+ "recipe": {
+ "title": "recipe",
+ "type": "string",
+ "default": "",
+ "enum": [
+ "ModifyConfig"
+ ]
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "CDS",
+ "type": "object",
+ "properties": {
+ "actor": {
+ "title": "actor",
+ "type": "string",
+ "default": "CDS",
+ "options": {
+ "hidden": true
+ }
+ },
+ "recipe": {
+ "title": "recipe",
+ "type": "object",
+ "anyOf": [
+ {
+ "title": "user-defined",
+ "type": "object",
+ "properties": {
+ "recipe": {
+ "title": "recipe",
+ "type": "string",
+ "default": "user-defined",
+ "format": "textarea"
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "string",
+ "default": "",
+ "format": "textarea"
+ }
+ }
+ },
+ {
+ "title": "resource-assignment",
+ "type": "object",
+ "properties": {
+ "recipe": {
+ "title": "recipe",
+ "type": "string",
+ "default": "resource-assignment",
+ "options": {
+ "hidden": true
+ }
+ },
+ "payload": {
+ "title": "Payload (YAML)",
+ "type": "object",
+ "properties": {
+ "artifact_name": {
+ "title": "artifact name",
+ "type": "string",
+ "default": "baseconfiguration",
+ "readOnly": "True"
+ },
+ "artifact_version": {
+ "title": "artifact version",
+ "type": "string",
+ "default": "1.0.0",
+ "readOnly": "True"
+ },
+ "mode": {
+ "title": "mode",
+ "type": "string",
+ "default": "async"
+ },
+ "data": {
+ "title": "data",
+ "properties": {
+ "template-prefix": {
+ "title": "template-prefix",
+ "type": "array"
+ },
+ "template-prefix-with-complex-type": {
+ "title": "template-prefix-with-complex-type",
+ "type": "array",
+ "items": {
+ "properties": {
+ "prefix-id": {
+ "title": "prefix-id",
+ "type": "string"
+ }
+ }
+ }
+ },
+ "resource-assignment-properties": {
+ "title": "resource-assignment-properties",
+ "type": "object",
+ "properties": {
+ "private1-prefix-id": {
+ "title": "private1-prefix-id",
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "success": {
+ "default": "final_success",
+ "title": "When Success",
+ "type": "string"
+ },
+ "failure": {
+ "default": "final_failure",
+ "title": "When Failure",
+ "type": "string"
+ },
+ "failure_timeout": {
+ "default": "final_failure_timeout",
+ "title": "When Failure Timeout",
+ "type": "string"
+ },
+ "failure_retries": {
+ "default": "final_failure_retries",
+ "title": "When Failure Retries",
+ "type": "string"
+ },
+ "failure_exception": {
+ "default": "final_failure_exception",
+ "title": "When Failure Exception",
+ "type": "string"
+ },
+ "failure_guard": {
+ "default": "final_failure_guard",
+ "title": "When Failure Guard",
+ "type": "string"
+ },
+ "target": {
+ "type": "object",
+ "required": [
+ "type",
+ "resourceID"
+ ],
+ "anyOf": [
+ {
+ "title": "User Defined",
+ "additionalProperties": "True",
+ "properties": {
+ "type": {
+ "title": "Target type",
+ "type": "string",
+ "default": "",
+ "enum": [
+ "VNF",
+ "VFMODULE",
+ "VM"
+ ]
+ },
+ "resourceID": {
+ "title": "Target type",
+ "type": "string",
+ "default": ""
+ }
+ }
+ },
+ {
+ "title": "VNF-vLoadBalancerMS 0",
+ "properties": {
+ "type": {
+ "title": "Type",
+ "type": "string",
+ "default": "VNF",
+ "readOnly": "True"
+ },
+ "resourceID": {
+ "title": "Resource ID",
+ "type": "string",
+ "default": "vLoadBalancerMS",
+ "readOnly": "True"
+ }
+ }
+ },
+ {
+ "title": "VFMODULE-Vloadbalancerms..vpkg..module-1",
+ "properties": {
+ "type": {
+ "title": "Type",
+ "type": "string",
+ "default": "VFMODULE",
+ "readOnly": "True"
+ },
+ "resourceID": {
+ "title": "Resource ID",
+ "type": "string",
+ "default": "Vloadbalancerms..vpkg..module-1",
+ "readOnly": "True"
+ },
+ "modelInvariantId": {
+ "title": "Model Invariant Id (ModelInvariantUUID)",
+ "type": "string",
+ "default": "ca052563-eb92-4b5b-ad41-9111768ce043",
+ "readOnly": "True"
+ },
+ "modelVersionId": {
+ "title": "Model Version Id (ModelUUID)",
+ "type": "string",
+ "default": "1e725ccc-b823-4f67-82b9-4f4367070dbc",
+ "readOnly": "True"
+ },
+ "modelName": {
+ "title": "Model Name",
+ "type": "string",
+ "default": "Vloadbalancerms..vpkg..module-1",
+ "readOnly": "True"
+ },
+ "modelVersion": {
+ "title": "Model Version",
+ "type": "string",
+ "default": "1",
+ "readOnly": "True"
+ },
+ "modelCustomizationId": {
+ "title": "Customization ID",
+ "type": "string",
+ "default": "1bffdc31-a37d-4dee-b65c-dde623a76e52",
+ "readOnly": "True"
+ }
+ }
+ },
+ {
+ "title": "VFMODULE-Vloadbalancerms..vdns..module-3",
+ "properties": {
+ "type": {
+ "title": "Type",
+ "type": "string",
+ "default": "VFMODULE",
+ "readOnly": "True"
+ },
+ "resourceID": {
+ "title": "Resource ID",
+ "type": "string",
+ "default": "Vloadbalancerms..vdns..module-3",
+ "readOnly": "True"
+ },
+ "modelInvariantId": {
+ "title": "Model Invariant Id (ModelInvariantUUID)",
+ "type": "string",
+ "default": "4c10ba9b-f88f-415e-9de3-5d33336047fa",
+ "readOnly": "True"
+ },
+ "modelVersionId": {
+ "title": "Model Version Id (ModelUUID)",
+ "type": "string",
+ "default": "4fa73b49-8a6c-493e-816b-eb401567b720",
+ "readOnly": "True"
+ },
+ "modelName": {
+ "title": "Model Name",
+ "type": "string",
+ "default": "Vloadbalancerms..vdns..module-3",
+ "readOnly": "True"
+ },
+ "modelVersion": {
+ "title": "Model Version",
+ "type": "string",
+ "default": "1",
+ "readOnly": "True"
+ },
+ "modelCustomizationId": {
+ "title": "Customization ID",
+ "type": "string",
+ "default": "bafcdab0-801d-4d81-9ead-f464640a38b1",
+ "readOnly": "True"
+ }
+ }
+ },
+ {
+ "title": "VFMODULE-Vloadbalancerms..base_template..module-0",
+ "properties": {
+ "type": {
+ "title": "Type",
+ "type": "string",
+ "default": "VFMODULE",
+ "readOnly": "True"
+ },
+ "resourceID": {
+ "title": "Resource ID",
+ "type": "string",
+ "default": "Vloadbalancerms..base_template..module-0",
+ "readOnly": "True"
+ },
+ "modelInvariantId": {
+ "title": "Model Invariant Id (ModelInvariantUUID)",
+ "type": "string",
+ "default": "921f7c96-ebdd-42e6-81b9-1cfc0c9796f3",
+ "readOnly": "True"
+ },
+ "modelVersionId": {
+ "title": "Model Version Id (ModelUUID)",
+ "type": "string",
+ "default": "63734409-f745-4e4d-a38b-131638a0edce",
+ "readOnly": "True"
+ },
+ "modelName": {
+ "title": "Model Name",
+ "type": "string",
+ "default": "Vloadbalancerms..base_template..module-0",
+ "readOnly": "True"
+ },
+ "modelVersion": {
+ "title": "Model Version",
+ "type": "string",
+ "default": "1",
+ "readOnly": "True"
+ },
+ "modelCustomizationId": {
+ "title": "Customization ID",
+ "type": "string",
+ "default": "86baddea-c730-4fb8-9410-cd2e17fd7f27",
+ "readOnly": "True"
+ }
+ }
+ },
+ {
+ "title": "VFMODULE-Vloadbalancerms..vlb..module-2",
+ "properties": {
+ "type": {
+ "title": "Type",
+ "type": "string",
+ "default": "VFMODULE",
+ "readOnly": "True"
+ },
+ "resourceID": {
+ "title": "Resource ID",
+ "type": "string",
+ "default": "Vloadbalancerms..vlb..module-2",
+ "readOnly": "True"
+ },
+ "modelInvariantId": {
+ "title": "Model Invariant Id (ModelInvariantUUID)",
+ "type": "string",
+ "default": "a772a1f4-0064-412c-833d-4749b15828dd",
+ "readOnly": "True"
+ },
+ "modelVersionId": {
+ "title": "Model Version Id (ModelUUID)",
+ "type": "string",
+ "default": "0f5c3f6a-650a-4303-abb6-fff3e573a07a",
+ "readOnly": "True"
+ },
+ "modelName": {
+ "title": "Model Name",
+ "type": "string",
+ "default": "Vloadbalancerms..vlb..module-2",
+ "readOnly": "True"
+ },
+ "modelVersion": {
+ "title": "Model Version",
+ "type": "string",
+ "default": "1",
+ "readOnly": "True"
+ },
+ "modelCustomizationId": {
+ "title": "Customization ID",
+ "type": "string",
+ "default": "96a78aad-4ffb-4ef0-9c4f-deb03bf1d806",
+ "readOnly": "True"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "guard_policies": {
+ "type": "array",
+ "format": "tabs-top",
+ "title": "Associated Guard policies",
+ "items": {
+ "headerTemplate": "{{self.policy-id}} - {{self.content.recipe}}",
+ "anyOf": [
+ {
+ "title": "Guard MinMax",
+ "type": "object",
+ "properties": {
+ "policy-id": {
+ "type": "string",
+ "default": "guard.minmax.new",
+ "pattern": "^(guard.minmax\\..*)$"
+ },
+ "content": {
+ "properties": {
+ "actor": {
+ "type": "string",
+ "enum": [
+ "APPC",
+ "SO",
+ "VFC",
+ "SDNC",
+ "SDNR"
+ ]
+ },
+ "recipe": {
+ "type": "string",
+ "enum": [
+ "Restart",
+ "Rebuild",
+ "Migrate",
+ "Health-Check",
+ "ModifyConfig",
+ "VF Module Create",
+ "VF Module Delete",
+ "Reroute"
+ ]
+ },
+ "targets": {
+ "type": "string",
+ "default": ".*"
+ },
+ "clname": {
+ "type": "string",
+ "template": "{{loopName}}",
+ "watch": {
+ "loopName": "operational_policy.controlLoop.controlLoopName"
+ }
+ },
+ "guardActiveStart": {
+ "type": "string",
+ "default": "00:00:00Z"
+ },
+ "guardActiveEnd": {
+ "type": "string",
+ "default": "10:00:00Z"
+ },
+ "min": {
+ "type": "string",
+ "default": "0"
+ },
+ "max": {
+ "type": "string",
+ "default": "1"
+ }
+ }
+ }
+ }
+ },
+ {
+ "title": "Guard Frequency",
+ "type": "object",
+ "properties": {
+ "policy-id": {
+ "type": "string",
+ "default": "guard.frequency.new",
+ "pattern": "^(guard.frequency\\..*)$"
+ },
+ "content": {
+ "properties": {
+ "actor": {
+ "type": "string",
+ "enum": [
+ "APPC",
+ "SO",
+ "VFC",
+ "SDNC",
+ "SDNR"
+ ]
+ },
+ "recipe": {
+ "type": "string",
+ "enum": [
+ "Restart",
+ "Rebuild",
+ "Migrate",
+ "Health-Check",
+ "ModifyConfig",
+ "VF Module Create",
+ "VF Module Delete",
+ "Reroute"
+ ]
+ },
+ "targets": {
+ "type": "string",
+ "default": ".*"
+ },
+ "clname": {
+ "type": "string",
+ "template": "{{loopName}}",
+ "watch": {
+ "loopName": "operational_policy.controlLoop.controlLoopName"
+ }
+ },
+ "guardActiveStart": {
+ "type": "string",
+ "default": "00:00:00Z"
+ },
+ "guardActiveEnd": {
+ "type": "string",
+ "default": "10:00:00Z"
+ },
+ "limit": {
+ "type": "string"
+ },
+ "timeWindow": {
+ "type": "string"
+ },
+ "timeUnits": {
+ "type": "string",
+ "enum": [
+ "minute",
+ "hour",
+ "day",
+ "week",
+ "month",
+ "year"
+ ]
+ }
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/test/resources/tosca/operational-policy-json-schema.json b/src/test/resources/tosca/operational-policy-json-schema.json
index ffa88ecaf..87457f1d2 100644
--- a/src/test/resources/tosca/operational-policy-json-schema.json
+++ b/src/test/resources/tosca/operational-policy-json-schema.json
@@ -276,8 +276,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -288,38 +287,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -360,8 +352,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -372,38 +363,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -444,8 +428,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -456,38 +439,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -528,8 +504,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -540,38 +515,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -612,8 +580,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -624,38 +591,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
@@ -696,8 +656,7 @@
"mode": {
"title": "mode",
"type": "string",
- "default": "async",
- "format": "textarea"
+ "default": "async"
},
"data": {
"title": "data",
@@ -708,38 +667,31 @@
"properties": {
"request-id": {
"title": "request-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"service-instance-id": {
"title": "service-instance-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf-id": {
"title": "vnf-id",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"action-name": {
"title": "action-name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"scope-type": {
"title": "scope-type",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"hostname": {
"title": "hostname",
- "type": "string",
- "format": "textarea"
+ "type": "string"
},
"vnf_name": {
"title": "vnf_name",
- "type": "string",
- "format": "textarea"
+ "type": "string"
}
}
}
diff --git a/src/test/resources/tosca/pdp-group-policy-payload.json b/src/test/resources/tosca/pdp-group-policy-payload.json
index c81440e73..dce740fcd 100644
--- a/src/test/resources/tosca/pdp-group-policy-payload.json
+++ b/src/test/resources/tosca/pdp-group-policy-payload.json
@@ -23,6 +23,14 @@
"action": "POST",
"policies": [
{
+ "name": "opLegacyPolicy",
+ "version": "1.0.0"
+ },
+ {
+ "name": "guard1",
+ "version": "1.0.0"
+ },
+ {
"name": "opPolicy",
"version": "1.0.0"
}
diff --git a/src/test/resources/tosca/policy-yaml-to-json-with-constraints.json b/src/test/resources/tosca/policy-yaml-to-json-with-constraints.json
index b2575486c..fe9b84d13 100644
--- a/src/test/resources/tosca/policy-yaml-to-json-with-constraints.json
+++ b/src/test/resources/tosca/policy-yaml-to-json-with-constraints.json
@@ -1,7 +1,7 @@
{
"schema": {
"uniqueItems": "true",
- "format": "tabs-top",
+ "format": "tabs",
"type": "array",
"title": "Properties with constraints",
"items": {
diff --git a/src/test/resources/tosca/policy-yaml-to-json-with-datatypes.json b/src/test/resources/tosca/policy-yaml-to-json-with-datatypes.json
index d470d928d..ef9c2c03a 100644
--- a/src/test/resources/tosca/policy-yaml-to-json-with-datatypes.json
+++ b/src/test/resources/tosca/policy-yaml-to-json-with-datatypes.json
@@ -1,7 +1,7 @@
{
"schema": {
"uniqueItems": "true",
- "format": "tabs-top",
+ "format": "tabs",
"type": "array",
"title": "Properties with different types",
"items": {
diff --git a/src/test/resources/tosca/policy-yaml-to-json.json b/src/test/resources/tosca/policy-yaml-to-json.json
index dd6a9ff3b..b83d3f24f 100644
--- a/src/test/resources/tosca/policy-yaml-to-json.json
+++ b/src/test/resources/tosca/policy-yaml-to-json.json
@@ -1,7 +1,7 @@
{
"schema": {
"uniqueItems": "true",
- "format": "tabs-top",
+ "format": "tabs",
"type": "array",
"title": "TCA Policy JSON",
"items": {
diff --git a/src/test/resources/tosca/tosca_metadata_clamp_possible_values_json_schema.json b/src/test/resources/tosca/tosca_metadata_clamp_possible_values_json_schema.json
index af8c1f961..418ee71be 100644
--- a/src/test/resources/tosca/tosca_metadata_clamp_possible_values_json_schema.json
+++ b/src/test/resources/tosca/tosca_metadata_clamp_possible_values_json_schema.json
@@ -1,7 +1,7 @@
{
"schema":{
"uniqueItems":"true",
- "format":"tabs-top",
+ "format":"tabs",
"type":"array",
"title":"TCA Policy JSON",
"items":{
@@ -185,6 +185,20 @@
"id":"alarmCondition",
"label":"alarmCondition",
"type":"string"
+ },
+ {
+ "plugin":"datetimepicker",
+ "operators":[
+ "equals"
+ ],
+ "minLength":1,
+ "id":"timeEpoch",
+ "label":"timeEpoch",
+ "type":"datetime",
+ "input_event":"dp.change",
+ "validation":{
+ "format":"YYYY/MM/DD HH:mm:ss"
+ }
}
]
},
diff --git a/src/test/resources/tosca/tosca_with_date_time_json_schema.json b/src/test/resources/tosca/tosca_with_date_time_json_schema.json
new file mode 100644
index 000000000..e15942cc5
--- /dev/null
+++ b/src/test/resources/tosca/tosca_with_date_time_json_schema.json
@@ -0,0 +1,240 @@
+{
+ "schema":{
+ "uniqueItems":"true",
+ "format":"tabs",
+ "type":"array",
+ "title":"TCA Policy JSON",
+ "items":{
+ "type":"object",
+ "title":"TCA Policy JSON",
+ "required":[
+ "domain",
+ "metricsPerEventName"
+ ],
+ "properties":{
+ "domain":{
+ "propertyOrder":1001,
+ "default":"measurementsForVfScaling",
+ "title":"Domain name to which TCA needs to be applied",
+ "type":"string"
+ },
+ "metricsPerEventName":{
+ "propertyOrder":1002,
+ "uniqueItems":"true",
+ "format":"tabs-top",
+ "title":"Contains eventName and threshold details that need to be applied to given eventName",
+ "type":"array",
+ "items":{
+ "type":"object",
+ "required":[
+ "controlLoopSchemaType",
+ "eventName",
+ "policyName",
+ "policyScope",
+ "policyVersion",
+ "thresholds",
+ "context",
+ "signature"
+ ],
+ "properties":{
+ "policyVersion":{
+ "propertyOrder":1007,
+ "title":"TCA Policy Scope Version",
+ "type":"string"
+ },
+ "thresholds":{
+ "propertyOrder":1008,
+ "uniqueItems":"true",
+ "format":"tabs-top",
+ "title":"Thresholds associated with eventName",
+ "type":"array",
+ "items":{
+ "type":"object",
+ "required":[
+ "closedLoopControlName",
+ "closedLoopEventStatus",
+ "direction",
+ "fieldPath",
+ "severity",
+ "thresholdValue",
+ "version"
+ ],
+ "properties":{
+ "severity":{
+ "propertyOrder":1013,
+ "title":"Threshold Event Severity",
+ "type":"string",
+ "enum":[
+ "CRITICAL",
+ "MAJOR",
+ "MINOR",
+ "WARNING",
+ "NORMAL"
+ ]
+ },
+ "fieldPath":{
+ "propertyOrder":1012,
+ "title":"Json field Path as per CEF message which needs to be analyzed for TCA",
+ "type":"string",
+ "enum":[
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedOctetsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedUnicastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedMulticastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedDiscardedPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedErrorPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsDelta",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedTotalPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedOctetsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedUnicastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedMulticastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedBroadcastPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedDiscardedPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].transmittedErrorPacketsAccumulated",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuIdle",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageInterrupt",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageNice",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSoftIrq",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSteal",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuUsageSystem",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].cpuWait",
+ "$.event.measurementsForVfScalingFields.cpuUsageArray[*].percentUsage",
+ "$.event.measurementsForVfScalingFields.meanRequestLatency",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryBuffered",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryCached",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryConfigured",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryFree",
+ "$.event.measurementsForVfScalingFields.memoryUsageArray[*].memoryUsed",
+ "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value"
+ ]
+ },
+ "thresholdValue":{
+ "propertyOrder":1014,
+ "title":"Threshold value for the field Path inside CEF message",
+ "type":"integer"
+ },
+ "closedLoopEventStatus":{
+ "propertyOrder":1010,
+ "title":"Closed Loop Event Status of the threshold",
+ "type":"string",
+ "enum":[
+ "ONSET",
+ "ABATED"
+ ]
+ },
+ "closedLoopControlName":{
+ "propertyOrder":1009,
+ "title":"Closed Loop Control Name associated with the threshold",
+ "type":"string"
+ },
+ "version":{
+ "propertyOrder":1015,
+ "title":"Version number associated with the threshold",
+ "type":"string"
+ },
+ "direction":{
+ "propertyOrder":1011,
+ "title":"Direction of the threshold",
+ "type":"string",
+ "enum":[
+ "LESS",
+ "LESS_OR_EQUAL",
+ "GREATER",
+ "GREATER_OR_EQUAL",
+ "EQUAL"
+ ]
+ }
+ }
+ }
+ },
+ "policyName":{
+ "propertyOrder":1005,
+ "title":"TCA Policy Scope Name",
+ "type":"string"
+ },
+ "signature":{
+ "propertyOrder":1017,
+ "title":"Signature",
+ "required":[
+ "filter_clause"
+ ],
+ "properties":{
+ "filter_clause":{
+ "propertyOrder":30002,
+ "qschema":{
+ "filters":[
+ {
+ "plugin":"datetimepicker",
+ "operators":[
+ "equals"
+ ],
+ "minLength":1,
+ "id":"timeEpoch",
+ "label":"timeEpoch",
+ "type":"datetime",
+ "input_event":"dp.change",
+ "validation":{
+ "format":"YYYY/MM/DD HH:mm:ss"
+ }
+ }
+ ]
+ },
+ "minLength":1,
+ "title":"Filter Clause",
+ "type":"qbldr"
+ }
+ }
+ },
+ "controlLoopSchemaType":{
+ "propertyOrder":1003,
+ "title":"Specifies Control Loop Schema Type for the event Name e.g. VNF, VM",
+ "type":"string",
+ "enum":[
+ "VM",
+ "VNF"
+ ]
+ },
+ "policyScope":{
+ "propertyOrder":1006,
+ "title":"TCA Policy Scope",
+ "type":"string"
+ },
+ "context":{
+ "propertyOrder":1016,
+ "options":{
+ "enum_titles":[
+ "PROD"
+ ]
+ },
+ "title":"TCA Policy Dummy Context",
+ "type":"string",
+ "enum":[
+ "PROD"
+ ]
+ },
+ "eventName":{
+ "propertyOrder":1004,
+ "title":"Event name to which thresholds need to be applied",
+ "type":"string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file