Skip to content

Commit

Permalink
Specify default values, show them in help text
Browse files Browse the repository at this point in the history
Signed-off-by: mulhern <[email protected]>
  • Loading branch information
mulkieran committed Dec 18, 2024
1 parent 542ebe6 commit e0985c5
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/stratis_cli/_parser/_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
from argparse import SUPPRESS, ArgumentTypeError
from uuid import UUID

# isort: THIRDPARTY
from justbytes import MiB, Range

from .._actions import BindActions, PoolActions
from .._constants import (
Clevis,
Expand Down Expand Up @@ -186,8 +189,10 @@ def _ensure_nat(arg):
"Each block is written to this journal "
"before being written to its address. "
"The size of the journal must be a "
"multiple of 4 KiB."
"multiple of 4 KiB. The default is "
"%(default)s."
),
"default": Range(128, MiB),
"type": parse_range,
},
),
Expand All @@ -198,10 +203,11 @@ def _ensure_nat(arg):
"Integrity tag specification defining "
"the size of the tag used to store a "
"checksum or other value for each "
"block on a device. stratisd chooses "
"a default specification if none is "
"given."
"block on a device. All size "
"specifications are in bits. The "
"default is %(default)s."
),
"default": IntegrityTagSpec.B512,
"choices": list(IntegrityTagSpec),
"type": IntegrityTagSpec,
},
Expand Down

0 comments on commit e0985c5

Please sign in to comment.