Better help for unsupported hammer commands
|Status:||Ready For Testing|
|Assigned To:||Oleh Fedorenko|
|Target version:||Foreman - Team Marek backlog|
|Found in release:||Pull request:||https://github.com/theforeman/hammer-cli/pull/257|
|Velocity based estimate||-|
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.