TOSCA functions are not supporting complex data extractions

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

Bug Description

In TOSCA simple profile definition there is no mentions that any of node-related functions can't have complex data extraction, for example:

  { get_attribute: [node, attribute, attribute_of_attribute, ...] }


  { get_property: [node, property, attribute_of_property, ...] }

But TOSCA parser says that it is not possible to have such function definition.

  File "/Users/denismakogon/Documents/Invader/aio-orchestra/.venv/lib/python3.5/site-packages/toscaparser/", line 105, in __init__
  File "/Users/denismakogon/Documents/Invader/aio-orchestra/.venv/lib/python3.5/site-packages/toscaparser/", line 242, in verify_template
The input "/Users/denismakogon/Documents/Invader/aio-orchestra/aio-orchestra-openstack-plugin/examples/orchestra-openstack-authorization.yaml" failed validation with the following error(s):

 ValueError: Illegal arguments for function "get_attribute". Expected arguments: "node-template-name", "attribute-name"

Revision history for this message
Monika (970954-monika) wrote :

As mentioned we have tried to pass complex data extractions and we successfully retrieved the results.
{ get_attribute: [server, ports, mac_address] }

The above ValueError mentioned is because of giving less than 2 arguments. We have checked it in “tosca-parser/toscaparser/” which is as follows:

 def validate(self):
 if len(self.args) < 2:
   ValueError(_('Illegal arguments for function "{0}". Expected '
     'arguments: "node-template-name", "req-or-cap"'
     '(optional), "property name"'

So can you please be more specific about the bug.

Revision history for this message
Bob Haddleton (bob-haddleton) wrote :

@Denis - is this still an issue?



Changed in tosca-parser:
status: New → Incomplete
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.