TOSCA functions are not supporting complex data extractions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TOSCA Parser |
Incomplete
|
Undecided
|
Unassigned |
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_
and
{ get_property: [node, property, attribute_
But TOSCA parser says that it is not possible to have such function definition.
File "/Users/
self.
File "/Users/
'\n\
toscaparser.
The input "/Users/
ValueError: Illegal arguments for function "get_attribute". Expected arguments: "node-template-
As mentioned we have tried to pass complex data extractions and we successfully retrieved the results.
e.g,
{ 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/ functions. py” which is as follows:
def validate(self): ector.appendExc eption( _('Illegal arguments for function "{0}". Expected ' name", "req-or-cap"' format( GET_ATTRIBUTE) ))
if len(self.args) < 2:
ExceptionColl
ValueError(
'arguments: "node-template-
'(optional), "property name"'
).
return
So can you please be more specific about the bug.