You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: coconut/cmd/role_query.go
+20-3Lines changed: 20 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -34,9 +34,26 @@ var roleQueryCmd = &cobra.Command{
34
34
Use: "query [environment id] [query path]",
35
35
Aliases: []string{"query", "q"},
36
36
Short: "query O² roles",
37
-
Long: `The role query command returns one or more role trees.`,
38
-
Run: control.WrapCall(control.QueryRoles),
39
-
Args: cobra.ExactArgs(2),
37
+
Long: `The role query command returns one or more role subtrees within a given environment.
38
+
39
+
It allows the user to inspect the environment's workflow at runtime, after template processing operations, including
40
+
iterator expansion, just-in-time subworkflow inclusion, and variable substitution, have taken place.
41
+
42
+
For the target role or roles, it also prints the locally defined variables, as well as the consolidated variable
43
+
stack from the point of view of that role.
44
+
45
+
The role query command accepts two arguments: the environment ID and the query path. The query path is a dot-separated
46
+
walk through the role tree of the given environment, starting from the root role. Wildcard expressions are allowed, as
47
+
per https://github.com/gobwas/glob syntax.
48
+
49
+
Examples:
50
+
* `+"`coconut role query 2rE9AV3m1HL readout-dataflow`"+` - queries the role `+"`readout-dataflow`"+` in environment `+"`2rE9AV3m1HL`"+`, prints the full tree, along with the variables defined in the root role
51
+
* `+"`coconut role query 2rE9AV3m1HL readout-dataflow.host-aido2-bld4-lab102`"+` - queries the role `+"`readout-dataflow.host-aido2-bld4-lab102`"+`, prints the subtree of that role, along with the variables defined in it
52
+
* `+"`coconut role query 2rE9AV3m1HL readout-dataflow.host-aido2-bld4-lab102.data-distribution.stfs`"+` - queries the role at the given path, it is a task role so there is no subtree, prints the variables defined in that role
53
+
* `+"`coconut role query 2rE9AV3m1HL readout-dataflow.host-aido2-bld4-lab*`"+` - queries the roles matching the given glob expression, prints all the subtrees and variables
54
+
* `+"`coconut role query 2rE9AV3m1HL readout-dataflow.host-aido2-bld4-lab*.data-distribution.*`"+` - queries the task roles matching the given glob expression, prints all the variables`,
0 commit comments