Thanks for y’alls patience as I teach myself YAQL and Orquesta…
I now have a semi-fuinctioning workflow. Here’s where I’m stuck:
I’m publishing dictionaries of result() data from tasks into variables. Now I want to use part of that information as input to a pre-defined task in a pack (AWS in this case).
The task has two input variables. The data I need for one of those input variables has to be derived by identifying one value from a dictionary, and then looking up another dictionary value in a list that has an element matching that value, and then returning the desired ID string. Logic dictates I would declare a variable like:
dxcon_parse:
action: core.noop
input:
dxlist: <% dxcon_info().get("connections") %>
dxcons: <% dict(dxlist=>dict(ctx(dxlist).select([$.vlan, $]))) %>
aws_vlan: <% ctx(pf_vc_info).get(pf_csp_vlan) %>
aws_con_id: <% dxcons().get(aws_dx_con_vlan) %>
next:
- do:
- dxcon_accept
- publish:
- aws_dx_con_vlan: <% ctx(aws_vlan) %>
- aws_dx_con_id: <% ctx(aws_con_id) %>
Syntactically I believe that is proper. However, my problem is that when I execute, the engine complains:
"errors": [
{
"type": "content",
"message": "Action \"aws.directconnect_confirm_connection\" has unexpected input \"aws_vlan\".",
"spec_path": "tasks.dxcon_accept.input.aws_vlan",
"schema_path": "properties.tasks.patternProperties.^\\w+$.properties.input.patternProperties.^\\w+$"
}
It seems I can’t add new input variables, and I can’t (or don’t know how) declare derived variables that
eventually feed the input of the task. I tried making up a new task, but it complained there was no
action, and I tried using core.noop
but it similarly complained of unexpected inputs.
Surely I can’t be the only person ever to need to massage some data out of one variable to feed into another?