From: shangxdy Date: Thu, 7 Sep 2017 11:00:35 +0000 (+0800) Subject: fix costum datatype definition in parameters X-Git-Tag: opnfv-5.1.0~14^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=5018163eae36d9ce8464a778960b7f77a19ba70a;p=parser.git fix costum datatype definition in parameters Currently, support customized datatype in parameters is error when transfer custom_defs in DataEntity.validate_datatype(self.type, value, None, datatype), it should be full custom definitions , not only one definition. the patch will fix it. JIRA: PARSER-152 Change-Id: If6d59f21fa75cbdf4e8e16f093e3d807910ad234 Signed-off-by: shangxdy --- diff --git a/tosca2heat/tosca-parser/toscaparser/parameters.py b/tosca2heat/tosca-parser/toscaparser/parameters.py index 0e24b99..d2d2eb3 100644 --- a/tosca2heat/tosca-parser/toscaparser/parameters.py +++ b/tosca2heat/tosca-parser/toscaparser/parameters.py @@ -92,7 +92,7 @@ class Input(object): elif EntityType.DATATYPE_NETWORK_PREFIX + self.type in tosca: datatype = tosca[EntityType.DATATYPE_NETWORK_PREFIX + self.type] elif self.type in self.custom_defs: - datatype = self.custom_defs[self.type] + datatype = self.custom_defs DataEntity.validate_datatype(self.type, value, None, datatype)