The controller seat gains a generic verb: command runs one line of the binary and answers what it printed
Beside the named verbs, `command` takes a command line as the controller's own shell would — `node account g14 jochen`, `node show ace`, `module list` — splits it as a shell does (quotes group, backslash escapes, nothing expanded) and runs it in this binary like every other verb. The named verbs keep their schemas; this is the whole binary, added because the operator decided any node may call any tool (hq ADR 0175) and a verb per command was the only thing keeping the rest behind a shell on the control node. ADR 0154 carries the dated note. Tests: a plain line, quoted words, an empty line and an unclosed quote refused.
This commit is contained in:
@@ -145,6 +145,13 @@ var ControllerVerbs = []Verb{
|
||||
"node": "one machine; the whole mesh when absent",
|
||||
"clear": "\"true\" to remove the layer instead of setting it",
|
||||
}, []string{"module"})},
|
||||
{Name: "command", Description: "Run one command line of the controller's own, as you would type it at its " +
|
||||
"shell — `node account g14 jochen`, `node show ace`, `module list` — and answer what it printed. The " +
|
||||
"generic verb beside the named ones (novox/hq ADR 0154): everything the binary can do, without a verb " +
|
||||
"per command. Any node may call any tool (ADR 0175), so nothing is held back here.",
|
||||
Input: schema(map[string]string{
|
||||
"command": "the command line, as the controller's binary takes it; quotes group a word with spaces",
|
||||
}, []string{"command"})},
|
||||
{Name: "build", Description: "Have the build machine build a repository. Answers at once with the build's id: " +
|
||||
"`builds` with that id follows it line by line, and the module is registered when the outcome comes.",
|
||||
Input: schema(map[string]string{
|
||||
|
||||
Reference in New Issue
Block a user