Project

General

Profile

Actions

Feature #18532

closed

Better help for unsupported hammer commands

Added by Tomáš Strachota about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Hammer core
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Marek
Fixed in Releases:
Found in Releases:
In Kanboard:

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.


Related issues 1 (0 open1 closed)

Related to Hammer CLI - Tracker #20605: Backward compatibility supportClosed

Actions
Actions #1

Updated by Tomáš Strachota over 6 years ago

Actions #2

Updated by Oleh Fedorenko over 6 years ago

  • Status changed from New to Assigned
  • Assignee set to Oleh Fedorenko
Actions #3

Updated by The Foreman Bot over 6 years ago

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

Updated by Oleh Fedorenko about 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF