Correct message format for plan_management workbook

In the plan management workbook we have a bunch of expressions
along the lines of "<% $.message or '' %>" to set a default
to the message if it's not set explicitly. However this is actually
wrong and will make the action fail with "YaqlEvaluationException:
Can not evaluate YAQL expression [expression=$.message or \'\',
error=u\'message\', data={}]\n'}". The correct way to do it is to
use <% $.get('message', '') %>, like the other workflows are.

Closes-Bug: 1686981
Change-Id: Ie6998c44eba46596b6d836b1201b782de761336a
This commit is contained in:
Janki Chhatbar 2017-05-05 08:05:15 +05:30 committed by Janki
parent 1ec72b5d10
commit b571285b42

View File

@ -45,7 +45,7 @@ workflows:
type: tripleo.plan_management.v1.create_default_deployment_plan
payload:
status: <% $.status %>
message: <% $.message or '' %>
message: <% $.get('message', '') %>
execution: <% execution() %>
on-success:
- fail: <% $.get('status') = "FAILED" %>
@ -193,7 +193,7 @@ workflows:
type: tripleo.plan_management.v1.create_deployment_plan
payload:
status: <% $.status %>
message: <% $.message or '' %>
message: <% $.get('message', '') %>
execution: <% execution() %>
on-success:
- fail: <% $.get('status') = "FAILED" %>
@ -287,7 +287,7 @@ workflows:
type: tripleo.plan_management.v1.update_deployment_plan
payload:
status: <% $.status %>
message: <% $.message or '' %>
message: <% $.get('message', '') %>
execution: <% execution() %>
on-success:
- fail: <% $.get('status') = "FAILED" %>
@ -348,7 +348,7 @@ workflows:
type: tripleo.plan_management.v1.get_passwords
payload:
status: <% $.status %>
message: <% $.message or '' %>
message: <% $.get('message', '') %>
execution: <% execution() %>
on-success:
- fail: <% $.get('status') = "FAILED" %>
@ -406,7 +406,7 @@ workflows:
type: tripleo.plan_management.v1.export_deployment_plan
payload:
status: <% $.status %>
message: <% $.message or '' %>
message: <% $.get('message', '') %>
execution: <% execution() %>
tempurl: <% task(create_tempurl).result %>
on-success: