From 3d51989fd3559babafeb0ca1d0d0ca8b40ee46a3 Mon Sep 17 00:00:00 2001 From: sebdet Date: Fri, 15 Mar 2019 15:50:06 +0100 Subject: Fix policy Tosca converter Fix converter so that it can understand the new Policy Yaml model Issue-ID: CLAMP-306 Change-Id: I4d2f8640b2344e7ceee2cfec2d7e3175777f591b Signed-off-by: sebdet --- .../clamp/clds/tosca/ToscaSchemaConstants.java | 91 +++++++++++----------- 1 file changed, 44 insertions(+), 47 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/onap/clamp/clds/tosca/ToscaSchemaConstants.java b/src/main/java/org/onap/clamp/clds/tosca/ToscaSchemaConstants.java index f5b5a8d2b..f1344723e 100644 --- a/src/main/java/org/onap/clamp/clds/tosca/ToscaSchemaConstants.java +++ b/src/main/java/org/onap/clamp/clds/tosca/ToscaSchemaConstants.java @@ -18,59 +18,56 @@ * limitations under the License. * ============LICENSE_END============================================ * =================================================================== - * + * */ package org.onap.clamp.clds.tosca; public class ToscaSchemaConstants { - //Data types in TOSCA Schema - public static final String TYPE_LIST = "list"; - public static final String TYPE_MAP = "map"; - public static final String TYPE_STRING = "string"; - public static final String TYPE_INTEGER = "integer"; - public static final String TYPE_FLOAT = "float"; - public static final String TYPE_BOOLEAN = "boolean"; - - //Key elements in Tosca - public static final String NODE_TYPES = "node_types"; - public static final String DATA_TYPES = "data_types"; - public static final String TYPE = "type"; - public static final String DESCRIPTION = "description"; - public static final String DEFAULT = "default"; - public static final String PROPERTIES = "properties"; - public static final String REQUIRED = "required"; - public static final String ENTRY_SCHEMA = "entry_schema"; + // Data types in TOSCA Schema + public static final String TYPE_LIST = "list"; + public static final String TYPE_MAP = "map"; + public static final String TYPE_STRING = "string"; + public static final String TYPE_INTEGER = "integer"; + public static final String TYPE_FLOAT = "float"; + public static final String TYPE_BOOLEAN = "boolean"; + + // Key elements in Tosca + public static final String NODE_TYPES = "policy_types"; + public static final String DATA_TYPES = "data_types"; + public static final String TYPE = "type"; + public static final String DESCRIPTION = "description"; + public static final String DEFAULT = "default"; + public static final String PROPERTIES = "properties"; + public static final String REQUIRED = "required"; + public static final String ENTRY_SCHEMA = "entry_schema"; + + // Constraints + public static final String CONSTRAINTS = "constraints"; + public static final String VALID_VALUES = "valid_values"; + public static final String EQUAL = "equal"; + public static final String GREATER_THAN = "greater_than"; + public static final String GREATER_OR_EQUAL = "greater_or_equal"; + public static final String LESS_THAN = "less_than"; + public static final String LESS_OR_EQUAL = "less_or_equal"; + public static final String IN_RANGE = "in_range"; + public static final String LENGTH = "length"; + public static final String MIN_LENGTH = "min_length"; + public static final String MAX_LENGTH = "max_length"; + public static final String PATTERN = "pattern"; + + // Prefix for policy nodes + public static final String POLICY_NODE = "onap.policy."; + + // Prefix for data nodes + public static final String POLICY_DATA = "onap.datatypes."; + + // Prefix for dictionary elements + public static final String DICTIONARY = "Dictionary:"; - //Constraints - public static final String CONSTRAINTS = "constraints"; - public static final String VALID_VALUES = "valid_values"; - public static final String EQUAL = "equal"; - public static final String GREATER_THAN = "greater_than"; - public static final String GREATER_OR_EQUAL = "greater_or_equal"; - public static final String LESS_THAN = "less_than"; - public static final String LESS_OR_EQUAL = "less_or_equal"; - public static final String IN_RANGE = "in_range"; - public static final String LENGTH = "length"; - public static final String MIN_LENGTH = "min_length"; - public static final String MAX_LENGTH = "max_length"; - public static final String PATTERN = "pattern"; - - //Prefix for policy nodes - public static final String POLICY_NODE = "policy.nodes."; - - //Prefix for data nodes - public static final String POLICY_DATA = "policy.data."; - - //Prefix for dictionary elements - public static final String DICTIONARY = "Dictionary:"; - - //Custom Elements that must exist in the Tosca models - public static final String NAME = "name"; - public static final String CONTEXT = "context"; + // Custom Elements that must exist in the Tosca models + public static final String NAME = "name"; + public static final String CONTEXT = "context"; - - - } -- cgit 1.2.3-korg