# Path: translator/hot/syntax/hot_parameter.py
# class HotParameter(object):
#     '''Attributes for HOT parameter section.'''
# 
#     def __init__(self, name, type, label=None, description=None, default=None,
#                  hidden=None, constraints=None):
#         self.name = name
#         self.type = type
#         self.label = label
#         self.description = description
#         self.default = default
#         self.hidden = hidden
#         self.constraints = constraints
#         log.info(_('Initialized the input parameters.'))
# 
#     def get_dict_output(self):
#         param_sections = OrderedDict()
#         param_sections[TYPE] = self.type
#         if self.label:
#             param_sections[LABEL] = self.label
#         if self.description:
#             param_sections[DESCRIPTION] = self.description
#         if self.default:
#             param_sections[DEFAULT] = self.default
#         if self.hidden:
#             param_sections[HIDDEN] = self.hidden
#         if self.constraints:
#             param_sections[CONSTRAINTS] = self.constraints
# 
#         return {self.name: param_sections}


import logging
from toscaparser.dataentity import DataEntity
from toscaparser.elements.scalarunit import ScalarUnit_Size
from toscaparser.parameters import Input
from toscaparser.utils.gettextutils import _
from toscaparser.utils.validateutils import TOSCAVersionProperty
from translator.hot.syntax.hot_parameter import HotParameter
                    ('constraints', 'description', 'length', 'range',
                     'min', 'max', 'allowed_values', 'allowed_pattern')

TOSCA_CONSTRAINT_OPERATORS = (EQUAL, GREATER_THAN, GREATER_OR_EQUAL, LESS_THAN,
                              LESS_OR_EQUAL, IN_RANGE, VALID_VALUES, LENGTH,
                              MIN_LENGTH, MAX_LENGTH, PATTERN) = \
                             ('equal', 'greater_than', 'greater_or_equal',
                              'less_than', 'less_or_equal', 'in_range',
                              'valid_values', 'length', 'min_length',
                              'max_length', 'pattern')

TOSCA_TO_HOT_CONSTRAINTS_ATTRS = {'equal': 'allowed_values',
                                  'greater_than': 'range',
                                  'greater_or_equal': 'range',
                                  'less_than': 'range',
                                  'less_or_equal': 'range',
                                  'in_range': 'range',
                                  'valid_values': 'allowed_values',
                                  'length': 'length',
                                  'min_length': 'length',
                                  'max_length': 'length',
                                  'pattern': 'allowed_pattern'}

TOSCA_TO_HOT_INPUT_TYPES = {'string': 'string',
                            'integer': 'number',
                            'float': 'number',
                            'boolean': 'boolean',
                            'timestamp': 'string',
                            'scalar-unit.size': 'number',
                            'version': 'string',

# Path: translator/hot/syntax/hot_parameter.py
# class HotParameter(object):
#     '''Attributes for HOT parameter section.'''
# 
#     def __init__(self, name, type, label=None, description=None, default=None,
#                  hidden=None, constraints=None):
#         self.name = name
#         self.type = type
#         self.label = label
#         self.description = description
#         self.default = default
#         self.hidden = hidden
#         self.constraints = constraints
#         log.info(_('Initialized the input parameters.'))
# 
#     def get_dict_output(self):
#         param_sections = OrderedDict()
#         param_sections[TYPE] = self.type
#         if self.label:
#             param_sections[LABEL] = self.label
#         if self.description:
#             param_sections[DESCRIPTION] = self.description
#         if self.default:
#             param_sections[DEFAULT] = self.default
#         if self.hidden:
#             param_sections[HIDDEN] = self.hidden
#         if self.constraints:
#             param_sections[CONSTRAINTS] = self.constraints
# 
#         return {self.name: param_sections}


# Path: translator/hot/translate_inputs.py
import logging
from toscaparser.dataentity import DataEntity
from toscaparser.elements.scalarunit import ScalarUnit_Size
from toscaparser.parameters import Input
from toscaparser.utils.gettextutils import _
from toscaparser.utils.validateutils import TOSCAVersionProperty
from translator.hot.syntax.hot_parameter import HotParameter

                    ('constraints', 'description', 'length', 'range',
                     'min', 'max', 'allowed_values', 'allowed_pattern')

TOSCA_CONSTRAINT_OPERATORS = (EQUAL, GREATER_THAN, GREATER_OR_EQUAL, LESS_THAN,
                              LESS_OR_EQUAL, IN_RANGE, VALID_VALUES, LENGTH,
                              MIN_LENGTH, MAX_LENGTH, PATTERN) = \
                             ('equal', 'greater_than', 'greater_or_equal',
                              'less_than', 'less_or_equal', 'in_range',
                              'valid_values', 'length', 'min_length',
                              'max_length', 'pattern')

TOSCA_TO_HOT_CONSTRAINTS_ATTRS = {'equal': 'allowed_values',
                                  'greater_than': 'range',
                                  'greater_or_equal': 'range',
                                  'less_than': 'range',
                                  'less_or_equal': 'range',
                                  'in_range': 'range',
                                  'valid_values': 'allowed_values',
                                  'length': 'length',
                                  'min_length': 'length',
                                  'max_length': 'length',
                                  'pattern': 'allowed_pattern'}

TOSCA_TO_HOT_INPUT_TYPES = {'string': 'string',
                            'integer': 'number',
                            'float': 'number',
                            'boolean': 'boolean',
                            'timestamp': 'string',
                            'scalar-unit.size': 'number',
                            'version': 'string',

                            'null': 'string',