From 406214e5ca40ad57a1c40e4a8454336f6a26cac2 Mon Sep 17 00:00:00 2001 From: shangxdy Date: Sun, 26 Feb 2017 00:49:42 +0800 Subject: Sync upstream code Sync upstream project of tosca-parser Change-Id: Ic707844203ea05007b3c02e9dcadb52389eb3149 JIRA:PARSER-118 Signed-off-by: shangxdy --- tosca2heat/tosca-parser/toscaparser/parameters.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tosca2heat/tosca-parser/toscaparser/parameters.py') diff --git a/tosca2heat/tosca-parser/toscaparser/parameters.py b/tosca2heat/tosca-parser/toscaparser/parameters.py index ca8e697..787db00 100644 --- a/tosca2heat/tosca-parser/toscaparser/parameters.py +++ b/tosca2heat/tosca-parser/toscaparser/parameters.py @@ -27,9 +27,10 @@ log = logging.getLogger('tosca') class Input(object): - INPUTFIELD = (TYPE, DESCRIPTION, DEFAULT, CONSTRAINTS, REQUIRED, - STATUS) = ('type', 'description', 'default', - 'constraints', 'required', 'status') + INPUTFIELD = (TYPE, DESCRIPTION, DEFAULT, CONSTRAINTS, REQUIRED, STATUS, + ENTRY_SCHEMA) = ('type', 'description', 'default', + 'constraints', 'required', 'status', + 'entry_schema') def __init__(self, name, schema_dict): self.name = name @@ -58,6 +59,10 @@ class Input(object): def constraints(self): return self.schema.constraints + @property + def status(self): + return self.schema.status + def validate(self, value=None): if value is not None: self._validate_value(value) -- cgit 1.2.3-korg