TOSCA parser fails to load parsed template dict from another template

Bug #1594781 reported by Denis Makogon
This bug affects 1 person
Affects Status Importance Assigned to Milestone
TOSCA Parser
Denis Makogon

Bug Description

Assume you want to create two identical templates instances but use two different inputs for them, and you don't want to provide path to template file but use previous template instance attribute - *.tpl

Here's code example:

    path = ('/tmp/orchestra-openstack-authorization.yaml')
    _tmplt = tosca_template.ToscaTemplate(
        path=path, parsed_params=None,
        a_file=True, yaml_dict_tpl=None)

    _tmplt_2 = tosca_template.ToscaTemplate(
        path=None, parsed_params=None, a_file=False,

Second template creation fails with an error:

  File "/Users/denismakogon/Documents/Invader/aio-orchestra/.venv/lib/python3.5/site-packages/toscaparser/", line 96, in __init__
    self.topology_template = self._topology_template()
  File "/Users/denismakogon/Documents/Invader/aio-orchestra/.venv/lib/python3.5/site-packages/toscaparser/", line 111, in _topology_template
  File "/Users/denismakogon/Documents/Invader/aio-orchestra/.venv/lib/python3.5/site-packages/toscaparser/", line 60, in __init__
  File "/Users/denismakogon/Documents/Invader/aio-orchestra/.venv/lib/python3.5/site-packages/toscaparser/", line 274, in _process_intrinsic_functions
    func = functions.get_function(self, self.outputs, output.value)
  File "/Users/denismakogon/Documents/Invader/aio-orchestra/.venv/lib/python3.5/site-packages/toscaparser/", line 594, in get_function
    func_name = list(raw_function.keys())[0]
AttributeError: 'GetAttribute' object has no attribute 'keys'

Changed in tosca-parser:
assignee: nobody → Denis Makogon (lildee1991)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.