summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2021-04-26 14:04:20 +0200
committersebdet <sebastien.determe@intl.att.com>2021-04-26 15:12:08 +0200
commit4423d367c47d818493fbad627a43ba68f87d15f2 (patch)
tree77c5deabfa27dccd74f70ed0d45b7a77a9c56778 /src
parent48a2a182fe73768af38774df3596719ed2b087a1 (diff)
Remove dead code
Remove dead code due to change done to add tosca file to PEF directly. Issue-ID: POLICY-3229 Signed-off-by: sebdet <sebastien.determe@intl.att.com> Change-Id: I4e48fd5401e304b131406b739268134dd7e7997f Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/policy/clamp/clds/tosca/ToscaYamlToJsonConvertor.java781
-rw-r--r--src/main/java/org/onap/policy/clamp/clds/tosca/update/parser/metadata/ToscaMetadataParserWithDictionarySupport.java2
-rw-r--r--src/main/java/org/onap/policy/clamp/loop/template/PolicyModelsService.java53
-rw-r--r--src/main/resources/META-INF/resources/swagger.html412
-rw-r--r--src/main/resources/clds/camel/rest/clamp-api-v2.xml76
-rw-r--r--src/test/java/org/onap/policy/clamp/clds/tosca/ToscaYamlToJsonConvertorTestItCase.java201
-rw-r--r--src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java39
-rw-r--r--src/test/resources/tosca/policy-yaml-to-json-with-constraints.json63
-rw-r--r--src/test/resources/tosca/policy-yaml-to-json-with-datatypes.json108
-rw-r--r--src/test/resources/tosca/policy-yaml-to-json.json192
-rw-r--r--src/test/resources/tosca/tosca-with-constraints.yaml54
-rw-r--r--src/test/resources/tosca/tosca-with-datatypes.yaml63
-rw-r--r--src/test/resources/tosca/tosca_metadata_clamp_possible_values.yaml184
-rw-r--r--src/test/resources/tosca/tosca_metadata_clamp_possible_values_json_schema.json249
14 files changed, 155 insertions, 2322 deletions
diff --git a/src/main/java/org/onap/policy/clamp/clds/tosca/ToscaYamlToJsonConvertor.java b/src/main/java/org/onap/policy/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
deleted file mode 100644
index 4f718d5d7..000000000
--- a/src/main/java/org/onap/policy/clamp/clds/tosca/ToscaYamlToJsonConvertor.java
+++ /dev/null
@@ -1,781 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2018, 2021 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.onap.policy.clamp.clds.tosca;
-
-import com.google.gson.Gson;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Optional;
-import java.util.stream.Collectors;
-import org.json.JSONArray;
-import org.json.JSONObject;
-import org.onap.policy.clamp.clds.config.ClampProperties;
-import org.onap.policy.clamp.tosca.Dictionary;
-import org.onap.policy.clamp.tosca.DictionaryElement;
-import org.onap.policy.clamp.tosca.DictionaryService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-import org.yaml.snakeyaml.Yaml;
-
-/**
- * Tosca Model Yaml parser and convertor to JSON Schema consumable for JSON
- * Editor.
- *
- */
-@Component
-@Deprecated
-public class ToscaYamlToJsonConvertor {
-
- @Autowired
- private DictionaryService dictionaryService;
-
- @Autowired
- private ClampProperties refProp;
-
- private int simpleTypeOrder = 1000;
- private int complexTypeOrder = 10000;
- private int complexSimpleTypeOrder = 1;
-
- private int incrementSimpleTypeOrder() {
- return simpleTypeOrder++;
- }
-
- private int incrementComplexTypeOrder() {
- return complexTypeOrder = complexTypeOrder + 10000;
- }
-
- private int incrementComplexSimpleTypeOrder() {
- complexSimpleTypeOrder++;
- return complexTypeOrder + complexSimpleTypeOrder;
- }
-
- /**
- * Parses Tosca YAML string and Converts to JsonObject.
- *
- * @param yamlString YAML string
- * @return JsonObject
- */
- public JsonObject validateAndConvertToJson(String yamlString) {
-
- Yaml yaml = new Yaml();
- LinkedHashMap<String, Object> loadedYaml = yaml.load(yamlString);
- if (loadedYaml == null) {
- return null;
- }
-
- JSONObject jsonObject = new JSONObject(loadedYaml);
- return new Gson().fromJson(jsonObject.toString(), JsonObject.class);
- }
-
- /**
- * return the values by looking up the key in the Toscsa JSON object.
- *
- * @param obj Tosca Json Object
- * @param key the parameter key to look up
- * @return the value for the provided key
- */
- public String getValueFromMetadata(JsonObject obj, String key) {
- JsonElement jsonElement = obj.get(ToscaSchemaConstants.NODE_TYPES);
- if (jsonElement.isJsonObject()) {
- Iterator<Entry<String, JsonElement>> itr =
- jsonElement.getAsJsonObject().entrySet().iterator();
- while (itr.hasNext()) {
- Entry<String, JsonElement> entry = itr.next();
- if (entry.getValue() != null && entry.getValue().isJsonObject()
- && entry.getValue().getAsJsonObject().has(ToscaSchemaConstants.METADATA)) {
- JsonObject metadatas = entry.getValue().getAsJsonObject()
- .get(ToscaSchemaConstants.METADATA).getAsJsonObject();
- if (metadatas.has(key)) {
- return metadatas.get(key).getAsString();
- }
- }
- }
- }
- return null;
- }
-
- /**
- * Parses Tosca YAML string.
- *
- * @param yamlString YAML string
- * @param modelTypeToUse The model type that must be used to obtain the Json
- * Schema
- * @return JSON string
- */
- public String parseToscaYaml(String yamlString, String modelTypeToUse) {
-
- Yaml yaml = new Yaml();
- LinkedHashMap<String, Object> loadedYaml = yaml.load(yamlString);
- if (loadedYaml == null) {
- return "";
- }
- LinkedHashMap<String, Object> nodeTypes = new LinkedHashMap<>();
- LinkedHashMap<String, Object> dataNodes = new LinkedHashMap<>();
- JSONObject jsonParentObject = new JSONObject();
- JSONObject jsonTempObject = new JSONObject();
- parseNodeAndDataType(loadedYaml, nodeTypes, dataNodes);
- populateJsonEditorObject(loadedYaml, nodeTypes, dataNodes, jsonParentObject, jsonTempObject,
- modelTypeToUse);
-
- String headerTemplate = getValueFromMetadata(validateAndConvertToJson(yamlString),
- ToscaSchemaConstants.METADATA_HEADER_TEMPLATE);
- if (headerTemplate != null) {
- jsonParentObject.put(JsonEditorSchemaConstants.HEADER_TEMPLATE,
- JsonEditorSchemaConstants.HEADER_TEMPLATE_VALUE);
- }
- if (jsonTempObject.length() > 0) {
- jsonParentObject = jsonTempObject;
- }
- JSONObject jsonEditorObject = new JSONObject();
- jsonEditorObject.put(JsonEditorSchemaConstants.SCHEMA, jsonParentObject);
- return jsonEditorObject.toString();
- }
-
- // Parse node_type and data_type
- @SuppressWarnings("unchecked")
- private void parseNodeAndDataType(LinkedHashMap<String, Object> map,
- LinkedHashMap<String, Object> nodeTypes, LinkedHashMap<String, Object> dataNodes) {
- map.entrySet().stream().forEach(n -> {
- if (n.getKey().contains(ToscaSchemaConstants.NODE_TYPES)
- && n.getValue() instanceof Map) {
- parseNodeAndDataType((LinkedHashMap<String, Object>) n.getValue(), nodeTypes,
- dataNodes);
- } else if (n.getKey().contains(ToscaSchemaConstants.DATA_TYPES)
- && n.getValue() instanceof Map) {
- parseNodeAndDataType((LinkedHashMap<String, Object>) n.getValue(), nodeTypes,
- dataNodes);
- } else if (n.getKey().contains(ToscaSchemaConstants.POLICY_NODE)) {
- nodeTypes.put(n.getKey(), n.getValue());
- } else if (n.getKey().contains(ToscaSchemaConstants.POLICY_DATA)) {
- dataNodes.put(n.getKey(), n.getValue());
- }
- });
- }
-
- @SuppressWarnings("unchecked")
- private void populateJsonEditorObject(LinkedHashMap<String, Object> map,
- LinkedHashMap<String, Object> nodeTypes, LinkedHashMap<String, Object> dataNodes,
- JSONObject jsonParentObject, JSONObject jsonTempObject, String modelTypeToUse) {
-
- Map<String, JSONObject> jsonEntrySchema = new HashMap<>();
- jsonParentObject.put(JsonEditorSchemaConstants.TYPE, JsonEditorSchemaConstants.TYPE_OBJECT);
- if (nodeTypes.get(modelTypeToUse) instanceof Map) {
- ((LinkedHashMap<String, Object>) nodeTypes.get(modelTypeToUse)).entrySet()
- .forEach(ntElement -> {
- if (ntElement.getKey().equalsIgnoreCase(ToscaSchemaConstants.PROPERTIES)) {
- JSONArray rootNodeArray = new JSONArray();
- if (ntElement.getValue() instanceof Map) {
- ((LinkedHashMap<String, Object>) ntElement.getValue()).entrySet()
- .forEach((ntPropertiesElement) -> {
- boolean isListNode = false;
- parseDescription(
- (LinkedHashMap<String, Object>) ntPropertiesElement
- .getValue(),
- jsonParentObject);
- LinkedHashMap<String, Object> parentPropertiesMap =
- (LinkedHashMap<String, Object>) ntPropertiesElement
- .getValue();
- if (parentPropertiesMap.containsKey(ToscaSchemaConstants.TYPE)
- && ((String) parentPropertiesMap
- .get(ToscaSchemaConstants.TYPE))
- .contains(ToscaSchemaConstants.TYPE_MAP)
- && parentPropertiesMap
- .containsKey(ToscaSchemaConstants.ENTRY_SCHEMA)) {
- parentPropertiesMap =
- (LinkedHashMap<String, Object>) parentPropertiesMap
- .get(ToscaSchemaConstants.ENTRY_SCHEMA);
- isListNode = true;
- }
- if (parentPropertiesMap.containsKey(ToscaSchemaConstants.TYPE)
- && ((String) parentPropertiesMap
- .get(ToscaSchemaConstants.TYPE))
- .contains(ToscaSchemaConstants.POLICY_DATA)) {
- ((LinkedHashMap<String, Object>) dataNodes.get(
- parentPropertiesMap.get(ToscaSchemaConstants.TYPE)))
- .entrySet().stream().forEach(pmap -> {
- if (pmap.getKey().equalsIgnoreCase(
- ToscaSchemaConstants.PROPERTIES)) {
- parseToscaProperties(
- ToscaSchemaConstants.POLICY_NODE,
- (LinkedHashMap<String, Object>) pmap
- .getValue(),
- jsonParentObject, rootNodeArray,
- jsonEntrySchema, dataNodes,
- incrementSimpleTypeOrder());
- }
- });
- }
- if (isListNode) {
- jsonTempObject.put(JsonEditorSchemaConstants.TYPE,
- JsonEditorSchemaConstants.TYPE_ARRAY);
- parseDescription(
- (LinkedHashMap<String, Object>) ntPropertiesElement
- .getValue(),
- jsonTempObject);
- jsonTempObject.put(JsonEditorSchemaConstants.ITEMS,
- jsonParentObject);
- jsonTempObject.put(JsonEditorSchemaConstants.FORMAT,
- JsonEditorSchemaConstants.CUSTOM_KEY_FORMAT_TABS);
- jsonTempObject.put(JsonEditorSchemaConstants.UNIQUE_ITEMS,
- JsonEditorSchemaConstants.TRUE);
- }
- });
- }
- }
- });
- }
- }
-
- @SuppressWarnings("unchecked")
- private void parseToscaProperties(String parentKey, LinkedHashMap<String, Object> propertiesMap,
- JSONObject jsonDataNode, JSONArray array, Map<String, JSONObject> jsonEntrySchema,
- LinkedHashMap<String, Object> dataNodes, final int order) {
- JSONObject jsonPropertyNode = new JSONObject();
- propertiesMap.entrySet().stream().forEach(p -> {
- // Populate JSON Array for "required" key
-
- if (p.getValue() instanceof Map) {
- LinkedHashMap<String, Object> nodeMap =
- (LinkedHashMap<String, Object>) p.getValue();
- if (nodeMap.containsKey(ToscaSchemaConstants.REQUIRED)
- && ((boolean) nodeMap.get(ToscaSchemaConstants.REQUIRED))) {
- array.put(p.getKey());
- }
- // if(nodeMap.containsKey(ToscaSchemaConstants.CONSTRAINTS))
- parseToscaChildNodeMap(p.getKey(), nodeMap, jsonPropertyNode, jsonEntrySchema,
- dataNodes, array, incrementSimpleTypeOrder());
- }
- });
- jsonDataNode.put(JsonEditorSchemaConstants.REQUIRED, array);
- jsonDataNode.put(JsonEditorSchemaConstants.PROPERTIES, jsonPropertyNode);
- }
-
- @SuppressWarnings("unchecked")
- private void parseToscaPropertiesForType(String parentKey,
- LinkedHashMap<String, Object> propertiesMap, JSONObject jsonDataNode, JSONArray array,
- Map<String, JSONObject> jsonEntrySchema, LinkedHashMap<String, Object> dataNodes,
- boolean isType, int order) {
- JSONObject jsonPropertyNode = new JSONObject();
-
- propertiesMap.entrySet().stream().forEach(p -> {
- // array.put(p.getKey());
- boolean overWriteArray = false;
- if (p.getValue() instanceof Map) {
- LinkedHashMap<String, Object> nodeMap =
- (LinkedHashMap<String, Object>) p.getValue();
- if (!(parentKey.contains(ToscaSchemaConstants.ENTRY_SCHEMA)
- || parentKey.contains(ToscaSchemaConstants.POLICY_NODE))
- && nodeMap.containsKey(ToscaSchemaConstants.TYPE)
- && (((String) nodeMap.get(ToscaSchemaConstants.TYPE))
- .contains(ToscaSchemaConstants.POLICY_DATA))) {
- overWriteArray = true;
- }
- if (nodeMap.containsKey(ToscaSchemaConstants.REQUIRED)
- && ((boolean) nodeMap.get(ToscaSchemaConstants.REQUIRED))) {
- array.put(p.getKey());
- }
- parseToscaChildNodeMap(p.getKey(), nodeMap, jsonPropertyNode, jsonEntrySchema,
- dataNodes, array, order);
- }
- });
- jsonDataNode.put(JsonEditorSchemaConstants.REQUIRED, array);
- jsonDataNode.put(JsonEditorSchemaConstants.PROPERTIES, jsonPropertyNode);
- }
-
- private void parseToscaChildNodeMap(String childObjectKey,
- LinkedHashMap<String, Object> childNodeMap, JSONObject jsonPropertyNode,
- Map<String, JSONObject> jsonEntrySchema, LinkedHashMap<String, Object> dataNodes,
- JSONArray array, int order) {
- JSONObject childObject = new JSONObject();
- // JSONArray childArray = new JSONArray();
- parseDescription(childNodeMap, childObject);
- parseTypes(childObjectKey, childNodeMap, childObject, jsonEntrySchema, dataNodes, array,
- order);
- parseConstraints(childNodeMap, childObject);
- parseMetadataPossibleValues(childNodeMap, childObject);
- parseEntrySchema(childNodeMap, childObject, jsonPropertyNode, jsonEntrySchema, dataNodes);
-
- jsonPropertyNode.put(childObjectKey, childObject);
- order++;
-
- }
-
- private void parseEntrySchema(LinkedHashMap<String, Object> childNodeMap,
- JSONObject childObject, JSONObject jsonPropertyNode,
- Map<String, JSONObject> jsonEntrySchema, LinkedHashMap<String, Object> dataNodes) {
- if (childNodeMap.get(ToscaSchemaConstants.ENTRY_SCHEMA) != null) {
- if (childNodeMap.get(ToscaSchemaConstants.ENTRY_SCHEMA) instanceof Map) {
- LinkedHashMap<String, Object> entrySchemaMap =
- (LinkedHashMap<String, Object>) childNodeMap
- .get(ToscaSchemaConstants.ENTRY_SCHEMA);
- entrySchemaMap.entrySet().stream().forEach(entry -> {
- if (entry.getKey().equalsIgnoreCase(ToscaSchemaConstants.TYPE)
- && entry.getValue() != null) {
- String entrySchemaType = (String) entry.getValue();
- if (entrySchemaType.contains(ToscaSchemaConstants.POLICY_DATA)) {
- JSONArray array = new JSONArray();
- if (jsonEntrySchema.get(entrySchemaType) != null) {
- // Already traversed
- JSONObject entrySchemaObject = jsonEntrySchema.get(entrySchemaType);
- attachEntrySchemaJsonObject(childObject, entrySchemaObject,
- JsonEditorSchemaConstants.TYPE_OBJECT);
- } else if (dataNodes.containsKey(entrySchemaType)) {
-
- JSONObject entrySchemaObject = new JSONObject();
- // Need to traverse
- ((LinkedHashMap<String, Object>) dataNodes.get(entrySchemaType))
- .entrySet().stream().forEach(pmap -> {
- if (pmap.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.PROPERTIES)) {
- parseToscaProperties(ToscaSchemaConstants.ENTRY_SCHEMA,
- (LinkedHashMap<String, Object>) pmap.getValue(),
- entrySchemaObject, array, jsonEntrySchema,
- dataNodes, incrementComplexTypeOrder());
- jsonEntrySchema.put(entrySchemaType, entrySchemaObject);
- dataNodes.remove(entrySchemaType);
- attachEntrySchemaJsonObject(childObject,
- entrySchemaObject,
- JsonEditorSchemaConstants.TYPE_OBJECT);
- }
-
- });
- }
- } else if (entrySchemaType
- .equalsIgnoreCase(ToscaSchemaConstants.TYPE_STRING)
- || entrySchemaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_INTEGER)
- || entrySchemaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_FLOAT)) {
- JSONObject entrySchemaObject = new JSONObject();
- parseConstraints(entrySchemaMap, entrySchemaObject);
- parseMetadataPossibleValues(entrySchemaMap, entrySchemaObject);
- String jsontype = JsonEditorSchemaConstants.TYPE_STRING;
- if (entrySchemaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_INTEGER)
- || entrySchemaType
- .equalsIgnoreCase(ToscaSchemaConstants.TYPE_FLOAT)) {
- jsontype = JsonEditorSchemaConstants.TYPE_INTEGER;
- }
- if (childNodeMap.get(ToscaSchemaConstants.TYPE) != null) {
- // Only known value of type is String for now
- if (childNodeMap.get(ToscaSchemaConstants.TYPE) instanceof String) {
- String typeValue =
- (String) childNodeMap.get(ToscaSchemaConstants.TYPE);
- if (typeValue
- .equalsIgnoreCase(ToscaSchemaConstants.TYPE_LIST)) {
- // Custom key for JSON Editor and UI rendering
- childObject.put(JsonEditorSchemaConstants.CUSTOM_KEY_FORMAT,
- JsonEditorSchemaConstants.FORMAT_SELECT);
- // childObject.put(JsonEditorSchemaConstants.UNIQUE_ITEMS,
- // JsonEditorSchemaConstants.TRUE);
- }
- }
- }
- attachEntrySchemaJsonObject(childObject, entrySchemaObject, jsontype);
- }
- }
- });
- }
- }
- }
-
- private void attachEntrySchemaJsonObject(JSONObject childObject, JSONObject entrySchemaObject,
- String dataType) {
-
- entrySchemaObject.put(JsonEditorSchemaConstants.TYPE, dataType);
- childObject.put(JsonEditorSchemaConstants.ITEMS, entrySchemaObject);
- }
-
- @SuppressWarnings("unchecked")
- private void attachTypeJsonObject(JSONObject childObject, JSONObject typeObject) {
- Iterator<String> keys = typeObject.keys();
- while (keys.hasNext()) {
- String key = keys.next();
- childObject.put(key, typeObject.get(key));
- }
- }
-
- /*
- * private String parseKey(String toscaKey, String lookupString) { return
- * toscaKey.substring(toscaKey.indexOf(lookupString) + lookupString.length(),
- * toscaKey.length()); }
- */
-
- private void parseDescription(LinkedHashMap<String, Object> childNodeMap,
- JSONObject childObject) {
- if (childNodeMap.get(ToscaSchemaConstants.DESCRIPTION) != null) {
- childObject.put(JsonEditorSchemaConstants.TITLE,
- childNodeMap.get(ToscaSchemaConstants.DESCRIPTION));
- }
- }
-
- private void parseTypes(String childObjectKey, LinkedHashMap<String, Object> childNodeMap,
- JSONObject childObject, Map<String, JSONObject> jsonEntrySchema,
- LinkedHashMap<String, Object> dataNodes, JSONArray array, int order) {
- if (childNodeMap.get(ToscaSchemaConstants.TYPE) != null) {
- // Only known value of type is String for now
- if (childNodeMap.get(ToscaSchemaConstants.TYPE) instanceof String) {
- childObject.put(JsonEditorSchemaConstants.PROPERTY_ORDER, order);
- String typeValue = (String) childNodeMap.get(ToscaSchemaConstants.TYPE);
- if (typeValue.equalsIgnoreCase(ToscaSchemaConstants.TYPE_INTEGER)) {
- childObject.put(JsonEditorSchemaConstants.TYPE,
- JsonEditorSchemaConstants.TYPE_INTEGER);
-
- } else if (typeValue.equalsIgnoreCase(ToscaSchemaConstants.TYPE_FLOAT)) {
- childObject.put(JsonEditorSchemaConstants.TYPE,
- JsonEditorSchemaConstants.TYPE_INTEGER);
- } else if (typeValue.equalsIgnoreCase(ToscaSchemaConstants.TYPE_LIST)) {
- childObject.put(JsonEditorSchemaConstants.TYPE,
- JsonEditorSchemaConstants.TYPE_ARRAY);
- // Custom key for JSON Editor and UI rendering
- childObject.put(JsonEditorSchemaConstants.CUSTOM_KEY_FORMAT,
- JsonEditorSchemaConstants.CUSTOM_KEY_FORMAT_TABS_TOP);
- childObject.put(JsonEditorSchemaConstants.UNIQUE_ITEMS,
- JsonEditorSchemaConstants.TRUE);
- } else if (typeValue.equalsIgnoreCase(ToscaSchemaConstants.TYPE_MAP)) {
- childObject.put(JsonEditorSchemaConstants.TYPE,
- JsonEditorSchemaConstants.TYPE_OBJECT);
- } else if (typeValue.contains(ToscaSchemaConstants.POLICY_DATA)) {
- JSONArray childArray = new JSONArray();
-
- if (jsonEntrySchema.get(typeValue) != null) {
- // Already traversed
- JSONObject entrySchemaObject = jsonEntrySchema.get(typeValue);
- attachTypeJsonObject(childObject, entrySchemaObject);
- } else if (dataNodes.containsKey(typeValue)) {
- JSONObject entrySchemaObject = new JSONObject();
- // Need to traverse
- JSONArray jsonArray = new JSONArray();
- ((LinkedHashMap<String, Object>) dataNodes.get(typeValue)).entrySet()
- .stream().forEach(pmap -> {
- if (pmap.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.PROPERTIES)) {
- parseToscaPropertiesForType(childObjectKey,
- (LinkedHashMap<String, Object>) pmap.getValue(),
- entrySchemaObject, childArray, jsonEntrySchema, dataNodes,
- true, incrementComplexSimpleTypeOrder());
- jsonEntrySchema.put(typeValue, entrySchemaObject);
- dataNodes.remove(typeValue);
- attachTypeJsonObject(childObject, entrySchemaObject);
- }
- });
- }
- } else {
- childObject.put(JsonEditorSchemaConstants.TYPE,
- JsonEditorSchemaConstants.TYPE_STRING);
- }
- }
- if (childNodeMap.get(ToscaSchemaConstants.DEFAULT) != null) {
- childObject.put(JsonEditorSchemaConstants.DEFAULT,
- childNodeMap.get(ToscaSchemaConstants.DEFAULT));
- }
- }
- }
-
- private void parseConstraints(LinkedHashMap<String, Object> childNodeMap,
- JSONObject childObject) {
- if (childNodeMap.containsKey(ToscaSchemaConstants.CONSTRAINTS)
- && childNodeMap.get(ToscaSchemaConstants.CONSTRAINTS) != null) {
- List<LinkedHashMap<String, Object>> constraintsList =
- (List<LinkedHashMap<String, Object>>) childNodeMap
- .get(ToscaSchemaConstants.CONSTRAINTS);
- constraintsList.stream().forEach(c -> {
- if (c instanceof Map) {
- c.entrySet().stream().forEach(constraint -> {
- if (constraint.getKey().equalsIgnoreCase(ToscaSchemaConstants.MIN_LENGTH)
- || constraint.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.GREATER_OR_EQUAL)) {
- // For String min_lenghth is minimum length whereas for number, it will
- // be
- // minimum or greater than to the defined value
- if (childNodeMap.containsKey(ToscaSchemaConstants.TYPE)
- && (childNodeMap.get(ToscaSchemaConstants.TYPE) instanceof String)
- && ((String) childNodeMap.get(ToscaSchemaConstants.TYPE))
- .equalsIgnoreCase(ToscaSchemaConstants.TYPE_STRING)) {
- childObject.put(JsonEditorSchemaConstants.MIN_LENGTH,
- constraint.getValue());
- } else {
- childObject.put(JsonEditorSchemaConstants.MINIMUM,
- constraint.getValue());
- }
- } else if (constraint.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.MAX_LENGTH)
- || constraint.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.LESS_OR_EQUAL)) {
- // For String max_lenghth is maximum length whereas for number, it will
- // be
- // maximum or less than the defined value
- if (childNodeMap.containsKey(ToscaSchemaConstants.TYPE)
- && (childNodeMap.get(ToscaSchemaConstants.TYPE) instanceof String)
- && ((String) childNodeMap.get(ToscaSchemaConstants.TYPE))
- .equalsIgnoreCase(ToscaSchemaConstants.TYPE_STRING)) {
- childObject.put(JsonEditorSchemaConstants.MAX_LENGTH,
- constraint.getValue());
- } else {
- childObject.put(JsonEditorSchemaConstants.MAXIMUM,
- constraint.getValue());
- }
- } else if (constraint.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.LESS_THAN)) {
- childObject.put(JsonEditorSchemaConstants.EXCLUSIVE_MAXIMUM,
- constraint.getValue());
- } else if (constraint.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.GREATER_THAN)) {
- childObject.put(JsonEditorSchemaConstants.EXCLUSIVE_MINIMUM,
- constraint.getValue());
- } else if (constraint.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.IN_RANGE)) {
- if (constraint.getValue() instanceof ArrayList<?>) {
- if (childNodeMap.containsKey(ToscaSchemaConstants.TYPE)
- && (childNodeMap
- .get(ToscaSchemaConstants.TYPE) instanceof String)
- && ((String) childNodeMap.get(ToscaSchemaConstants.TYPE))
- .equalsIgnoreCase(ToscaSchemaConstants.TYPE_STRING)) {
- childObject.put(JsonEditorSchemaConstants.MIN_LENGTH,
- ((ArrayList) constraint.getValue()).get(0));
- childObject.put(JsonEditorSchemaConstants.MAX_LENGTH,
- ((ArrayList) constraint.getValue()).get(1));
- } else {
- childObject.put(JsonEditorSchemaConstants.MINIMUM,
- ((ArrayList) constraint.getValue()).get(0));
- childObject.put(JsonEditorSchemaConstants.MAXIMUM,
- ((ArrayList) constraint.getValue()).get(1));
- }
-
- }
- } else if (constraint.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.VALID_VALUES)) {
- JSONArray validValuesArray = new JSONArray();
-
- if (constraint.getValue() instanceof ArrayList<?>) {
- boolean processDictionary =
- ((ArrayList<?>) constraint.getValue()).stream().anyMatch(
- value -> (value instanceof String && ((String) value)
- .contains(ToscaSchemaConstants.DICTIONARY)));
- if (!processDictionary) {
- ((ArrayList<?>) constraint.getValue()).stream()
- .forEach(value -> {
- validValuesArray.put(value);
- });
- childObject.put(JsonEditorSchemaConstants.ENUM,
- validValuesArray);
- } else {
- ((ArrayList<?>) constraint.getValue()).stream()
- .forEach(value -> {
- if ((value instanceof String && ((String) value)
- .contains(ToscaSchemaConstants.DICTIONARY))) {
- processDictionaryElements(childObject,
- (String) value);
- }
-
- });
-
- }
- }
-
- }
- });
- }
- });
- }
- }
-
- private void parseMetadataPossibleValues(LinkedHashMap<String, Object> childNodeMap,
- JSONObject childObject) {
- if (childNodeMap.containsKey(ToscaSchemaConstants.METADATA)
- && childNodeMap.get(ToscaSchemaConstants.METADATA) != null) {
- LinkedHashMap<String, Object> metadataMap =
- (LinkedHashMap<String, Object>) childNodeMap.get(ToscaSchemaConstants.METADATA);
- if (metadataMap instanceof Map) {
- metadataMap.entrySet().stream().forEach(constraint -> {
- if (constraint.getKey()
- .equalsIgnoreCase(ToscaSchemaConstants.METADATA_CLAMP_POSSIBLE_VALUES)) {
- JSONArray validValuesArray = new JSONArray();
-
- if (constraint.getValue() instanceof ArrayList<?>) {
- boolean processDictionary = ((ArrayList<?>) constraint.getValue())
- .stream().anyMatch(value -> (value instanceof String
- && ((String) value).contains(ToscaSchemaConstants.DICTIONARY)));
- if (processDictionary) {
- ((ArrayList<?>) constraint.getValue()).stream().forEach(value -> {
- if ((value instanceof String && ((String) value)
- .contains(ToscaSchemaConstants.DICTIONARY))) {
- processDictionaryElements(childObject, (String) value);
- }
-
- });
-
- }
- }
-
- }
- });
- }
- }
- }
-
- private void processDictionaryElements(JSONObject childObject, String dictionaryReference) {
- if (dictionaryReference.contains("#")) {
- String[] dictionaryKeyArray = dictionaryReference
- .substring(dictionaryReference.indexOf(ToscaSchemaConstants.DICTIONARY) + 11,
- dictionaryReference.length())
- .split("#");
- // We support only one # as of now.
- List<DictionaryElement> cldsDictionaryElements = null;
- List<DictionaryElement> subDictionaryElements = null;
- if (dictionaryKeyArray != null && dictionaryKeyArray.length == 2) {
- cldsDictionaryElements = dictionaryService.getDictionary(dictionaryKeyArray[0])
- .getDictionaryElements().stream().collect(Collectors.toList());
- subDictionaryElements = dictionaryService.getDictionary(dictionaryKeyArray[1])
- .getDictionaryElements().stream().collect(Collectors.toList());
-
- if (cldsDictionaryElements != null) {
- List<String> subCldsDictionaryNames = subDictionaryElements.stream()
- .map(DictionaryElement::getShortName).collect(Collectors.toList());
- JSONArray jsonArray = new JSONArray();
-
- Optional.ofNullable(cldsDictionaryElements).get().stream().forEach(c -> {
- JSONObject jsonObject = new JSONObject();
- if (c.getSubDictionary() != null) {
- Dictionary subDictionary =
- dictionaryService.getDictionary(c.getSubDictionary());
- if (subDictionary != null
- && !subDictionary.getDictionaryElements().isEmpty()) {
-
- jsonObject.put(JsonEditorSchemaConstants.CUSTOM_KEY_FORMAT_INPUT,
- JsonEditorSchemaConstants.FORMAT_SELECT);
-
- List<String> shortNames = new ArrayList<>();
- subDictionary.getDictionaryElements().stream().forEach(c1 -> {
- shortNames.add(c1.getShortName());
- });
- jsonObject.put(JsonEditorSchemaConstants.VALUES, shortNames);
- }
- }
- jsonObject.put(JsonEditorSchemaConstants.TYPE, getJsonType(c.getType()));
-
- if (c.getType() != null
- && (c.getType().equalsIgnoreCase(ToscaSchemaConstants.TYPE_STRING)
- || c.getType().equalsIgnoreCase(ToscaSchemaConstants.TYPE_DATE_TIME)
- || c.getType().equalsIgnoreCase(ToscaSchemaConstants.TYPE_MAP))) {
- jsonObject.put(JsonEditorSchemaConstants.MIN_LENGTH, 1);
-
- if (c.getType().equalsIgnoreCase(ToscaSchemaConstants.TYPE_DATE_TIME)) {
- jsonObject.put(JsonEditorSchemaConstants.PLUGIN,
- JsonEditorSchemaConstants.DATE_TIME_PICKER);
- jsonObject.put(JsonEditorSchemaConstants.INPUT_EVENT,
- JsonEditorSchemaConstants.DP_CHANGE);
- JSONObject formatJsonObject = new JSONObject();
- formatJsonObject.put(JsonEditorSchemaConstants.FORMAT,
- JsonEditorSchemaConstants.DATE_TIME_FORMAT);
- jsonObject.put(JsonEditorSchemaConstants.VALIDATION,
- formatJsonObject);
- }
- }
-
- jsonObject.put(JsonEditorSchemaConstants.ID, c.getName());
- jsonObject.put(JsonEditorSchemaConstants.LABEL, c.getShortName());
- jsonObject.put(JsonEditorSchemaConstants.OPERATORS, subCldsDictionaryNames);
- jsonArray.put(jsonObject);
- });;
- JSONObject filterObject = new JSONObject();
- filterObject.put(JsonEditorSchemaConstants.FILTERS, jsonArray);
-
- childObject.put(JsonEditorSchemaConstants.TYPE,
- JsonEditorSchemaConstants.TYPE_QBLDR);
- // TO invoke validation on such parameters
- childObject.put(JsonEditorSchemaConstants.MIN_LENGTH, 1);
- childObject.put(JsonEditorSchemaConstants.QSSCHEMA, filterObject);
-
- }
- }
- } else {
- String dictionaryKey = dictionaryReference.substring(
- dictionaryReference.indexOf(ToscaSchemaConstants.DICTIONARY) + 11,
- dictionaryReference.length());
-
- if (dictionaryKey != null) {
- if (dictionaryKey.contains(ToscaSchemaConstants.TYPE_USER_DEFINED)) {
- childObject.put(JsonEditorSchemaConstants.ENUM, new ArrayList<>());
- // Add Enum titles for generated translated values during
- // JSON instance generation
- JSONObject enumTitles = new JSONObject();
- enumTitles.put(JsonEditorSchemaConstants.ENUM_TITLES, new ArrayList<>());
- childObject.put(JsonEditorSchemaConstants.OPTIONS, enumTitles);
- } else {
- List<DictionaryElement> cldsDictionaryElements =
- dictionaryService.getDictionary(dictionaryKey).getDictionaryElements()
- .stream().collect(Collectors.toList());
- if (cldsDictionaryElements != null) {
- List<String> cldsDictionaryNames = new ArrayList<>();
- List<String> cldsDictionaryFullNames = new ArrayList<>();
- cldsDictionaryElements.stream().forEach(c -> {
- // Json type will be translated before Policy creation
- if (c.getType() != null && !c.getType().equalsIgnoreCase("json")) {
- cldsDictionaryFullNames.add(c.getName());
- }
- cldsDictionaryNames.add(c.getShortName());
- });
-
- if (!cldsDictionaryFullNames.isEmpty()) {
- childObject.put(JsonEditorSchemaConstants.ENUM,
- cldsDictionaryFullNames);
- // Add Enum titles for generated translated values during JSON instance
- // generation
- JSONObject enumTitles = new JSONObject();
- enumTitles.put(JsonEditorSchemaConstants.ENUM_TITLES,
- cldsDictionaryNames);
- childObject.put(JsonEditorSchemaConstants.OPTIONS, enumTitles);
- } else {
- childObject.put(JsonEditorSchemaConstants.ENUM, cldsDictionaryNames);
- }
-
- }
- }
- }
- }
- }
-
- private String getJsonType(String toscaType) {
- String jsonType = null;
- if (toscaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_INTEGER)
- || toscaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_NUMBER)) {
- jsonType = JsonEditorSchemaConstants.TYPE_INTEGER;
- } else if (toscaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_DATE_TIME)) {
- jsonType = JsonEditorSchemaConstants.TYPE_DATE_TIME;
- } else if (toscaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_LIST)) {
- jsonType = JsonEditorSchemaConstants.TYPE_ARRAY;
- } else if (toscaType.equalsIgnoreCase(ToscaSchemaConstants.TYPE_MAP)) {
- jsonType = JsonEditorSchemaConstants.TYPE_MAP;
- } else {
- jsonType = JsonEditorSchemaConstants.TYPE_STRING;
- }
- return jsonType;
- }
-
-}
diff --git a/src/main/java/org/onap/policy/clamp/clds/tosca/update/parser/metadata/ToscaMetadataParserWithDictionarySupport.java b/src/main/java/org/onap/policy/clamp/clds/tosca/update/parser/metadata/ToscaMetadataParserWithDictionarySupport.java
index 049018ae0..4e55263fb 100644
--- a/src/main/java/org/onap/policy/clamp/clds/tosca/update/parser/metadata/ToscaMetadataParserWithDictionarySupport.java
+++ b/src/main/java/org/onap/policy/clamp/clds/tosca/update/parser/metadata/ToscaMetadataParserWithDictionarySupport.java
@@ -78,7 +78,7 @@ public class ToscaMetadataParserWithDictionarySupport implements ToscaMetadataPa
processDictionaryElements(multipleValue, childObject, dictionaryService);
}
if (multipleValue.contains("ClampExecution:")) {
- executeClampProcess(multipleValue.replaceAll("ClampExecution:", ""), childObject,
+ executeClampProcess(multipleValue.replaceFirst("ClampExecution:", ""), childObject,
serviceModel, toscaMetadataExecutor);
}
}
diff --git a/src/main/java/org/onap/policy/clamp/loop/template/PolicyModelsService.java b/src/main/java/org/onap/policy/clamp/loop/template/PolicyModelsService.java
index fea58c552..2d31b3b10 100644
--- a/src/main/java/org/onap/policy/clamp/loop/template/PolicyModelsService.java
+++ b/src/main/java/org/onap/policy/clamp/loop/template/PolicyModelsService.java
@@ -24,16 +24,9 @@
package org.onap.policy.clamp.loop.template;
import com.google.gson.JsonObject;
-import java.util.ArrayList;
-import java.util.Collections;
import java.util.List;
-import org.onap.policy.clamp.clds.tosca.ToscaSchemaConstants;
-import org.onap.policy.clamp.clds.tosca.ToscaYamlToJsonConvertor;
import org.onap.policy.clamp.clds.tosca.update.ToscaConverterWithDictionarySupport;
-import org.onap.policy.clamp.clds.tosca.update.parser.ToscaConverterToJsonSchema;
-import org.onap.policy.clamp.clds.util.JsonUtils;
import org.onap.policy.clamp.policy.pdpgroup.PdpGroupsAnalyzer;
-import org.onap.policy.clamp.util.SemanticVersioning;
import org.onap.policy.models.pdp.concepts.PdpGroups;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -46,10 +39,6 @@ import org.springframework.transaction.annotation.Transactional;
@Service
public class PolicyModelsService {
private final PolicyModelsRepository policyModelsRepository;
- /**
- * This variable is there to support legacy saving of the tosca from the clamp UI.
- */
- private ToscaYamlToJsonConvertor toscaYamlToJsonConvertor;
/**
* This is the new tosca converter that must be used in clamp.
@@ -58,10 +47,8 @@ public class PolicyModelsService {
private ToscaConverterWithDictionarySupport toscaConverterWithDictionarySupport;
@Autowired
- public PolicyModelsService(PolicyModelsRepository policyModelrepo,
- ToscaYamlToJsonConvertor convertor) {
+ public PolicyModelsService(PolicyModelsRepository policyModelrepo) {
policyModelsRepository = policyModelrepo;
- toscaYamlToJsonConvertor = convertor;
}
/**
@@ -85,44 +72,6 @@ public class PolicyModelsService {
}
/**
- * Creates or updates the Tosca Policy Model.
- *
- * @param policyModelTosca The Policymodel object
- * @return The Policy Model created
- */
- public PolicyModel createNewPolicyModelFromTosca(String policyModelTosca) {
- JsonObject jsonObject = toscaYamlToJsonConvertor.validateAndConvertToJson(policyModelTosca);
- String policyModelTypeFromTosca = toscaYamlToJsonConvertor.getValueFromMetadata(jsonObject,
- ToscaSchemaConstants.METADATA_POLICY_MODEL_TYPE);
- Iterable<PolicyModel> models = getAllPolicyModelsByType(policyModelTypeFromTosca);
- Collections.sort((List<PolicyModel>) models);
- PolicyModel newPolicyModel = new PolicyModel(policyModelTypeFromTosca, policyModelTosca,
- SemanticVersioning.incrementMajorVersion(((ArrayList) models).isEmpty() ? null
- : ((ArrayList<PolicyModel>) models).get(0).getVersion()),
- toscaYamlToJsonConvertor.getValueFromMetadata(jsonObject,
- ToscaSchemaConstants.METADATA_ACRONYM));
- return saveOrUpdatePolicyModel(newPolicyModel);
- }
-
- /**
- * Update an existing Tosca Policy Model.
- *
- * @param policyModelType The policy Model type in Tosca yaml
- * @param policyModelVersion The policy Version to update
- * @param policyModelTosca The Policy Model tosca
- * @return The Policy Model updated
- */
- public PolicyModel updatePolicyModelTosca(String policyModelType, String policyModelVersion,
- String policyModelTosca) {
- JsonObject jsonObject = toscaYamlToJsonConvertor.validateAndConvertToJson(policyModelTosca);
- PolicyModel thePolicyModel = getPolicyModel(policyModelType, policyModelVersion);
- thePolicyModel.setPolicyAcronym(toscaYamlToJsonConvertor.getValueFromMetadata(jsonObject,
- ToscaSchemaConstants.METADATA_ACRONYM));
- thePolicyModel.setPolicyModelTosca(policyModelTosca);
- return saveOrUpdatePolicyModel(thePolicyModel);
- }
-
- /**
* This method retrieves the tosca model and convert it to a Json schema.
* That json schema is normally used by the UI.
*
diff --git a/src/main/resources/META-INF/resources/swagger.html b/src/main/resources/META-INF/resources/swagger.html
index 267cb509b..feb3b6edb 100644
--- a/src/main/resources/META-INF/resources/swagger.html
+++ b/src/main/resources/META-INF/resources/swagger.html
@@ -444,31 +444,31 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</li>
<li><a href="#_paths">2. Paths</a>
<ul class="sectlevel2">
-<li><a href="#_verb194">2.1. GET /v1/healthcheck</a>
+<li><a href="#_verb189">2.1. GET /v1/healthcheck</a>
<ul class="sectlevel3">
<li><a href="#_responses">2.1.1. Responses</a></li>
<li><a href="#_produces">2.1.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb195">2.2. GET /v1/user/getUser</a>
+<li><a href="#_verb190">2.2. GET /v1/user/getUser</a>
<ul class="sectlevel3">
<li><a href="#_responses_2">2.2.1. Responses</a></li>
<li><a href="#_produces_2">2.2.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb193">2.3. GET /v2/clampInformation</a>
+<li><a href="#_verb188">2.3. GET /v2/clampInformation</a>
<ul class="sectlevel3">
<li><a href="#_responses_3">2.3.1. Responses</a></li>
<li><a href="#_produces_3">2.3.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb177">2.4. GET /v2/dictionary</a>
+<li><a href="#_verb173">2.4. GET /v2/dictionary</a>
<ul class="sectlevel3">
<li><a href="#_responses_4">2.4.1. Responses</a></li>
<li><a href="#_produces_4">2.4.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb180">2.5. PUT /v2/dictionary</a>
+<li><a href="#_verb176">2.5. PUT /v2/dictionary</a>
<ul class="sectlevel3">
<li><a href="#_parameters">2.5.1. Parameters</a></li>
<li><a href="#_responses_5">2.5.2. Responses</a></li>
@@ -476,20 +476,20 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_5">2.5.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb178">2.6. GET /v2/dictionary/secondary/names</a>
+<li><a href="#_verb174">2.6. GET /v2/dictionary/secondary/names</a>
<ul class="sectlevel3">
<li><a href="#_responses_6">2.6.1. Responses</a></li>
<li><a href="#_produces_6">2.6.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb179">2.7. GET /v2/dictionary/{dictionaryName}</a>
+<li><a href="#_verb175">2.7. GET /v2/dictionary/{dictionaryName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_2">2.7.1. Parameters</a></li>
<li><a href="#_responses_7">2.7.2. Responses</a></li>
<li><a href="#_produces_7">2.7.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb181">2.8. PUT /v2/dictionary/{name}</a>
+<li><a href="#_verb177">2.8. PUT /v2/dictionary/{name}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_3">2.8.1. Parameters</a></li>
<li><a href="#_responses_8">2.8.2. Responses</a></li>
@@ -497,28 +497,28 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_8">2.8.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb182">2.9. DELETE /v2/dictionary/{name}</a>
+<li><a href="#_verb178">2.9. DELETE /v2/dictionary/{name}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_4">2.9.1. Parameters</a></li>
<li><a href="#_responses_9">2.9.2. Responses</a></li>
<li><a href="#_produces_9">2.9.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb183">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a>
+<li><a href="#_verb179">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_5">2.10.1. Parameters</a></li>
<li><a href="#_responses_10">2.10.2. Responses</a></li>
<li><a href="#_produces_10">2.10.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb171">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a>
+<li><a href="#_verb167">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_6">2.11.1. Parameters</a></li>
<li><a href="#_responses_11">2.11.2. Responses</a></li>
<li><a href="#_produces_11">2.11.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb173">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a>
+<li><a href="#_verb169">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_7">2.12.1. Parameters</a></li>
<li><a href="#_responses_12">2.12.2. Responses</a></li>
@@ -526,82 +526,82 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_12">2.12.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb169">2.13. PUT /v2/loop/delete/{loopName}</a>
+<li><a href="#_verb165">2.13. PUT /v2/loop/delete/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_8">2.13.1. Parameters</a></li>
<li><a href="#_responses_13">2.13.2. Responses</a></li>
</ul>
</li>
-<li><a href="#_verb162">2.14. PUT /v2/loop/deploy/{loopName}</a>
+<li><a href="#_verb158">2.14. PUT /v2/loop/deploy/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_9">2.14.1. Parameters</a></li>
<li><a href="#_responses_14">2.14.2. Responses</a></li>
<li><a href="#_produces_13">2.14.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb157">2.15. GET /v2/loop/getAllNames</a>
+<li><a href="#_verb153">2.15. GET /v2/loop/getAllNames</a>
<ul class="sectlevel3">
<li><a href="#_responses_15">2.15.1. Responses</a></li>
<li><a href="#_produces_14">2.15.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb170">2.16. GET /v2/loop/getstatus/{loopName}</a>
+<li><a href="#_verb166">2.16. GET /v2/loop/getstatus/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_10">2.16.1. Parameters</a></li>
<li><a href="#_responses_16">2.16.2. Responses</a></li>
<li><a href="#_produces_15">2.16.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb163">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a>
+<li><a href="#_verb159">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_11">2.17.1. Parameters</a></li>
<li><a href="#_responses_17">2.17.2. Responses</a></li>
<li><a href="#_produces_16">2.17.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb164">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a>
+<li><a href="#_verb160">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_12">2.18.1. Parameters</a></li>
<li><a href="#_responses_18">2.18.2. Responses</a></li>
<li><a href="#_produces_17">2.18.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb172">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a>
+<li><a href="#_verb168">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_13">2.19.1. Parameters</a></li>
<li><a href="#_responses_19">2.19.2. Responses</a></li>
<li><a href="#_produces_18">2.19.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb167">2.20. PUT /v2/loop/restart/{loopName}</a>
+<li><a href="#_verb163">2.20. PUT /v2/loop/restart/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_14">2.20.1. Parameters</a></li>
<li><a href="#_responses_20">2.20.2. Responses</a></li>
<li><a href="#_produces_19">2.20.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb166">2.21. PUT /v2/loop/stop/{loopName}</a>
+<li><a href="#_verb162">2.21. PUT /v2/loop/stop/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_15">2.21.1. Parameters</a></li>
<li><a href="#_responses_21">2.21.2. Responses</a></li>
<li><a href="#_produces_20">2.21.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb168">2.22. PUT /v2/loop/submit/{loopName}</a>
+<li><a href="#_verb164">2.22. PUT /v2/loop/submit/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_16">2.22.1. Parameters</a></li>
<li><a href="#_responses_22">2.22.2. Responses</a></li>
<li><a href="#_produces_21">2.22.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb165">2.23. PUT /v2/loop/undeploy/{loopName}</a>
+<li><a href="#_verb161">2.23. PUT /v2/loop/undeploy/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_17">2.23.1. Parameters</a></li>
<li><a href="#_responses_23">2.23.2. Responses</a></li>
<li><a href="#_produces_22">2.23.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb159">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a>
+<li><a href="#_verb155">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_18">2.24.1. Parameters</a></li>
<li><a href="#_responses_24">2.24.2. Responses</a></li>
@@ -609,7 +609,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_23">2.24.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb161">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
+<li><a href="#_verb157">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_19">2.25.1. Parameters</a></li>
<li><a href="#_responses_25">2.25.2. Responses</a></li>
@@ -617,7 +617,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_24">2.25.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb160">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
+<li><a href="#_verb156">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_20">2.26.1. Parameters</a></li>
<li><a href="#_responses_26">2.26.2. Responses</a></li>
@@ -625,93 +625,84 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<li><a href="#_produces_25">2.26.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb158">2.27. GET /v2/loop/{loopName}</a>
+<li><a href="#_verb154">2.27. GET /v2/loop/{loopName}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_21">2.27.1. Parameters</a></li>
<li><a href="#_responses_27">2.27.2. Responses</a></li>
<li><a href="#_produces_26">2.27.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb189">2.28. GET /v2/policies</a>
+<li><a href="#_verb183">2.28. GET /v2/policies</a>
<ul class="sectlevel3">
<li><a href="#_responses_28">2.28.1. Responses</a></li>
<li><a href="#_produces_27">2.28.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb192">2.29. PUT /v2/policies/pdpDeployment</a>
+<li><a href="#_verb186">2.29. PUT /v2/policies/pdpDeployment</a>
<ul class="sectlevel3">
<li><a href="#_parameters_22">2.29.1. Parameters</a></li>
<li><a href="#_responses_29">2.29.2. Responses</a></li>
<li><a href="#_consumes_7">2.29.3. Consumes</a></li>
</ul>
</li>
-<li><a href="#_verb190">2.30. POST /v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}</a>
+<li><a href="#_verb187">2.30. POST /v2/policies/policytype</a>
<ul class="sectlevel3">
<li><a href="#_parameters_23">2.30.1. Parameters</a></li>
<li><a href="#_responses_30">2.30.2. Responses</a></li>
<li><a href="#_consumes_8">2.30.3. Consumes</a></li>
-<li><a href="#_produces_28">2.30.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb191">2.31. DELETE /v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}</a>
+<li><a href="#_verb184">2.31. POST /v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_24">2.31.1. Parameters</a></li>
<li><a href="#_responses_31">2.31.2. Responses</a></li>
+<li><a href="#_consumes_9">2.31.3. Consumes</a></li>
+<li><a href="#_produces_28">2.31.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb187">2.32. POST /v2/policyToscaModels</a>
+<li><a href="#_verb185">2.32. DELETE /v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_25">2.32.1. Parameters</a></li>
<li><a href="#_responses_32">2.32.2. Responses</a></li>
-<li><a href="#_consumes_9">2.32.3. Consumes</a></li>
-<li><a href="#_produces_29">2.32.4. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb184">2.33. GET /v2/policyToscaModels</a>
+<li><a href="#_verb180">2.33. GET /v2/policyToscaModels</a>
<ul class="sectlevel3">
<li><a href="#_responses_33">2.33.1. Responses</a></li>
-<li><a href="#_produces_30">2.33.2. Produces</a></li>
+<li><a href="#_produces_29">2.33.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb186">2.34. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a>
+<li><a href="#_verb182">2.34. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_26">2.34.1. Parameters</a></li>
<li><a href="#_responses_34">2.34.2. Responses</a></li>
-<li><a href="#_produces_31">2.34.3. Produces</a></li>
+<li><a href="#_produces_30">2.34.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb185">2.35. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a>
+<li><a href="#_verb181">2.35. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a>
<ul class="sectlevel3">
<li><a href="#_parameters_27">2.35.1. Parameters</a></li>
<li><a href="#_responses_35">2.35.2. Responses</a></li>
-<li><a href="#_produces_32">2.35.3. Produces</a></li>
+<li><a href="#_produces_31">2.35.3. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb188">2.36. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a>
+<li><a href="#_verb170">2.36. GET /v2/templates</a>
<ul class="sectlevel3">
-<li><a href="#_parameters_28">2.36.1. Parameters</a></li>
-<li><a href="#_responses_36">2.36.2. Responses</a></li>
-<li><a href="#_consumes_10">2.36.3. Consumes</a></li>
-<li><a href="#_produces_33">2.36.4. Produces</a></li>
+<li><a href="#_responses_36">2.36.1. Responses</a></li>
+<li><a href="#_produces_32">2.36.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb174">2.37. GET /v2/templates</a>
+<li><a href="#_verb172">2.37. GET /v2/templates/names</a>
<ul class="sectlevel3">
<li><a href="#_responses_37">2.37.1. Responses</a></li>
-<li><a href="#_produces_34">2.37.2. Produces</a></li>
+<li><a href="#_produces_33">2.37.2. Produces</a></li>
</ul>
</li>
-<li><a href="#_verb176">2.38. GET /v2/templates/names</a>
+<li><a href="#_verb171">2.38. GET /v2/templates/{templateName}</a>
<ul class="sectlevel3">
-<li><a href="#_responses_38">2.38.1. Responses</a></li>
-<li><a href="#_produces_35">2.38.2. Produces</a></li>
-</ul>
-</li>
-<li><a href="#_verb175">2.39. GET /v2/templates/{templateName}</a>
-<ul class="sectlevel3">
-<li><a href="#_parameters_29">2.39.1. Parameters</a></li>
-<li><a href="#_responses_39">2.39.2. Responses</a></li>
-<li><a href="#_produces_36">2.39.3. Produces</a></li>
+<li><a href="#_parameters_28">2.38.1. Parameters</a></li>
+<li><a href="#_responses_38">2.38.2. Responses</a></li>
+<li><a href="#_produces_34">2.38.3. Produces</a></li>
</ul>
</li>
</ul>
@@ -751,13 +742,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div class="sect2">
<h3 id="_version_information"><a class="anchor" href="#_version_information"></a><a class="link" href="#_version_information">1.1. Version information</a></h3>
<div class="paragraph">
-<p><em>Version</em> : 6.1.0-SNAPSHOT</p>
+<p><em>Version</em> : 6.1.1-SNAPSHOT</p>
</div>
</div>
<div class="sect2">
<h3 id="_uri_scheme"><a class="anchor" href="#_uri_scheme"></a><a class="link" href="#_uri_scheme">1.2. URI scheme</a></h3>
<div class="paragraph">
-<p><em>Host</em> : localhost:40069<br>
+<p><em>Host</em> : localhost:37747<br>
<em>BasePath</em> : /restservices/clds/<br>
<em>Schemes</em> : HTTP</p>
</div>
@@ -768,7 +759,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<h2 id="_paths"><a class="anchor" href="#_paths"></a><a class="link" href="#_paths">2. Paths</a></h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_verb194"><a class="anchor" href="#_verb194"></a><a class="link" href="#_verb194">2.1. GET /v1/healthcheck</a></h3>
+<h3 id="_verb189"><a class="anchor" href="#_verb189"></a><a class="link" href="#_verb189">2.1. GET /v1/healthcheck</a></h3>
<div class="sect3">
<h4 id="_responses"><a class="anchor" href="#_responses"></a><a class="link" href="#_responses">2.1.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -805,7 +796,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb195"><a class="anchor" href="#_verb195"></a><a class="link" href="#_verb195">2.2. GET /v1/user/getUser</a></h3>
+<h3 id="_verb190"><a class="anchor" href="#_verb190"></a><a class="link" href="#_verb190">2.2. GET /v1/user/getUser</a></h3>
<div class="sect3">
<h4 id="_responses_2"><a class="anchor" href="#_responses_2"></a><a class="link" href="#_responses_2">2.2.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -839,7 +830,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb193"><a class="anchor" href="#_verb193"></a><a class="link" href="#_verb193">2.3. GET /v2/clampInformation</a></h3>
+<h3 id="_verb188"><a class="anchor" href="#_verb188"></a><a class="link" href="#_verb188">2.3. GET /v2/clampInformation</a></h3>
<div class="sect3">
<h4 id="_responses_3"><a class="anchor" href="#_responses_3"></a><a class="link" href="#_responses_3">2.3.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -876,7 +867,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb177"><a class="anchor" href="#_verb177"></a><a class="link" href="#_verb177">2.4. GET /v2/dictionary</a></h3>
+<h3 id="_verb173"><a class="anchor" href="#_verb173"></a><a class="link" href="#_verb173">2.4. GET /v2/dictionary</a></h3>
<div class="sect3">
<h4 id="_responses_4"><a class="anchor" href="#_responses_4"></a><a class="link" href="#_responses_4">2.4.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -913,7 +904,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb180"><a class="anchor" href="#_verb180"></a><a class="link" href="#_verb180">2.5. PUT /v2/dictionary</a></h3>
+<h3 id="_verb176"><a class="anchor" href="#_verb176"></a><a class="link" href="#_verb176">2.5. PUT /v2/dictionary</a></h3>
<div class="sect3">
<h4 id="_parameters"><a class="anchor" href="#_parameters"></a><a class="link" href="#_parameters">2.5.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -985,7 +976,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb178"><a class="anchor" href="#_verb178"></a><a class="link" href="#_verb178">2.6. GET /v2/dictionary/secondary/names</a></h3>
+<h3 id="_verb174"><a class="anchor" href="#_verb174"></a><a class="link" href="#_verb174">2.6. GET /v2/dictionary/secondary/names</a></h3>
<div class="sect3">
<h4 id="_responses_6"><a class="anchor" href="#_responses_6"></a><a class="link" href="#_responses_6">2.6.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1022,7 +1013,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb179"><a class="anchor" href="#_verb179"></a><a class="link" href="#_verb179">2.7. GET /v2/dictionary/{dictionaryName}</a></h3>
+<h3 id="_verb175"><a class="anchor" href="#_verb175"></a><a class="link" href="#_verb175">2.7. GET /v2/dictionary/{dictionaryName}</a></h3>
<div class="sect3">
<h4 id="_parameters_2"><a class="anchor" href="#_parameters_2"></a><a class="link" href="#_parameters_2">2.7.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1084,7 +1075,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb181"><a class="anchor" href="#_verb181"></a><a class="link" href="#_verb181">2.8. PUT /v2/dictionary/{name}</a></h3>
+<h3 id="_verb177"><a class="anchor" href="#_verb177"></a><a class="link" href="#_verb177">2.8. PUT /v2/dictionary/{name}</a></h3>
<div class="sect3">
<h4 id="_parameters_3"><a class="anchor" href="#_parameters_3"></a><a class="link" href="#_parameters_3">2.8.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1162,7 +1153,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb182"><a class="anchor" href="#_verb182"></a><a class="link" href="#_verb182">2.9. DELETE /v2/dictionary/{name}</a></h3>
+<h3 id="_verb178"><a class="anchor" href="#_verb178"></a><a class="link" href="#_verb178">2.9. DELETE /v2/dictionary/{name}</a></h3>
<div class="sect3">
<h4 id="_parameters_4"><a class="anchor" href="#_parameters_4"></a><a class="link" href="#_parameters_4">2.9.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1221,7 +1212,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb183"><a class="anchor" href="#_verb183"></a><a class="link" href="#_verb183">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a></h3>
+<h3 id="_verb179"><a class="anchor" href="#_verb179"></a><a class="link" href="#_verb179">2.10. DELETE /v2/dictionary/{name}/elements/{shortName}</a></h3>
<div class="sect3">
<h4 id="_parameters_5"><a class="anchor" href="#_parameters_5"></a><a class="link" href="#_parameters_5">2.10.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1286,7 +1277,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb171"><a class="anchor" href="#_verb171"></a><a class="link" href="#_verb171">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3>
+<h3 id="_verb167"><a class="anchor" href="#_verb167"></a><a class="link" href="#_verb167">2.11. PUT /v2/loop/addOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}</a></h3>
<div class="sect3">
<h4 id="_parameters_6"><a class="anchor" href="#_parameters_6"></a><a class="link" href="#_parameters_6">2.11.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1360,7 +1351,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb173"><a class="anchor" href="#_verb173"></a><a class="link" href="#_verb173">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a></h3>
+<h3 id="_verb169"><a class="anchor" href="#_verb169"></a><a class="link" href="#_verb169">2.12. POST /v2/loop/create/{loopName}?templateName={templateName}</a></h3>
<div class="sect3">
<h4 id="_parameters_7"><a class="anchor" href="#_parameters_7"></a><a class="link" href="#_parameters_7">2.12.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1438,7 +1429,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb169"><a class="anchor" href="#_verb169"></a><a class="link" href="#_verb169">2.13. PUT /v2/loop/delete/{loopName}</a></h3>
+<h3 id="_verb165"><a class="anchor" href="#_verb165"></a><a class="link" href="#_verb165">2.13. PUT /v2/loop/delete/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_8"><a class="anchor" href="#_parameters_8"></a><a class="link" href="#_parameters_8">2.13.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1487,7 +1478,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb162"><a class="anchor" href="#_verb162"></a><a class="link" href="#_verb162">2.14. PUT /v2/loop/deploy/{loopName}</a></h3>
+<h3 id="_verb158"><a class="anchor" href="#_verb158"></a><a class="link" href="#_verb158">2.14. PUT /v2/loop/deploy/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_9"><a class="anchor" href="#_parameters_9"></a><a class="link" href="#_parameters_9">2.14.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1549,7 +1540,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb157"><a class="anchor" href="#_verb157"></a><a class="link" href="#_verb157">2.15. GET /v2/loop/getAllNames</a></h3>
+<h3 id="_verb153"><a class="anchor" href="#_verb153"></a><a class="link" href="#_verb153">2.15. GET /v2/loop/getAllNames</a></h3>
<div class="sect3">
<h4 id="_responses_15"><a class="anchor" href="#_responses_15"></a><a class="link" href="#_responses_15">2.15.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1586,7 +1577,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb170"><a class="anchor" href="#_verb170"></a><a class="link" href="#_verb170">2.16. GET /v2/loop/getstatus/{loopName}</a></h3>
+<h3 id="_verb166"><a class="anchor" href="#_verb166"></a><a class="link" href="#_verb166">2.16. GET /v2/loop/getstatus/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_10"><a class="anchor" href="#_parameters_10"></a><a class="link" href="#_parameters_10">2.16.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1648,7 +1639,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb163"><a class="anchor" href="#_verb163"></a><a class="link" href="#_verb163">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a></h3>
+<h3 id="_verb159"><a class="anchor" href="#_verb159"></a><a class="link" href="#_verb159">2.17. PUT /v2/loop/refreshMicroServicePolicyJsonSchema/{loopName}/{microServicePolicyName}</a></h3>
<div class="sect3">
<h4 id="_parameters_11"><a class="anchor" href="#_parameters_11"></a><a class="link" href="#_parameters_11">2.17.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1716,7 +1707,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb164"><a class="anchor" href="#_verb164"></a><a class="link" href="#_verb164">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a></h3>
+<h3 id="_verb160"><a class="anchor" href="#_verb160"></a><a class="link" href="#_verb160">2.18. PUT /v2/loop/refreshOperationalPolicyJsonSchema/{loopName}/{operationalPolicyName}</a></h3>
<div class="sect3">
<h4 id="_parameters_12"><a class="anchor" href="#_parameters_12"></a><a class="link" href="#_parameters_12">2.18.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1784,7 +1775,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb172"><a class="anchor" href="#_verb172"></a><a class="link" href="#_verb172">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a></h3>
+<h3 id="_verb168"><a class="anchor" href="#_verb168"></a><a class="link" href="#_verb168">2.19. PUT /v2/loop/removeOperationaPolicy/{loopName}/policyModel/{policyType}/{policyVersion}/{policyName}</a></h3>
<div class="sect3">
<h4 id="_parameters_13"><a class="anchor" href="#_parameters_13"></a><a class="link" href="#_parameters_13">2.19.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1864,7 +1855,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb167"><a class="anchor" href="#_verb167"></a><a class="link" href="#_verb167">2.20. PUT /v2/loop/restart/{loopName}</a></h3>
+<h3 id="_verb163"><a class="anchor" href="#_verb163"></a><a class="link" href="#_verb163">2.20. PUT /v2/loop/restart/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_14"><a class="anchor" href="#_parameters_14"></a><a class="link" href="#_parameters_14">2.20.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1926,7 +1917,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb166"><a class="anchor" href="#_verb166"></a><a class="link" href="#_verb166">2.21. PUT /v2/loop/stop/{loopName}</a></h3>
+<h3 id="_verb162"><a class="anchor" href="#_verb162"></a><a class="link" href="#_verb162">2.21. PUT /v2/loop/stop/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_15"><a class="anchor" href="#_parameters_15"></a><a class="link" href="#_parameters_15">2.21.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -1988,7 +1979,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb168"><a class="anchor" href="#_verb168"></a><a class="link" href="#_verb168">2.22. PUT /v2/loop/submit/{loopName}</a></h3>
+<h3 id="_verb164"><a class="anchor" href="#_verb164"></a><a class="link" href="#_verb164">2.22. PUT /v2/loop/submit/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_16"><a class="anchor" href="#_parameters_16"></a><a class="link" href="#_parameters_16">2.22.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2050,7 +2041,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb165"><a class="anchor" href="#_verb165"></a><a class="link" href="#_verb165">2.23. PUT /v2/loop/undeploy/{loopName}</a></h3>
+<h3 id="_verb161"><a class="anchor" href="#_verb161"></a><a class="link" href="#_verb161">2.23. PUT /v2/loop/undeploy/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_17"><a class="anchor" href="#_parameters_17"></a><a class="link" href="#_parameters_17">2.23.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2112,7 +2103,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb159"><a class="anchor" href="#_verb159"></a><a class="link" href="#_verb159">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
+<h3 id="_verb155"><a class="anchor" href="#_verb155"></a><a class="link" href="#_verb155">2.24. POST /v2/loop/updateGlobalProperties/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_18"><a class="anchor" href="#_parameters_18"></a><a class="link" href="#_parameters_18">2.24.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2190,7 +2181,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb161"><a class="anchor" href="#_verb161"></a><a class="link" href="#_verb161">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
+<h3 id="_verb157"><a class="anchor" href="#_verb157"></a><a class="link" href="#_verb157">2.25. POST /v2/loop/updateMicroservicePolicy/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_19"><a class="anchor" href="#_parameters_19"></a><a class="link" href="#_parameters_19">2.25.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2268,7 +2259,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb160"><a class="anchor" href="#_verb160"></a><a class="link" href="#_verb160">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
+<h3 id="_verb156"><a class="anchor" href="#_verb156"></a><a class="link" href="#_verb156">2.26. POST /v2/loop/updateOperationalPolicies/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_20"><a class="anchor" href="#_parameters_20"></a><a class="link" href="#_parameters_20">2.26.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2346,7 +2337,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb158"><a class="anchor" href="#_verb158"></a><a class="link" href="#_verb158">2.27. GET /v2/loop/{loopName}</a></h3>
+<h3 id="_verb154"><a class="anchor" href="#_verb154"></a><a class="link" href="#_verb154">2.27. GET /v2/loop/{loopName}</a></h3>
<div class="sect3">
<h4 id="_parameters_21"><a class="anchor" href="#_parameters_21"></a><a class="link" href="#_parameters_21">2.27.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2408,7 +2399,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb189"><a class="anchor" href="#_verb189"></a><a class="link" href="#_verb189">2.28. GET /v2/policies</a></h3>
+<h3 id="_verb183"><a class="anchor" href="#_verb183"></a><a class="link" href="#_verb183">2.28. GET /v2/policies</a></h3>
<div class="sect3">
<h4 id="_responses_28"><a class="anchor" href="#_responses_28"></a><a class="link" href="#_responses_28">2.28.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2445,7 +2436,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb192"><a class="anchor" href="#_verb192"></a><a class="link" href="#_verb192">2.29. PUT /v2/policies/pdpDeployment</a></h3>
+<h3 id="_verb186"><a class="anchor" href="#_verb186"></a><a class="link" href="#_verb186">2.29. PUT /v2/policies/pdpDeployment</a></h3>
<div class="sect3">
<h4 id="_parameters_22"><a class="anchor" href="#_parameters_22"></a><a class="link" href="#_parameters_22">2.29.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2504,7 +2495,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb190"><a class="anchor" href="#_verb190"></a><a class="link" href="#_verb190">2.30. POST /v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}</a></h3>
+<h3 id="_verb187"><a class="anchor" href="#_verb187"></a><a class="link" href="#_verb187">2.30. POST /v2/policies/policytype</a></h3>
<div class="sect3">
<h4 id="_parameters_23"><a class="anchor" href="#_parameters_23"></a><a class="link" href="#_parameters_23">2.30.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2522,34 +2513,10 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</thead>
<tbody>
<tr>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Path</strong></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyModelType</strong><br>
-<em>required</em></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Path</strong></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyModelVersion</strong><br>
-<em>required</em></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Path</strong></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyName</strong><br>
-<em>required</em></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
-</tr>
-<tr>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Path</strong></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyVersion</strong><br>
-<em>required</em></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
-</tr>
-<tr>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Body</strong></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>body</strong><br>
<em>required</em></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonelement">JsonElement</a></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
</tr>
</tbody>
</table>
@@ -2558,22 +2525,19 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<h4 id="_responses_30"><a class="anchor" href="#_responses_30"></a><a class="link" href="#_responses_30">2.30.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
-<col style="width: 10%;">
-<col style="width: 70%;">
-<col style="width: 20%;">
+<col style="width: 33.3333%;">
+<col style="width: 66.6667%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-middle">HTTP Code</th>
-<th class="tableblock halign-left valign-middle">Description</th>
<th class="tableblock halign-left valign-middle">Schema</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">Output type</p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonobject">JsonObject</a></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">No Content</p></td>
</tr>
</tbody>
</table>
@@ -2583,24 +2547,14 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<div class="ulist">
<ul>
<li>
-<p><code>application/json</code></p>
-</li>
-</ul>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_produces_28"><a class="anchor" href="#_produces_28"></a><a class="link" href="#_produces_28">2.30.4. Produces</a></h4>
-<div class="ulist">
-<ul>
-<li>
-<p><code>application/json</code></p>
+<p><code>plain/text</code></p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect2">
-<h3 id="_verb191"><a class="anchor" href="#_verb191"></a><a class="link" href="#_verb191">2.31. DELETE /v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}</a></h3>
+<h3 id="_verb184"><a class="anchor" href="#_verb184"></a><a class="link" href="#_verb184">2.31. POST /v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}</a></h3>
<div class="sect3">
<h4 id="_parameters_24"><a class="anchor" href="#_parameters_24"></a><a class="link" href="#_parameters_24">2.31.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
@@ -2641,60 +2595,17 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<em>required</em></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
</tr>
-</tbody>
-</table>
-</div>
-<div class="sect3">
-<h4 id="_responses_31"><a class="anchor" href="#_responses_31"></a><a class="link" href="#_responses_31">2.31.2. Responses</a></h4>
-<table class="tableblock frame-all grid-all stretch">
-<colgroup>
-<col style="width: 33.3333%;">
-<col style="width: 66.6667%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-middle">HTTP Code</th>
-<th class="tableblock halign-left valign-middle">Schema</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">No Content</p></td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
-<div class="sect2">
-<h3 id="_verb187"><a class="anchor" href="#_verb187"></a><a class="link" href="#_verb187">2.32. POST /v2/policyToscaModels</a></h3>
-<div class="sect3">
-<h4 id="_parameters_25"><a class="anchor" href="#_parameters_25"></a><a class="link" href="#_parameters_25">2.32.1. Parameters</a></h4>
-<table class="tableblock frame-all grid-all stretch">
-<colgroup>
-<col style="width: 22.2222%;">
-<col style="width: 33.3333%;">
-<col style="width: 44.4445%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-middle">Type</th>
-<th class="tableblock halign-left valign-middle">Name</th>
-<th class="tableblock halign-left valign-middle">Schema</th>
-</tr>
-</thead>
-<tbody>
<tr>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Body</strong></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>body</strong><br>
<em>required</em></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonelement">JsonElement</a></p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
-<h4 id="_responses_32"><a class="anchor" href="#_responses_32"></a><a class="link" href="#_responses_32">2.32.2. Responses</a></h4>
+<h4 id="_responses_31"><a class="anchor" href="#_responses_31"></a><a class="link" href="#_responses_31">2.31.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2712,23 +2623,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<tr>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">Output type</p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_policymodel">PolicyModel</a></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonobject">JsonObject</a></p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
-<h4 id="_consumes_9"><a class="anchor" href="#_consumes_9"></a><a class="link" href="#_consumes_9">2.32.3. Consumes</a></h4>
-<div class="ulist">
-<ul>
-<li>
-<p><code>plain/text</code></p>
-</li>
-</ul>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_produces_29"><a class="anchor" href="#_produces_29"></a><a class="link" href="#_produces_29">2.32.4. Produces</a></h4>
+<h4 id="_consumes_9"><a class="anchor" href="#_consumes_9"></a><a class="link" href="#_consumes_9">2.31.3. Consumes</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2737,35 +2638,8 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</ul>
</div>
</div>
-</div>
-<div class="sect2">
-<h3 id="_verb184"><a class="anchor" href="#_verb184"></a><a class="link" href="#_verb184">2.33. GET /v2/policyToscaModels</a></h3>
-<div class="sect3">
-<h4 id="_responses_33"><a class="anchor" href="#_responses_33"></a><a class="link" href="#_responses_33">2.33.1. Responses</a></h4>
-<table class="tableblock frame-all grid-all stretch">
-<colgroup>
-<col style="width: 10%;">
-<col style="width: 70%;">
-<col style="width: 20%;">
-</colgroup>
-<thead>
-<tr>
-<th class="tableblock halign-left valign-middle">HTTP Code</th>
-<th class="tableblock halign-left valign-middle">Description</th>
-<th class="tableblock halign-left valign-middle">Schema</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">Output type</p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_policymodel">PolicyModel</a></p></td>
-</tr>
-</tbody>
-</table>
-</div>
<div class="sect3">
-<h4 id="_produces_30"><a class="anchor" href="#_produces_30"></a><a class="link" href="#_produces_30">2.33.2. Produces</a></h4>
+<h4 id="_produces_28"><a class="anchor" href="#_produces_28"></a><a class="link" href="#_produces_28">2.31.4. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2776,9 +2650,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb186"><a class="anchor" href="#_verb186"></a><a class="link" href="#_verb186">2.34. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a></h3>
+<h3 id="_verb185"><a class="anchor" href="#_verb185"></a><a class="link" href="#_verb185">2.32. DELETE /v2/policies/{policyModelType}/{policyModelVersion}/{policyName}/{policyVersion}</a></h3>
<div class="sect3">
-<h4 id="_parameters_26"><a class="anchor" href="#_parameters_26"></a><a class="link" href="#_parameters_26">2.34.1. Parameters</a></h4>
+<h4 id="_parameters_25"><a class="anchor" href="#_parameters_25"></a><a class="link" href="#_parameters_25">2.32.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
@@ -2805,11 +2679,47 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<em>required</em></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Path</strong></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyName</strong><br>
+<em>required</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Path</strong></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>policyVersion</strong><br>
+<em>required</em></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+</tr>
</tbody>
</table>
</div>
<div class="sect3">
-<h4 id="_responses_34"><a class="anchor" href="#_responses_34"></a><a class="link" href="#_responses_34">2.34.2. Responses</a></h4>
+<h4 id="_responses_32"><a class="anchor" href="#_responses_32"></a><a class="link" href="#_responses_32">2.32.2. Responses</a></h4>
+<table class="tableblock frame-all grid-all stretch">
+<colgroup>
+<col style="width: 33.3333%;">
+<col style="width: 66.6667%;">
+</colgroup>
+<thead>
+<tr>
+<th class="tableblock halign-left valign-middle">HTTP Code</th>
+<th class="tableblock halign-left valign-middle">Schema</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">No Content</p></td>
+</tr>
+</tbody>
+</table>
+</div>
+</div>
+<div class="sect2">
+<h3 id="_verb180"><a class="anchor" href="#_verb180"></a><a class="link" href="#_verb180">2.33. GET /v2/policyToscaModels</a></h3>
+<div class="sect3">
+<h4 id="_responses_33"><a class="anchor" href="#_responses_33"></a><a class="link" href="#_responses_33">2.33.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2827,13 +2737,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<tr>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">Output type</p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_policymodel">PolicyModel</a></p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
-<h4 id="_produces_31"><a class="anchor" href="#_produces_31"></a><a class="link" href="#_produces_31">2.34.3. Produces</a></h4>
+<h4 id="_produces_29"><a class="anchor" href="#_produces_29"></a><a class="link" href="#_produces_29">2.33.2. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2844,9 +2754,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb185"><a class="anchor" href="#_verb185"></a><a class="link" href="#_verb185">2.35. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3>
+<h3 id="_verb182"><a class="anchor" href="#_verb182"></a><a class="link" href="#_verb182">2.34. GET /v2/policyToscaModels/yaml/{policyModelType}/{policyModelVersion}</a></h3>
<div class="sect3">
-<h4 id="_parameters_27"><a class="anchor" href="#_parameters_27"></a><a class="link" href="#_parameters_27">2.35.1. Parameters</a></h4>
+<h4 id="_parameters_26"><a class="anchor" href="#_parameters_26"></a><a class="link" href="#_parameters_26">2.34.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
@@ -2877,7 +2787,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_responses_35"><a class="anchor" href="#_responses_35"></a><a class="link" href="#_responses_35">2.35.2. Responses</a></h4>
+<h4 id="_responses_34"><a class="anchor" href="#_responses_34"></a><a class="link" href="#_responses_34">2.34.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2895,13 +2805,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<tr>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">Output type</p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonobject">JsonObject</a></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
-<h4 id="_produces_32"><a class="anchor" href="#_produces_32"></a><a class="link" href="#_produces_32">2.35.3. Produces</a></h4>
+<h4 id="_produces_30"><a class="anchor" href="#_produces_30"></a><a class="link" href="#_produces_30">2.34.3. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2912,9 +2822,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb188"><a class="anchor" href="#_verb188"></a><a class="link" href="#_verb188">2.36. PUT /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3>
+<h3 id="_verb181"><a class="anchor" href="#_verb181"></a><a class="link" href="#_verb181">2.35. GET /v2/policyToscaModels/{policyModelType}/{policyModelVersion}</a></h3>
<div class="sect3">
-<h4 id="_parameters_28"><a class="anchor" href="#_parameters_28"></a><a class="link" href="#_parameters_28">2.36.1. Parameters</a></h4>
+<h4 id="_parameters_27"><a class="anchor" href="#_parameters_27"></a><a class="link" href="#_parameters_27">2.35.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
@@ -2941,17 +2851,11 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<em>required</em></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
</tr>
-<tr>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>Body</strong></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>body</strong><br>
-<em>required</em></p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock">string</p></td>
-</tr>
</tbody>
</table>
</div>
<div class="sect3">
-<h4 id="_responses_36"><a class="anchor" href="#_responses_36"></a><a class="link" href="#_responses_36">2.36.2. Responses</a></h4>
+<h4 id="_responses_35"><a class="anchor" href="#_responses_35"></a><a class="link" href="#_responses_35">2.35.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -2969,23 +2873,13 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
<tr>
<td class="tableblock halign-left valign-middle"><p class="tableblock"><strong>200</strong></p></td>
<td class="tableblock halign-left valign-middle"><p class="tableblock">Output type</p></td>
-<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_policymodel">PolicyModel</a></p></td>
+<td class="tableblock halign-left valign-middle"><p class="tableblock"><a href="#_jsonobject">JsonObject</a></p></td>
</tr>
</tbody>
</table>
</div>
<div class="sect3">
-<h4 id="_consumes_10"><a class="anchor" href="#_consumes_10"></a><a class="link" href="#_consumes_10">2.36.3. Consumes</a></h4>
-<div class="ulist">
-<ul>
-<li>
-<p><code>plain/text</code></p>
-</li>
-</ul>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_produces_33"><a class="anchor" href="#_produces_33"></a><a class="link" href="#_produces_33">2.36.4. Produces</a></h4>
+<h4 id="_produces_31"><a class="anchor" href="#_produces_31"></a><a class="link" href="#_produces_31">2.35.3. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -2996,9 +2890,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb174"><a class="anchor" href="#_verb174"></a><a class="link" href="#_verb174">2.37. GET /v2/templates</a></h3>
+<h3 id="_verb170"><a class="anchor" href="#_verb170"></a><a class="link" href="#_verb170">2.36. GET /v2/templates</a></h3>
<div class="sect3">
-<h4 id="_responses_37"><a class="anchor" href="#_responses_37"></a><a class="link" href="#_responses_37">2.37.1. Responses</a></h4>
+<h4 id="_responses_36"><a class="anchor" href="#_responses_36"></a><a class="link" href="#_responses_36">2.36.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -3022,7 +2916,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_produces_34"><a class="anchor" href="#_produces_34"></a><a class="link" href="#_produces_34">2.37.2. Produces</a></h4>
+<h4 id="_produces_32"><a class="anchor" href="#_produces_32"></a><a class="link" href="#_produces_32">2.36.2. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -3033,9 +2927,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb176"><a class="anchor" href="#_verb176"></a><a class="link" href="#_verb176">2.38. GET /v2/templates/names</a></h3>
+<h3 id="_verb172"><a class="anchor" href="#_verb172"></a><a class="link" href="#_verb172">2.37. GET /v2/templates/names</a></h3>
<div class="sect3">
-<h4 id="_responses_38"><a class="anchor" href="#_responses_38"></a><a class="link" href="#_responses_38">2.38.1. Responses</a></h4>
+<h4 id="_responses_37"><a class="anchor" href="#_responses_37"></a><a class="link" href="#_responses_37">2.37.1. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -3059,7 +2953,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_produces_35"><a class="anchor" href="#_produces_35"></a><a class="link" href="#_produces_35">2.38.2. Produces</a></h4>
+<h4 id="_produces_33"><a class="anchor" href="#_produces_33"></a><a class="link" href="#_produces_33">2.37.2. Produces</a></h4>
<div class="ulist">
<ul>
<li>
@@ -3070,9 +2964,9 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</div>
</div>
<div class="sect2">
-<h3 id="_verb175"><a class="anchor" href="#_verb175"></a><a class="link" href="#_verb175">2.39. GET /v2/templates/{templateName}</a></h3>
+<h3 id="_verb171"><a class="anchor" href="#_verb171"></a><a class="link" href="#_verb171">2.38. GET /v2/templates/{templateName}</a></h3>
<div class="sect3">
-<h4 id="_parameters_29"><a class="anchor" href="#_parameters_29"></a><a class="link" href="#_parameters_29">2.39.1. Parameters</a></h4>
+<h4 id="_parameters_28"><a class="anchor" href="#_parameters_28"></a><a class="link" href="#_parameters_28">2.38.1. Parameters</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 22.2222%;">
@@ -3097,7 +2991,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_responses_39"><a class="anchor" href="#_responses_39"></a><a class="link" href="#_responses_39">2.39.2. Responses</a></h4>
+<h4 id="_responses_38"><a class="anchor" href="#_responses_38"></a><a class="link" href="#_responses_38">2.38.2. Responses</a></h4>
<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 10%;">
@@ -3121,7 +3015,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b
</table>
</div>
<div class="sect3">
-<h4 id="_produces_36"><a class="anchor" href="#_produces_36"></a><a class="link" href="#_produces_36">2.39.3. Produces</a></h4>
+<h4 id="_produces_34"><a class="anchor" href="#_produces_34"></a><a class="link" href="#_produces_34">2.38.3. Produces</a></h4>
<div class="ulist">
<ul>
<li>
diff --git a/src/main/resources/clds/camel/rest/clamp-api-v2.xml b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
index c789735d2..4659a90bf 100644
--- a/src/main/resources/clds/camel/rest/clamp-api-v2.xml
+++ b/src/main/resources/clds/camel/rest/clamp-api-v2.xml
@@ -1232,82 +1232,6 @@
</route>
</get>
- <post uri="/v2/policyToscaModels"
- type="java.lang.String"
- outType="org.onap.policy.clamp.loop.template.PolicyModel"
- consumes="plain/text" produces="application/json">
- <route>
- <removeHeaders pattern="*"/>
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')"/>
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/>
- <setProperty name="PolicyModelTosca">
- <simple>${body}</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=createNewPolicyModelFromTosca(${exchangeProperty[PolicyModelTosca]})"/>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
- <log loggingLevel="ERROR"
- message="POST Policy Model YAML request failed: ${exception.stacktrace}"/>
- <setHeader name="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>POST Policy model YAML FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </post>
- <put uri="/v2/policyToscaModels/{policyModelType}/{policyModelVersion}"
- type="java.lang.String"
- outType="org.onap.policy.clamp.loop.template.PolicyModel"
- consumes="plain/text" produces="application/json">
- <route>
- <removeHeaders pattern="*"
- excludePattern="policyModelType|policyModelVersion"/>
- <doTry>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=startLog(*, 'Upload New or Update Tosca Policy Model')"/>
- <to
- uri="bean:org.onap.policy.clamp.authorization.AuthorizationController?method=authorize(*,'tosca','','update')"/>
- <setProperty name="PolicyModelTosca">
- <simple>${body}</simple>
- </setProperty>
- <to
- uri="bean:org.onap.policy.clamp.loop.template.PolicyModelsService?method=updatePolicyModelTosca(${header.policyModelType},${policyModelVersion},${exchangeProperty[PolicyModelTosca]})"/>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=endLog()"/>
- <doCatch>
- <exception>java.lang.Exception</exception>
- <handled>
- <constant>true</constant>
- </handled>
- <to
- uri="bean:org.onap.policy.clamp.flow.log.FlowLogOperation?method=errorLog()"/>
- <log loggingLevel="ERROR"
- message="MODIFY Policy Model YAML request failed: ${exception.stacktrace}"/>
- <setHeader name="CamelHttpResponseCode">
- <constant>500</constant>
- </setHeader>
- <setBody>
- <simple>MODIFY Policy model YAML FAILED</simple>
- </setBody>
- </doCatch>
- </doTry>
- </route>
- </put>
-
<!-- Policy Related endpoints, not related to LOOP -->
<get uri="/v2/policies" outType="com.google.gson.JsonObject" produces="application/json">
<route>
diff --git a/src/test/java/org/onap/policy/clamp/clds/tosca/ToscaYamlToJsonConvertorTestItCase.java b/src/test/java/org/onap/policy/clamp/clds/tosca/ToscaYamlToJsonConvertorTestItCase.java
deleted file mode 100644
index 6ff82b6d7..000000000
--- a/src/test/java/org/onap/policy/clamp/clds/tosca/ToscaYamlToJsonConvertorTestItCase.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP CLAMP
- * ================================================================================
- * Copyright (C) 2018 AT&T Intellectual Property. All rights
- * reserved.
- * Modifications Copyright (C) 2019 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.policy.clamp.clds.tosca;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-
-import com.google.gson.JsonObject;
-import java.io.IOException;
-import javax.transaction.Transactional;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.onap.policy.clamp.clds.Application;
-import org.onap.policy.clamp.clds.util.ResourceFileUtils;
-import org.onap.policy.clamp.tosca.Dictionary;
-import org.onap.policy.clamp.tosca.DictionaryElement;
-import org.onap.policy.clamp.tosca.DictionaryService;
-import org.skyscreamer.jsonassert.JSONAssert;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-@RunWith(SpringJUnit4ClassRunner.class)
-@SpringBootTest(classes = Application.class)
-public class ToscaYamlToJsonConvertorTestItCase {
-
- @Autowired
- private DictionaryService dictionaryService;
-
- @Autowired
- private ToscaYamlToJsonConvertor toscaYamlToJsonConvertor;
-
- /**
- * This Test validates TOSCA yaml to JSON Schema conversion based on JSON Editor
- * Schema.
- *
- * @throws IOException In case of issue when opening the tosca yaml file and
- * converted json file
- */
- @Test
- public final void testParseToscaYaml() throws IOException {
- String toscaModelYaml = ResourceFileUtils.getResourceAsString("tosca/tosca_example.yaml");
- ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor();
-
- String parsedJsonSchema =
- convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.cdap.tca.hi.lo.app");
- assertNotNull(parsedJsonSchema);
- JSONAssert.assertEquals(
- ResourceFileUtils.getResourceAsString("tosca/policy-yaml-to-json.json"),
- parsedJsonSchema, true);
- }
-
- /**
- * This Test validates TOSCA yaml with constraints to JSON Schema conversion
- * based on JSON Editor Schema.
- *
- * @throws IOException In case of issue when opening the tosca yaml file and
- * converted json file
- */
- @Test
- public final void testParseToscaYamlWithConstraints() throws IOException {
- String toscaModelYaml =
- ResourceFileUtils.getResourceAsString("tosca/tosca-with-constraints.yaml");
- ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor();
-
- String parsedJsonSchema =
- convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
- assertNotNull(parsedJsonSchema);
- JSONAssert.assertEquals(
- ResourceFileUtils.getResourceAsString("tosca/policy-yaml-to-json-with-constraints.json"),
- parsedJsonSchema, true);
- }
-
- /**
- * This Test validates TOSCA yaml with different datatypes to JSON Schema
- * conversion based on JSON Editor Schema.
- *
- * @throws IOException In case of issue when opening the tosca yaml file and
- * converted json file
- */
- @Test
- public final void testParseToscaYamlWithTypes() throws IOException {
- String toscaModelYaml =
- ResourceFileUtils.getResourceAsString("tosca/tosca-with-datatypes.yaml");
- ToscaYamlToJsonConvertor convertor = new ToscaYamlToJsonConvertor();
-
- String parsedJsonSchema =
- convertor.parseToscaYaml(toscaModelYaml, "onap.policies.monitoring.example.app");
- assertNotNull(parsedJsonSchema);
- JSONAssert.assertEquals(
- ResourceFileUtils.getResourceAsString("tosca/policy-yaml-to-json-with-datatypes.json"),
- parsedJsonSchema, true);
- }
-
- /**
- * This Test validates Tosca yaml with metadata tag that contains policy_model_type and acronym
- * 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
- */
- @Test
- @Transactional
- public final void testMetadataClampPossibleValues() throws IOException {
- setupDictionary();
- String toscaModelYaml =
- ResourceFileUtils.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(
- ResourceFileUtils
- .getResourceAsString("tosca/tosca_metadata_clamp_possible_values_json_schema.json"),
- parsedJsonSchema, true);
-
- }
-
- private void setupDictionary() {
-
- // Set up dictionary elements
- Dictionary dictionaryTest = new Dictionary();
- dictionaryTest.setName("Context");
- dictionaryTest.setSecondLevelDictionary(0);
-
- DictionaryElement element = new DictionaryElement();
- element.setName("PROD");
- element.setShortName("PROD");
- element.setType("string");
- element.setDescription("Production");
- dictionaryTest.addDictionaryElements(element);
-
- dictionaryService.saveOrUpdateDictionary(dictionaryTest);
-
- Dictionary dictionaryTest1 = new Dictionary();
- dictionaryTest1.setName("EventDictionary");
- dictionaryTest1.setSecondLevelDictionary(0);
-
- DictionaryElement element1 = new DictionaryElement();
- element1.setName("alarmCondition");
- element1.setShortName("alarmCondition");
- element1.setType("string");
- 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();
- dictionaryTest2.setName("Operators");
- dictionaryTest2.setSecondLevelDictionary(0);
-
- DictionaryElement element2 = new DictionaryElement();
- element2.setName("equals");
- element2.setShortName("equals");
- element2.setType("string|datetime");
- element2.setDescription("equals");
- dictionaryTest2.addDictionaryElements(element2);
- dictionaryService.saveOrUpdateDictionary(dictionaryTest2);
- }
-
-}
diff --git a/src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java b/src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java
index b6c60d84c..a2563b8d3 100644
--- a/src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java
+++ b/src/test/java/org/onap/policy/clamp/loop/PolicyModelServiceItCase.java
@@ -121,24 +121,6 @@ public class PolicyModelServiceItCase {
}
/**
- * This tests a create Policy Model from Tosca.
- *
- * @throws IOException In case of failure
- */
- @Test
- @Transactional
- public void shouldCreatePolicyModelFromTosca() throws IOException {
- String toscaModelYaml =
- ResourceFileUtils.getResourceAsString("tosca/tosca_with_metadata.yaml");
- PolicyModel policyModel = policyModelsService.createNewPolicyModelFromTosca(toscaModelYaml);
-
- assertThat(policyModelsService.getAllPolicyModels()).contains(policyModel);
-
- assertThat(policyModelsService.getPolicyModelTosca(policyModel.getPolicyModelType(),
- policyModel.getVersion())).contains(toscaModelYaml);
- }
-
- /**
* This tests the getPolicyModelJson. A json is expected.
*
* @throws IOException In case of failure
@@ -162,27 +144,6 @@ public class PolicyModelServiceItCase {
}
/**
- * This tests a update Policy Model.
- *
- * @throws IOException In case of failure
- */
- @Test
- @Transactional
- public void shouldUpdatePolicyModel() throws IOException {
- String toscaModelYaml =
- ResourceFileUtils.getResourceAsString("tosca/tosca_with_metadata.yaml");
- PolicyModel policyModel = policyModelsService.createNewPolicyModelFromTosca(toscaModelYaml);
- String newToscaModelYaml =
- ResourceFileUtils.getResourceAsString("tosca/tosca_metadata_clamp_possible_values.yaml");
-
- PolicyModel updatedPolicyModel = policyModelsService.updatePolicyModelTosca(
- policyModel.getPolicyModelType(), policyModel.getVersion(), newToscaModelYaml);
-
- assertThat(updatedPolicyModel.getPolicyModelTosca()).isEqualTo(newToscaModelYaml);
-
- }
-
- /**
* This tests a getAllPolicyModelTypes get.
*/
@Test
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
deleted file mode 100644
index fe9b84d13..000000000
--- a/src/test/resources/tosca/policy-yaml-to-json-with-constraints.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "schema": {
- "uniqueItems": "true",
- "format": "tabs",
- "type": "array",
- "title": "Properties with constraints",
- "items": {
- "type": "object",
- "title": "Properties with constraints",
- "required": [
- "cpus",
- "memSize"
- ],
- "properties": {
- "appPassword": {
- "propertyOrder": 1004,
- "minLength": 6,
- "title": "application password",
- "type": "string",
- "maxLength": 10
- },
- "cost": {
- "exclusiveMaximum": 100.5,
- "propertyOrder": 1005,
- "type": "integer",
- "exclusiveMinimum": 50.5
- },
- "keylength": {
- "propertyOrder": 1007,
- "type": "integer",
- "enum": [
- 128,
- 256
- ]
- },
- "cpus": {
- "propertyOrder": 1001,
- "default": 1,
- "minLength": 1,
- "type": "string",
- "maxLength": 4
- },
- "ports": {
- "propertyOrder": 1002,
- "maximum": 9010,
- "type": "integer",
- "minimum": 9000
- },
- "memSize": {
- "propertyOrder": 1003,
- "maximum": 10,
- "title": "memory size",
- "type": "integer",
- "minimum": 2
- },
- "algorithm": {
- "propertyOrder": 1006,
- "type": "string"
- }
- }
- }
- }
-}
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
deleted file mode 100644
index ef9c2c03a..000000000
--- a/src/test/resources/tosca/policy-yaml-to-json-with-datatypes.json
+++ /dev/null
@@ -1,108 +0,0 @@
-{
- "schema": {
- "uniqueItems": "true",
- "format": "tabs",
- "type": "array",
- "title": "Properties with different types",
- "items": {
- "type": "object",
- "title": "Properties with different types",
- "required": [
- "memSize"
- ],
- "properties": {
- "cpus": {
- "propertyOrder": 1001,
- "uniqueItems": "true",
- "format": "tabs-top",
- "type": "array",
- "items": {
- "type": "object",
- "required": [],
- "properties": {
- "closedLoopControlName": {
- "propertyOrder": 1002,
- "type": "string"
- }
- }
- }
- },
- "domain": {
- "propertyOrder": 1009,
- "type": "object",
- "required": [],
- "properties": {
- "closedLoopControlName": {
- "propertyOrder": 1002,
- "type": "string"
- }
- }
- },
- "thresholdValue": {
- "propertyOrder": 1007,
- "uniqueItems": "true",
- "format": "select",
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "ports": {
- "propertyOrder": 1003,
- "type": "object",
- "items": {
- "type": "string"
- }
- },
- "closedLoopEventStatus": {
- "propertyOrder": 1004,
- "type": "object",
- "items": {
- "type": "integer"
- }
- },
- "version": {
- "propertyOrder": 1008,
- "uniqueItems": "true",
- "format": "tabs-top",
- "type": "array",
- "items": {
- "type": "object",
- "required": [],
- "properties": {
- "closedLoopControlName": {
- "propertyOrder": 1002,
- "type": "string"
- }
- }
- }
- },
- "memSize": {
- "propertyOrder": 1006,
- "required": [],
- "properties": {
- "name": {
- "propertyOrder": 20002,
- "required": [
- "severity"
- ],
- "properties": {
- "severity": {
- "propertyOrder": 20003,
- "type": "string"
- }
- }
- }
- }
- },
- "direction": {
- "propertyOrder": 1005,
- "type": "object",
- "items": {
- "type": "integer"
- }
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/src/test/resources/tosca/policy-yaml-to-json.json b/src/test/resources/tosca/policy-yaml-to-json.json
deleted file mode 100644
index b83d3f24f..000000000
--- a/src/test/resources/tosca/policy-yaml-to-json.json
+++ /dev/null
@@ -1,192 +0,0 @@
-{
- "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"
- ],
- "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"
- },
- "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"
- },
- "eventName": {
- "propertyOrder": 1004,
- "title": "Event name to which thresholds need to be applied",
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
-} \ No newline at end of file
diff --git a/src/test/resources/tosca/tosca-with-constraints.yaml b/src/test/resources/tosca/tosca-with-constraints.yaml
deleted file mode 100644
index 959bc483b..000000000
--- a/src/test/resources/tosca/tosca-with-constraints.yaml
+++ /dev/null
@@ -1,54 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-policy_types:
- onap.policies.Monitoring:
- derived_from: tosca.policies.Root
- description: a base policy type for all policies that governs monitoring provisioning
- onap.policies.monitoring.example.app:
- derived_from: onap.policies.Monitoring
- version: 1.0.0
- properties:
- example_policy:
- type: map
- description: Properties with constraints
- entry_schema:
- type: onap.datatypes.monitoring.example_policy
-data_types:
- onap.datatypes.monitoring.example_policy:
- derived_from: tosca.datatypes.Root
- properties:
- cpus:
- type: string
- required: true
- default: 1
- constraints:
- - in_range: [ 1, 4 ]
- ports:
- type: integer
- constraints:
- - in_range: [ 9000, 9010 ]
- memSize:
- type: integer
- required: true
- description: memory size
- constraints:
- - greater_or_equal: 2
- - less_or_equal: 10
- appPassword:
- type: string
- description: application password
- constraints:
- - min_length: 6
- - max_length: 10
- cost:
- type: float
- constraints:
- - less_than: 100.50
- - greater_than: 50.50
- algorithm:
- type: string
- constraints:
- - equal: aes
- keylength:
- type: integer
- constraints:
- - valid_values: [ 128, 256 ]
diff --git a/src/test/resources/tosca/tosca-with-datatypes.yaml b/src/test/resources/tosca/tosca-with-datatypes.yaml
deleted file mode 100644
index 61d5dbcc8..000000000
--- a/src/test/resources/tosca/tosca-with-datatypes.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-policy_types:
- onap.policies.Monitoring:
- derived_from: tosca.policies.Root
- description: a base policy type for all policies that governs monitoring provisioning
- onap.policies.monitoring.example.app:
- derived_from: onap.policies.Monitoring
- version: 1.0.0
- properties:
- example_policy:
- type: map
- description: Properties with different types
- entry_schema:
- type: onap.datatypes.monitoring.example_policy
-data_types:
- onap.datatypes.monitoring.example2:
- derived_from: tosca.datatypes.Root
- properties:
- closedLoopControlName:
- type: string
- onap.datatypes.monitoring.example3:
- derived_from: tosca.datatypes.Root
- properties:
- name:
- type: onap.datatypes.monitoring.example4
- onap.datatypes.monitoring.example4:
- derived_from: tosca.datatypes.Root
- properties:
- severity:
- type: string
- required: true
- onap.datatypes.monitoring.example_policy:
- derived_from: tosca.datatypes.Root
- properties:
- cpus:
- type: list
- entry_schema:
- type: onap.datatypes.monitoring.example2
- ports:
- type: map
- entry_schema:
- type: string
- closedLoopEventStatus:
- type: map
- entry_schema:
- type: integer
- direction:
- type: map
- entry_schema:
- type: float
- memSize:
- type: onap.datatypes.monitoring.example3
- required: true
- thresholdValue:
- type: list
- entry_schema:
- type: string
- version:
- type: list
- entry_schema:
- type: onap.datatypes.monitoring.example2
- domain:
- type: onap.datatypes.monitoring.example2 \ No newline at end of file
diff --git a/src/test/resources/tosca/tosca_metadata_clamp_possible_values.yaml b/src/test/resources/tosca/tosca_metadata_clamp_possible_values.yaml
deleted file mode 100644
index 4d3c3dff2..000000000
--- a/src/test/resources/tosca/tosca_metadata_clamp_possible_values.yaml
+++ /dev/null
@@ -1,184 +0,0 @@
-tosca_definitions_version: tosca_simple_yaml_1_0_0
-policy_types:
- onap.policies.Monitoring:
- derived_from: tosca.policies.Root
- description: a base policy type for all policies that governs monitoring provisioning
- onap.policies.monitoring.cdap.tca.hi.lo.app:
- derived_from: onap.policies.Monitoring
- version: 1.0.0
- properties:
- tca_policy:
- type: map
- description: TCA Policy JSON
- entry_schema:
- type: onap.datatypes.monitoring.tca_policy
- metadata:
- policy_model_type: onap.policies.monitoring.cdap.tca.hi.lo.app
- acronym: tca
-
-data_types:
- onap.datatypes.monitoring.metricsPerEventName:
- derived_from: tosca.datatypes.Root
- properties:
- controlLoopSchemaType:
- type: string
- required: true
- description: Specifies Control Loop Schema Type for the event Name e.g. VNF, VM
- constraints:
- - valid_values:
- - VM
- - VNF
- eventName:
- type: string
- required: true
- description: Event name to which thresholds need to be applied
- policyName:
- type: string
- required: true
- description: TCA Policy Scope Name
- policyScope:
- type: string
- required: true
- description: TCA Policy Scope
- policyVersion:
- type: string
- required: true
- description: TCA Policy Scope Version
- thresholds:
- type: list
- required: true
- description: Thresholds associated with eventName
- entry_schema:
- type: onap.datatypes.monitoring.thresholds
- context:
- type: string
- required: true
- description: TCA Policy Dummy Context
- metadata:
- clamp_possible_values: ["Dictionary:Context"]
-
- signature:
- type: onap.datatypes.monitoring.Dummy_Signature
- description: Signature
- required: true
-
- onap.datatypes.monitoring.Dummy_Signature:
- derived_from: tosca.datatypes.Root
- properties:
- filter_clause:
- type: string
- description: Filter Clause
- required: true
- metadata:
- clamp_possible_values: ["Dictionary:EventDictionary#Operators"]
-
- onap.datatypes.monitoring.tca_policy:
- derived_from: tosca.datatypes.Root
- properties:
- domain:
- type: string
- required: true
- description: Domain name to which TCA needs to be applied
- default: measurementsForVfScaling
- constraints:
- - equal: measurementsForVfScaling
- metricsPerEventName:
- type: list
- required: true
- description: Contains eventName and threshold details that need to be applied to given eventName
- entry_schema:
- type: onap.datatypes.monitoring.metricsPerEventName
- onap.datatypes.monitoring.thresholds:
- derived_from: tosca.datatypes.Root
- properties:
- closedLoopControlName:
- type: string
- required: true
- description: Closed Loop Control Name associated with the threshold
- closedLoopEventStatus:
- type: string
- required: true
- description: Closed Loop Event Status of the threshold
- constraints:
- - valid_values:
- - ONSET
- - ABATED
- direction:
- type: string
- required: true
- description: Direction of the threshold
- constraints:
- - valid_values:
- - LESS
- - LESS_OR_EQUAL
- - GREATER
- - GREATER_OR_EQUAL
- - EQUAL
- fieldPath:
- type: string
- required: true
- description: Json field Path as per CEF message which needs to be analyzed for TCA
- constraints:
- - valid_values:
- - $.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
- severity:
- type: string
- required: true
- description: Threshold Event Severity
- constraints:
- - valid_values:
- - CRITICAL
- - MAJOR
- - MINOR
- - WARNING
- - NORMAL
- thresholdValue:
- type: integer
- required: true
- description: Threshold value for the field Path inside CEF message
- version:
- type: string
- required: true
- description: Version number associated with the threshold
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
deleted file mode 100644
index 418ee71be..000000000
--- a/src/test/resources/tosca/tosca_metadata_clamp_possible_values_json_schema.json
+++ /dev/null
@@ -1,249 +0,0 @@
-{
- "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":[
- {
- "operators":[
- "equals"
- ],
- "minLength":1,
- "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"
- }
- }
- ]
- },
- "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