Skip to content

Commit fcb4e67

Browse files
authored
Merge pull request #3984 from clumens/unnecessary-metavar
Refactor: python: Remove unnecessary metavar= settings.
2 parents b11472d + 7c24532 commit fcb4e67

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

agents/stonith/fence_legacy.in

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,20 @@ def parse_cli_options():
9595
# Don't add standard help option, so we can format it how we want
9696
parser = argparse.ArgumentParser(add_help=False)
9797

98-
parser.add_argument("-t", metavar="SUBAGENT", dest="subagent",
99-
nargs=1, default="none", help="sub-agent")
98+
parser.add_argument("-t", dest="subagent", nargs=1, default="none",
99+
help="sub-agent")
100100

101-
parser.add_argument("-n", metavar="NODE", dest="node",
102-
nargs=1, default="", help="name of target node")
101+
parser.add_argument("-n", dest="node", nargs=1, default="",
102+
help="name of target node")
103103

104104
# The help text here is consistent with the original version, though
105105
# perhaps all actions should be listed.
106-
parser.add_argument("-o", metavar="ACTION", dest="action",
107-
nargs=1, choices=ACTIONS, default="reset",
106+
parser.add_argument("-o", dest="action", nargs=1, choices=ACTIONS,
107+
default="reset",
108108
help="action: on | off | reset (default) | stat | hostlist")
109109

110-
parser.add_argument("-s", metavar="COMMAND", dest="command",
111-
nargs=1, default="stonith", help="stonith command")
110+
parser.add_argument("-s", dest="command", nargs=1, default="stonith",
111+
help="stonith command")
112112

113113
parser.add_argument("-q", dest="quiet", action="store_true",
114114
help="quiet mode")

cts/cts-cli.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3230,7 +3230,7 @@ def build_options():
32303230
description="Command line tool regression tests",
32313231
epilog=f"Default tests: {' '.join(default_tests)}\n"
32323232
"Other tests: agents (must be run in an installed environment)")
3233-
parser.add_argument("-j", "--jobs", metavar="JOBS", default=cpu_count() - 1, type=int,
3233+
parser.add_argument("-j", "--jobs", default=cpu_count() - 1, type=int,
32343234
help="The number of tests to run simultaneously")
32353235
parser.add_argument("-p", "--path", metavar="DIR", action="append",
32363236
help="Look for executables in DIR (may be specified multiple times)")

python/pacemaker/_cts/environment.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,15 +248,13 @@ def _parse_args(self, argv):
248248
help="List the valid tests")
249249
grp1.add_argument("--nodes",
250250
default="",
251-
metavar="NODES",
252251
help="List of cluster nodes separated by whitespace")
253252

254253
grp2 = parser.add_argument_group("Options that CTS will usually auto-detect correctly")
255254
grp2.add_argument("-L", "--logfile",
256255
metavar="PATH",
257256
help="Where to look for logs from cluster nodes (or 'journal' for systemd journal)")
258257
grp2.add_argument("--ip", "--test-ip-base",
259-
metavar="IP",
260258
help="Offset for generated IP address resources")
261259
grp2.add_argument("--nic",
262260
default="eth0",
@@ -314,11 +312,9 @@ def _parse_args(self, argv):
314312
metavar="PATH",
315313
help="Location to write logs to")
316314
grp4.add_argument("--schema",
317-
metavar="SCHEMA",
318315
default=f"pacemaker-{BuildOptions.CIB_SCHEMA_VERSION}",
319316
help="Create a CIB conforming to the given schema")
320317
grp4.add_argument("--seed",
321-
metavar="SEED",
322318
help="Use the given string as the random number seed")
323319
grp4.add_argument("--trunc",
324320
action="store_true", dest="truncate",

0 commit comments

Comments
 (0)