query O² roles
The role query command returns one or more role subtrees within a given environment.
It allows the user to inspect the environment's workflow at runtime, after template processing operations, including iterator expansion, just-in-time subworkflow inclusion, and variable substitution, have taken place.
For the target role or roles, it also prints the locally defined variables, as well as the consolidated variable stack from the point of view of that role.
The role query command accepts two arguments: the environment ID and the query path. The query path is a dot-separated walk through the role tree of the given environment, starting from the root role. Wildcard expressions are allowed, as per https://github.com/gobwas/glob syntax.
Examples:
coconut role query 2rE9AV3m1HL readout-dataflow- queries the rolereadout-dataflowin environment2rE9AV3m1HL, prints the full tree, along with the variables defined in the root rolecoconut role query 2rE9AV3m1HL readout-dataflow.host-aido2-bld4-lab102- queries the rolereadout-dataflow.host-aido2-bld4-lab102, prints the subtree of that role, along with the variables defined in itcoconut 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 rolecoconut role query 2rE9AV3m1HL readout-dataflow.host-aido2-bld4-lab*- queries the roles matching the given glob expression, prints all the subtrees and variablescoconut role query 2rE9AV3m1HL readout-dataflow.host-aido2-bld4-lab*.data-distribution.*- queries the task roles matching the given glob expression, prints all the variables
coconut role query [environment id] [query path] [flags]
-h, --help help for query
--config string optional configuration file for coconut (default $HOME/.config/coconut/settings.yaml)
--config_endpoint string configuration endpoint used by AliECS core as PROTO://HOST:PORT (default "apricot://127.0.0.1:32101")
--endpoint string AliECS core endpoint as HOST:PORT (default "127.0.0.1:32102")
--nocolor disable colors in output
--nospinner disable animations in output
-v, --verbose show verbose output for debug purposes
- coconut role - query roles in an environment