1 from ceph_volume
.util
import arg_validators
5 def common_parser(prog
, description
):
7 Both prepare and create share the same parser, those are defined here to
10 parser
= argparse
.ArgumentParser(
12 formatter_class
=argparse
.RawDescriptionHelpFormatter
,
13 description
=description
,
15 required_args
= parser
.add_argument_group('required arguments')
18 help='A logical volume (vg_name/lv_name), or path to a device',
20 required_args
.add_argument(
23 type=arg_validators
.LVPath(),
24 help='A logical volume (vg_name/lv_name) for OSD data',
31 help='Size (in GB) A logical group name or a path to a logical volume',
35 action
='store_true', default
=False,
36 help='Use the bluestore objectstore (not currently supported)',
40 action
='store_true', default
=True,
41 help='Use the filestore objectstore (currently the only supported object store)',
45 help='Reuse an existing OSD id',
49 help='Reuse an existing OSD fsid',
51 # Do not parse args, so that consumers can do something before the args get
52 # parsed triggering argparse behavior
56 create_parser
= common_parser
# noqa
57 prepare_parser
= common_parser
# noqa