-
Notifications
You must be signed in to change notification settings - Fork 245
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
Set total/needed/happy from command-line #376
Conversation
Also useful for Docker-based workflows, since you can configure nodes using a handful of env vars. Definitely +1. |
2e3561d
to
b760f02
Compare
Hmm, it seems that something changed in how the defaults stuff works. e.g. |
Current coverage is 89.82% (diff: 100%)@@ master #376 diff @@
==========================================
Files 136 136
Lines 26835 26840 +5
Methods 0 0
Messages 0 0
Branches 3746 3747 +1
==========================================
+ Hits 24107 24108 +1
- Misses 2025 2026 +1
- Partials 703 706 +3
|
looks good to me! |
Shouldn't From Q2 in the Tahoe-LAFS FAQ:
|
I always felt the extra mapping (total shares → |
So actually I think there shouldn't be any short-options at all for this, but I didn't find a way to do that with Twisted I think that since we do seem to have to have short-options, using the same single-letters as other documents (per @crwood's suggestion) seems the best/most-consistent. |
Okay, I changed the short-options to: |
181f3a5
to
03bf227
Compare
I found a way to take out the short options, so I did. So, the only way to specify these now is via the (hopefully not confusing) long-options. |
03bf227
to
8353ba1
Compare
See corresponding ticket: https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2848#ticket |
What about "--shares-needed" etc, since that's what tahoe.cfg calls them? (well, |
3895192
to
b173fab
Compare
okay, changed to |
(this is for https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2848) |
Any particular reason to put the defaults in a
|
Also you might flip the order of the keys, making it (needed, happy, total), so the (some day we should look at the way |
oh, and maybe add a check that the parameters are really integers, so |
b173fab
to
5b8be25
Compare
@warner it seems there was a test passing a plain dict to |
Ah, right, dicts are a lazy substitute for the Config object.. your fix looks great. Will land it shortly. |
This allows you to specify values on the CLI for needed/happy/total shares configuration parameters. This eases scripts that are creating nodes (so they don't have to know how to edit
tahoe.cfg
immediately after creating a node).