Actions
Feature #18532
closedBetter help for unsupported hammer commands
Difficulty:
Triaged:
Pull request:
Team Backlog:
Marek
Description
Hammer commands which use api endpoints that are not defined on the server (eg. newer hammer executed against older Foreman) fail correctly when one tries to execute them, but they provide empty help. We can detect such situations from apidoc (documentation for the action is missing) and print some meaningful message instead.
Example with cloning user roles:
hammer role clone Could not clone the user role: Error: The server does not support such operation.
Help prints empty options, which isn't very helpful:
hammer role clone -h Usage: hammer role clone [OPTIONS] Options: -h, --help print help
We should print some informative message instead:
hammer role clone -h Usage: hammer role clone [OPTIONS] Unfortunately the server does not support such operation.
Updated by Tomáš Strachota over 7 years ago
- Related to Tracker #20605: Backward compatibility support added
Updated by Oleh Fedorenko about 7 years ago
- Status changed from New to Assigned
- Assignee set to Oleh Fedorenko
Updated by The Foreman Bot about 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/hammer-cli/pull/257 added
Updated by Oleh Fedorenko almost 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 768325dce43e3723bcc4fab66f900cc140653287.
Actions