diff options
author | shangxdy <shang.xiaodong@zte.com.cn> | 2016-07-08 15:15:00 +0800 |
---|---|---|
committer | shangxdy <shang.xiaodong@zte.com.cn> | 2016-07-10 00:38:59 +0800 |
commit | 0997552722dc4845a854e0e6f8d7f18058e26380 (patch) | |
tree | b90d1e808bb326612211ba56b3b941516493398d /tosca2heat/tosca-parser/toscaparser/tosca_template.py | |
parent | 7fe3011a67a239f7dc04153c54eaff78ef967eaf (diff) |
Synchronise the openstack bugs
When run unittests through tox, some test cases are always error,
the errors are already done in openstack community, so it's
necessary to synchronise the fixes.
Change-Id: Ib29078e6cc138a474e89c6a2cc90ad7a1db1bb46
JIRA: PARSER-63
Signed-off-by: shangxdy <shang.xiaodong@zte.com.cn>
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/tosca_template.py')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/tosca_template.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/tosca_template.py b/tosca2heat/tosca-parser/toscaparser/tosca_template.py index 2ab2581..01e6c73 100644 --- a/tosca2heat/tosca-parser/toscaparser/tosca_template.py +++ b/tosca2heat/tosca-parser/toscaparser/tosca_template.py @@ -23,6 +23,7 @@ from toscaparser.elements.entity_type import update_definitions from toscaparser.extensions.exttools import ExtTools import toscaparser.imports from toscaparser.prereq.csar import CSAR +from toscaparser.repositories import Repository from toscaparser.topology_template import TopologyTemplate from toscaparser.tpl_relationship_graph import ToscaGraph from toscaparser.utils.gettextutils import _ @@ -95,6 +96,7 @@ class ToscaTemplate(object): self.relationship_types = self._tpl_relationship_types() self.description = self._tpl_description() self.topology_template = self._topology_template() + self.repositories = self._tpl_repositories() if self.topology_template.tpl: self.inputs = self._inputs() self.relationship_templates = self._relationship_templates() @@ -134,6 +136,15 @@ class ToscaTemplate(object): def _tpl_imports(self): return self.tpl.get(IMPORTS) + def _tpl_repositories(self): + repositories = self.tpl.get(REPOSITORIES) + reposit = [] + if repositories: + for name, val in repositories.items(): + reposits = Repository(name, val) + reposit.append(reposits) + return reposit + def _tpl_relationship_types(self): return self._get_custom_types(RELATIONSHIP_TYPES) |