diff options
author | shangxdy <shang.xiaodong@zte.com.cn> | 2017-07-12 00:38:06 +0800 |
---|---|---|
committer | shangxdy <shang.xiaodong@zte.com.cn> | 2017-07-12 00:38:06 +0800 |
commit | 5b3f19f30ff02faa80ad02762ae23ad020b04218 (patch) | |
tree | c526ca60a723ce77445d2b933e7efed458a5a30b | |
parent | a1eebb743002a10194d8f7c5448c02a99f1f0fe1 (diff) |
Fix import nested list bugs
When import list yaml in top service template, and the nested template
import also list yaml, the result type definition is not complete
JIRA: PARSER-124
Change-Id: I0ee7f4367d7fabd27641e93c498646d1d0b127b8
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/imports.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/imports.py b/tosca2heat/tosca-parser/toscaparser/imports.py index b69bf4d..429a396 100644 --- a/tosca2heat/tosca-parser/toscaparser/imports.py +++ b/tosca2heat/tosca-parser/toscaparser/imports.py @@ -106,6 +106,9 @@ class ImportsLoader(object): outer_custom_types = custom_type.get(type_def) if outer_custom_types: if type_def == "imports": + for i in self.custom_defs.get('imports', []): + if i not in outer_custom_types: + outer_custom_types.append(i) self.custom_defs.update({'imports': outer_custom_types}) else: if namespace_prefix: |