-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2853 from didier-wenzek/feat/sub-sub-workflow
feat: add support for sub-sub operations
- Loading branch information
Showing
6 changed files
with
138 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
tests/RobotFramework/tests/tedge_agent/workflows/gp-command-expected.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{"payload":{"output_file":"/tmp/test-sub-sub.json","status":"dump_payload","x_ter":"some x value","y":"some y value","y_ter":"some y value"},"topic":"te/device/main///cmd/super_command/sub:gp_command:test-sub-sub"} | ||
{"payload":{"output_file":"/tmp/test-sub-sub.json","status":"dump_payload","x":"some x value","y":"some y value"},"topic":"te/device/main///cmd/gp_command/test-sub-sub"} |
18 changes: 18 additions & 0 deletions
18
tests/RobotFramework/tests/tedge_agent/workflows/gp_command.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Example of an operation with 3 levels | ||
# gp_command -> super_command -> sub_command | ||
operation = "gp_command" | ||
|
||
[init] | ||
operation = "super_command" | ||
input.output_file = "${.payload.output_file}" | ||
on_exec = "awaiting_completion" | ||
|
||
[awaiting_completion] | ||
action = "await-operation-completion" | ||
on_success = "dump_payload" | ||
output.x = "${.payload.x_ter}" | ||
output.y = "${.payload.y_ter}" | ||
|
||
[dump_payload] | ||
script = "/etc/tedge/operations/write-file.sh ${.payload.output_file} ${.}" | ||
on_success = "successful" |
File renamed without changes.