From ba9659b72af09afbbb26ebd56126100c3b713e66 Mon Sep 17 00:00:00 2001 From: Michio Honda Date: Tue, 5 Jan 2021 16:34:08 +0000 Subject: [PATCH] fix tm inventory update help --- README.md | 2 +- tm.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6307e3b..66b384b 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ sudo cp tm-cleanup.* /usr/lib/systemd/system/ ``` sudo systemctl enable tm-cleanup.timer sudo systemctl start tm-cleanup.timer -systemctl start list-timers +sudo systemctl list-timers ``` In the UNIT and ACTIVATES rows, tm-cleanup.timer and tm-cleanup.service should appear, respectively. diff --git a/tm.py b/tm.py index c8312e8..2090039 100755 --- a/tm.py +++ b/tm.py @@ -266,7 +266,8 @@ def inventory(self, argv): t = True f = False for cmd in ('add', 'update'): - p = subparsers.add_parser(cmd) + p = subparsers.add_parser(cmd, + usage='tm inventory {} [] '.format(cmd)) lm = lambda o, t, r, h: p.add_argument(o, type=t, required=r, help=h) lm('--mac', str, t, 'MAC addr (e.g., 00:00:00:00:00:00)') lm('--ip', str, t, 'IPv4 addr (e.g., 192.168.0.2)') @@ -455,7 +456,7 @@ def power(self, argv): try: r = ipmi.chassis_control_power_cycle() except(pyipmi.errors.CompletionCodeError): - self.pr_msg(TmMsg.fail_restart(args.node, args.command)) + self.pr_msg(TmMsg.fail_restart(args.node)) break except(RuntimeError):