summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/imports.py
diff options
context:
space:
mode:
authorshangxdy <shang.xiaodong@zte.com.cn>2016-07-31 02:10:03 +0800
committershangxdy <shang.xiaodong@zte.com.cn>2016-08-03 16:33:11 +0800
commitb74bf46baed7e586028255c8274ebf563d2ff446 (patch)
treefc899844369fb782ab4b33df89f3f47647419a8d /tosca2heat/tosca-parser/toscaparser/imports.py
parent476e9f0f430ce371cadc1f34e2601327732d0c05 (diff)
Distinguish the mapping and mapped by name.
1. Use complete name like nested_topology_tpls here and other places like get_nested_topology_tpls for better readability; 2. Use "sub_mapped_node_tpl" instead of submaped_node_tpl; 3. Use sub_mapped_ instead of submaped. Upper changed in substitution_mappings.py, tosca_template.py, tosca_template.py and others JIRA:PARSER-73 Change-Id: I21b2d3a35773078d7437bbae9ff5d1522608c4d2 Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/imports.py')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/imports.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/imports.py b/tosca2heat/tosca-parser/toscaparser/imports.py
index 86c10f0..451c952 100644
--- a/tosca2heat/tosca-parser/toscaparser/imports.py
+++ b/tosca2heat/tosca-parser/toscaparser/imports.py
@@ -37,7 +37,7 @@ class ImportsLoader(object):
tpl=None):
self.importslist = importslist
self.custom_defs = {}
- self.nested_topo_tpls = []
+ self.nested_tosca_tpls = []
if not path and not tpl:
msg = _('Input tosca template is not provided.')
log.warning(msg)
@@ -57,8 +57,8 @@ class ImportsLoader(object):
def get_custom_defs(self):
return self.custom_defs
- def get_nested_topo_tpls(self):
- return self.nested_topo_tpls
+ def get_nested_tosca_tpls(self):
+ return self.nested_tosca_tpls
def _validate_and_load_imports(self):
imports_names = set()
@@ -98,7 +98,7 @@ class ImportsLoader(object):
custom_type, import_def)
self._update_custom_def(custom_type, None)
- self._update_nested_topo_tpls(full_file_name, custom_type)
+ self._update_nested_tosca_tpls(full_file_name, custom_type)
def _update_custom_def(self, custom_type, namespace_prefix):
outer_custom_types = {}
@@ -119,10 +119,10 @@ class ImportsLoader(object):
else:
self.custom_defs.update(outer_custom_types)
- def _update_nested_topo_tpls(self, full_file_name, custom_tpl):
+ def _update_nested_tosca_tpls(self, full_file_name, custom_tpl):
if full_file_name and custom_tpl:
topo_tpl = {full_file_name: custom_tpl}
- self.nested_topo_tpls.append(topo_tpl)
+ self.nested_tosca_tpls.append(topo_tpl)
def _validate_import_keys(self, import_name, import_uri_def):
if self.FILE not in import_uri_def.keys():