2016-06-18 13:46:04 |
Denis Makogon |
description |
Assume that there's a node with property 'auth_url' and attribute 'auth_token', then it is necessary to put them into 'outputs' section of a template:
outputs:
auth_token:
value: { get_attribute: [ authorization_form, auth_token ] }
auth_token:
value: { get_property: [ authorization_form, auth_url ] }
But user did a mistake - he used the same name for both output items.
TOSCA parser parses in a wrong way. For item 'auth_token' it creates Output object with string value equal to '{ get_property: [ authorization_form, auth_url ] }'
So, there are two possible ways to resolve this issue:
- abort on parsing saying output overriding is not allowed.
- create two Output objects with correct TOSCA functions resolving and let user deal with it. |
Assume that there's a node with property 'auth_url' and attribute 'auth_token', then it is necessary to put them into 'outputs' section of a template:
outputs:
auth_token:
value: { get_attribute: [ authorization_form, auth_token ] }
auth_token:
value: { get_property: [ authorization_form, auth_url ] }
But user did a mistake - he used the same name for both output items.
TOSCA parser parses in a wrong way. For item 'auth_token' it creates Output object with string value equal to '{ get_property: [ authorization_form, auth_url ] }'
This problem can be quickly overtaken by fixing output item names, and parser resolves everything correctly.
So, there are two possible ways to resolve this issue:
- abort on parsing saying output overriding is not allowed.
- create two Output objects with correct TOSCA functions resolving and let user deal with it. |
|