()
| 4913 | |
| 4914 | |
| 4915 | def _get_parser(): |
| 4916 | # type: () -> argparse.ArgumentParser |
| 4917 | parser = argparse.ArgumentParser( |
| 4918 | description='Bootstrap Ceph daemons with systemd and containers.', |
| 4919 | formatter_class=argparse.ArgumentDefaultsHelpFormatter) |
| 4920 | parser.add_argument( |
| 4921 | '--image', |
| 4922 | help='container image. Can also be set via the "CEPHADM_IMAGE" ' |
| 4923 | 'env var') |
| 4924 | parser.add_argument( |
| 4925 | '--docker', |
| 4926 | action='store_true', |
| 4927 | help='use docker instead of podman') |
| 4928 | parser.add_argument( |
| 4929 | '--data-dir', |
| 4930 | default=DATA_DIR, |
| 4931 | help='base directory for daemon data') |
| 4932 | parser.add_argument( |
| 4933 | '--log-dir', |
| 4934 | default=LOG_DIR, |
| 4935 | help='base directory for daemon logs') |
| 4936 | parser.add_argument( |
| 4937 | '--logrotate-dir', |
| 4938 | default=LOGROTATE_DIR, |
| 4939 | help='location of logrotate configuration files') |
| 4940 | parser.add_argument( |
| 4941 | '--sysctl-dir', |
| 4942 | default=SYSCTL_DIR, |
| 4943 | help='location of sysctl configuration files') |
| 4944 | parser.add_argument( |
| 4945 | '--unit-dir', |
| 4946 | default=UNIT_DIR, |
| 4947 | help='base directory for systemd units') |
| 4948 | parser.add_argument( |
| 4949 | '--verbose', '-v', |
| 4950 | action='store_true', |
| 4951 | help='Show debug-level log messages') |
| 4952 | parser.add_argument( |
| 4953 | '--log-dest', |
| 4954 | action='append', |
| 4955 | choices=[v.name for v in LogDestination], |
| 4956 | help='select one or more destination for persistent logging') |
| 4957 | parser.add_argument( |
| 4958 | '--timeout', |
| 4959 | type=int, |
| 4960 | default=DEFAULT_TIMEOUT, |
| 4961 | help='timeout in seconds') |
| 4962 | parser.add_argument( |
| 4963 | '--retry', |
| 4964 | type=int, |
| 4965 | default=DEFAULT_RETRY, |
| 4966 | help='max number of retries') |
| 4967 | parser.add_argument( |
| 4968 | '--env', '-e', |
| 4969 | action='append', |
| 4970 | default=[], |
| 4971 | help='set environment variable') |
| 4972 | parser.add_argument( |
no test coverage detected