all: Switch the --lang syntax to use argv instead

It was a bit awkward using `mgmt run lang --lang <input>` so instead, we
now drop the --lang, and read the positional argv for the input.

This also does the same for the --yaml frontend.
This commit is contained in:
James Shubin
2019-05-05 10:37:53 -04:00
parent b3632584c3
commit 43839d1090
42 changed files with 91 additions and 78 deletions

View File

@@ -298,10 +298,6 @@ recommended that you use this, since it's preferable to write code in the
The main interface to the `mgmt` tool is the command line. For the most recent
documentation, please run `mgmt --help`.
#### `--yaml <graph.yaml>`
Point to a graph file to run.
#### `--converged-timeout <seconds>`
Exit if the machine has converged for approximately this many seconds.

View File

@@ -212,7 +212,7 @@ requires a number of seconds as an argument.
#### Example:
```
./mgmt run lang --lang examples/lang/hello0.mcl --converged-timeout=5
./mgmt run lang examples/lang/hello0.mcl --converged-timeout=5
```
### On startup `mgmt` hangs after: `etcd: server: starting...`.

View File

@@ -173,7 +173,7 @@ useful when you are in the process of replacing Puppet with mgmt. You
can translate your custom modules into mgmt's language one by one,
and let mgmt run the current mix.
Instead of the usual `--puppet`, `--puppet-conf`, and `--lang` for mcl,
Instead of the usual `--puppet-conf` flag and argv for `puppet` and `mcl` input,
you need to use alternative flags to make this work:
* `--lp-lang` to specify the mcl input

View File

@@ -57,8 +57,8 @@ export PATH=$PATH:$GOPATH/bin
### Running mgmt
* Run `time ./mgmt run --tmp-prefix lang --lang examples/lang/hello0.mcl` to try
out a very simple example!
* Run `time ./mgmt run --tmp-prefix lang examples/lang/hello0.mcl` to try out a
very simple example!
* Look in that example file that you ran to see if you can figure out what it
did!
* Have fun hacking on our future technology and get involved to shape the
@@ -181,5 +181,5 @@ Other examples:
```
docker/scripts/exec-development make build
docker/scripts/exec-development ./mgmt run --tmp-prefix lang --lang examples/lang/load0.mcl
docker/scripts/exec-development ./mgmt run --tmp-prefix lang examples/lang/load0.mcl
```