-
-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make --network accept a file argument and add a --flake flag #1480
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
--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).