4 def common_parser(prog
, description
):
6 Both prepare and create share the same parser, those are defined here to
9 parser
= argparse
.ArgumentParser(
11 formatter_class
=argparse
.RawDescriptionHelpFormatter
,
12 description
=description
,
14 required_args
= parser
.add_argument_group('required arguments')
17 help='A logical group name, path to a logical volume, or path to a device',
19 required_args
.add_argument(
22 help='A logical group name or a path to a logical volume',
29 help='Size (in GB) A logical group name or a path to a logical volume',
33 action
='store_true', default
=False,
34 help='Use the bluestore objectstore (not currently supported)',
38 action
='store_true', default
=True,
39 help='Use the filestore objectstore (currently the only supported object store)',
43 help='Reuse an existing OSD id',
47 help='Reuse an existing OSD fsid',
49 # Do not parse args, so that consumers can do something before the args get
50 # parsed triggering argparse behavior
54 create_parser
= common_parser
# noqa
55 prepare_parser
= common_parser
# noqa