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='(filestore) A logical volume (vg_name/lv_name), or path to a device',
20 required_args.add_argument(
23 type=arg_validators.LVPath(),
24 help='OSD data path. A physical device or logical volume',
31 help='(filestore) Size (in GB) for the journal',
36 help='Use the bluestore objectstore',
41 help='Use the filestore objectstore',
45 help='Reuse an existing OSD id',
49 help='Reuse an existing OSD fsid',
54 help='(bluestore) Path to bluestore block.db logical volume or device',
59 help='(bluestore) Path to bluestore block.wal logical volume or device',
61 # Do not parse args, so that consumers can do something before the args get
62 # parsed triggering argparse behavior
66 create_parser = common_parser # noqa
67 prepare_parser = common_parser # noqa