Alex | 9a4ad21 | 2020-10-01 18:04:25 -0500 | [diff] [blame^] | 1 | def add_global_arguments(parser): |
| 2 | parser.add_argument( |
| 3 | "-d", |
| 4 | "--debug", |
| 5 | action="store_true", default=False, |
| 6 | help="Set CLI logging level to DEBUG" |
| 7 | ) |
| 8 | parser.add_argument( |
| 9 | '-s', |
| 10 | '--sudo', |
| 11 | action='store_true', default=True, |
| 12 | help="Use sudo for getting salt creds" |
| 13 | ) |
| 14 | parser.add_argument( |
| 15 | '--force-no-key', |
| 16 | action='store_true', default=False, |
| 17 | help="Use sudo for getting salt creds" |
| 18 | ) |
| 19 | parser.add_argument( |
| 20 | '--skip-nodes', |
| 21 | metavar='skip_string', default=None, |
| 22 | help="String with nodes to skip. Only trailing '*' supported!" |
| 23 | " Example: 'cmp*,ctl01'" |
| 24 | ) |
| 25 | parser.add_argument( |
| 26 | '--kube-config-path', |
| 27 | metavar='skip_string', default="/root/.kube/config", |
| 28 | help="Kube config path with certificates and keys. " |
| 29 | "Default: '/root/.kube/config'" |
| 30 | ) |
| 31 | parser.add_argument( |
| 32 | '--use-env', |
| 33 | metavar='use_env', |
| 34 | help="Specify env to use if function supports multiple among detected" |
| 35 | " Example: SALT/KUBE" |
| 36 | ) |
| 37 | |
| 38 | parser.add_argument( |
| 39 | '--skip-nodes-file', |
| 40 | metavar='skip_nodes_file', default=None, |
| 41 | help="Filename with nodes to skip. Note: use fqdn node names." |
| 42 | ) |