Make --network accept a file argument and add a --flake flag#1480
Make --network accept a file argument and add a --flake flag#1480talyz wants to merge 1 commit intoNixOS:masterfrom
Conversation
2809295 to
0ac23a7
Compare
|
This needs documentation and tests. We have unit tests in tests.py and the tests directory, or NixOS/nixpkgs#142035 could be added here for end to end tests. Not sure if eval-machine-info needs to use the name, instead of Documentation can be updated in doc/manual/nixops.rst |
I'm not sure how to add this to the unit tests - it doesn't really feel suited for it. The NixOS test could be updated for it, though.
I'm not really sure what this is referring to in relation to this change.
I've added some basic parameter documentation now and removed the references I could find to the previous |
| network_path: str = "" | ||
| flake_path: str = "" | ||
|
|
||
| if args.network_path is not None: |
There was a problem hiding this comment.
| if args.network_path is not None: | |
| if args.network_path is not None and args.flake_path is not None: | |
| raise ValueError("You can only provide one of either -f or -n") | |
| if args.network_path is not None: |
There was a problem hiding this comment.
This is already covered by argparse, since --network and --flake are put into a mutually exclusive group.
To make it possible to keep multiple network definitions in the same directory, make the `--network` flag accept a file in addition to a directory. Also, add a corresponding `--flake` flag and create short flags for both (`-n` and `-f` respectively).
To make it possible to keep multiple network definitions in the same directory, make the
--networkflag accept a file in addition to a directory. Also, add a corresponding--flakeflag and create short flags for both (-nand-frespectively).