Feature #18532

Better help for unsupported hammer commands

Added by Tomáš Strachota 10 months ago. Updated about 1 month ago.

Status:Ready For Testing
Assigned To:Oleh Fedorenko
Category:Hammer core
Target version:Foreman - Team Marek backlog
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/hammer-cli/pull/257
Story points-
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
    hammer role clone [OPTIONS]

 -h, --help                    print help

We should print some informative message instead:

hammer role clone -h
    hammer role clone [OPTIONS]

Unfortunately the server does not support such operation.

Related issues

Related to Hammer CLI - Tracker #20605: Backward compatibility support New 08/15/2017


#1 Updated by Tomáš Strachota 4 months ago

#2 Updated by Oleh Fedorenko about 1 month ago

  • Assigned To set to Oleh Fedorenko
  • Status changed from New to Assigned

#3 Updated by The Foreman Bot about 1 month ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/257 added

Also available in: Atom PDF