[
https://issues.apache.org/jira/browse/ARIA-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026837#comment-16026837
]
ASF GitHub Bot commented on ARIA-149:
-------------------------------------
GitHub user tliron reopened a pull request:
https://github.com/apache/incubator-ariatosca/pull/138
ARIA-149 Enhance operation configuration
* Parse special "dependencies" configuration parameters as YAML and
treat as Parameter models, allowing them full use of intrinsic
functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
is now now a dict of Parameter models
* Added "function" and "arguments" fields to Operation model to preserve
user data (in "implementation" and "inputs") and to clearly demarcate
orchestration data from user data
* Some cleanup of parser code touched by this commit
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/incubator-ariatosca
ARIA-149-functions-in-operation-configuration
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-ariatosca/pull/138.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #138
----
commit f6ee65a9eaa8eb252c4431152327635a43dff425
Author: Tal Liron <[email protected]>
Date: 2017-04-20T22:54:47Z
ARIA-149 Enhance operation configuration
* Parse special "dependencies" configuration parameters as YAML and
treat as Parameter models, allowing them full use of intrinsic
functions, type coersions, and validations
* Rename various functions that process "properties" to more generically
process "parameters" (properties, inputs, attributes, arguments, etc.)
* The "configuration" field in OperationTemplate and Operation models
is now now a dict of Parameter models
* Added "function" and "arguments" fields to Operation model to preserve
user data (in "implementation" and "inputs") and to clearly demarcate
orchestration data from user data
* Some cleanup of parser code touched by this commit
commit 888c5cd6f86a12e096a8ce040aedd0f62c5eac0e
Author: Tal Liron <[email protected]>
Date: 2017-05-24T19:54:07Z
Fixes
* Rename implementation/inputs to function/arguments in Task API
* Rename "create_parameters" to "merge_parameter_values" and improve
* Change workflow "function" back to "implementation"
----
> Support instrinsic functions in "dependencies" operation configuration
> ----------------------------------------------------------------------
>
> Key: ARIA-149
> URL: https://issues.apache.org/jira/browse/ARIA-149
> Project: AriaTosca
> Issue Type: Story
> Reporter: Tal Liron
> Assignee: Tal Liron
>
> There are a few issues here. First, the following YAML is totally broken;
> {code}
> dependencies:
> - ssh.address > { get_attribute: virtual_ip.floating_ip }
> {code}
> The problem is that in YAML, due to the location of the ":", this gets parsed
> as a dict where the key is {code}ssh.address > { get_attribute{code} and the
> value is {code}virtual_ip.floating_ip }{code} which is not what we want at
> all.
> The solution is to encase the whole value in quotes to enforce parsing as a
> string:
> {code}
> dependencies:
> - "ssh.address > { get_attribute: virtual_ip.floating_ip }"
> {code}
> Note that the one attractive solution is to to change this ">" format to a
> real dict. So:
> {code}
> dependencies:
> - { ssh.address: { get_attribute: virtual_ip.floating_ip } }
> {code}
> But this will break other TOSCA parsers that expect a string here, so no go.
> :(
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)