This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-docs.git
The following commit(s) were added to refs/heads/master by this push:
new c4c201ed add docs for target_index and interpolation for blueprints
and ssh scripts
c4c201ed is described below
commit c4c201ed1cf83349a654f42d9131b08eeafdea55
Author: Alex Heneveld <[email protected]>
AuthorDate: Fri Mar 24 08:52:55 2023 +0000
add docs for target_index and interpolation for blueprints and ssh scripts
---
guide/blueprints/workflow/nested-workflow.md | 3 +++
guide/blueprints/workflow/steps/steps.yaml | 11 ++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/guide/blueprints/workflow/nested-workflow.md
b/guide/blueprints/workflow/nested-workflow.md
index fd52ead4..ee64804c 100644
--- a/guide/blueprints/workflow/nested-workflow.md
+++ b/guide/blueprints/workflow/nested-workflow.md
@@ -55,6 +55,9 @@ as follows:
* If the target is of the form `M..N` for integers `M` and `N` it will run for
all integers in that range,
inclusive (so the string `1..4` is equivalent to the list `[1,2,3,4]`)
+The scratch variables `target` and `target_index` are available referring to
to the specific target
+and its 0-indexed position.
+
Where a list is supplied, the result of the step is the list collecting the
output of each sub-workflow.
If a `condition` is supplied when a list is being used, the `workflow` step
will always run,
diff --git a/guide/blueprints/workflow/steps/steps.yaml
b/guide/blueprints/workflow/steps/steps.yaml
index 522cc0bd..6226c8e9 100644
--- a/guide/blueprints/workflow/steps/steps.yaml
+++ b/guide/blueprints/workflow/steps/steps.yaml
@@ -115,9 +115,9 @@
* `url`: the URL to load
* `charset`: the charset to use to process the input
* `interpolation_mode`: whether to evaluated interpolated expressions
in the content; default `disabled`; options are as for `let`
- * `interpolation_errors`: how to handle errors in interpolated
expressions, if `interpolation_mode` is set;
- the default `ignore` will leave unresolveable expressions in their
expression form which is useful for scripts and other templating systems;
- options are as for `let`
+ * `interpolation_errors`: how to handle errors in interpolated
expressions, if `interpolation_mode` is set; the default here is `ignore`
+ which applies if `interpolation_mode` is set, and will leave
unresolveable expressions untouched
+ so that such expressions can be resolved later by command shells or
re-resolution; options are as for `let`
output: |
the output from the previous step or null if this is the first step
@@ -266,6 +266,7 @@
* `exit_code`: the word `any`, a number, or a predicate DSL expression
(e.g. `less-than: 32`)
* `output_max_size`: by default output from commands is limited to
100k, truncating to keep the end; this can be increased or decreased,
or disabled with `-1` (assuming Apache Brooklyn has sufficient
memory to hold the data)
+ * `interpolation_mode` and `interpolation_errors`: as per `let` and
`load`, with defaults `full` and `ignore` so that applicable values are
resolved and others deferred
# [//]: # (* `endpoint`: an alternative endpoint (format TODO);
typically this is omitted and the SSH machine location of the entity is the
target)
# [//]: # (* `key`: a private key to use for the connection to the
endpoint (TODO, again typically embedded in the SSH machine location of the
entity))
@@ -284,6 +285,7 @@
to require of the exit status code from the command,
defaulting to `0`
* `output_max_size`: by default output from commands is limited to
100k, truncating to keep the end; this can be increased or decreased,
or disabled with `-1` (assuming Apache Brooklyn has sufficient
memory to hold the data)
+ * `interpolation_mode` and `interpolation_errors`: as per `let` and
`load`, with defaults `full` and `ignore` so that applicable values are
resolved and others deferred
# [//]: # (* `endpoint`: an alternative endpoint (format TODO);
typically this is omitted and the SSH machine location of the entity is the
target)
# [//]: # (* `key`: a private key to use for the connection to the
endpoint (TODO, again typically embedded in the SSH machine location of the
entity))
@@ -384,6 +386,7 @@
* `type`: a registered type to deploy as a root application, without
any configuration; exactly one of this and `blueprint` is required
* `blueprint`: the blueprint to deploy
* `format`: optional format specifier for the blueprint
+ * `interpolation_mode` and `interpolation_errors`: as per `let` and
`load`, with defaults `full` and `ignore` so that applicable values are
resolved and others deferred
output: |
* `app`: the application instance deployed
@@ -394,6 +397,7 @@
* `type`: a registered type to add as a child here, without any
configuration; exactly one of this and `blueprint` is required
* `blueprint`: the blueprint of the entity, or a list of such
blueprints, to be added at the current entity
* `format`: optional format specifier for the blueprint
+ * `interpolation_mode` and `interpolation_errors`: as per `let` and
`load`, with defaults `full` and `ignore` so that applicable values are
resolved and others deferred
output: |
* `entities`: a list of entities added
* `entity`: if a single entity was added, that entity, otherwise unset
@@ -420,6 +424,7 @@
* `type`: a registered type to add as a child here, without any
configuration; exactly one of this and `blueprint` is required
* `blueprint`: the blueprint of the entity, or a list of such
blueprints, to be added at the current entity
* `entity`: the entity or entity ID where the initializer should be
run, defaulting to the current entity
+ * `interpolation_mode` and `interpolation_errors`: as per `let` and
`load`, with defaults `full` and `ignore` so that applicable values are
resolved and others deferred
output: the output from the previous step, or null if this is the first
step
- name: add-policy