Skip to content

Commit

Permalink
fix tm inventory update help
Browse files Browse the repository at this point in the history
  • Loading branch information
Michio Honda committed Jan 5, 2021
1 parent 719da0d commit ba9659b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
5 changes: 3 additions & 2 deletions tm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {} [<args>] <node>'.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)')
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit ba9659b

Please sign in to comment.