Project

General

Profile

Actions

Bug #14620

closed

hammer content-view remove-version confusing with versions subcommand

Added by Andrew Kofink almost 9 years ago. Updated over 6 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1265686
Description of problem:
The subcommands 'add-version' and 'remove-version' are confusing with the 'versions' subcommand.
Secondly the documentation of the commands is useless with a generic remark that the content view is updated and not what it actually updates

  1. hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml content-view --help
    Usage:
    hammer content-view [OPTIONS] SUBCOMMAND [ARG] ...

Parameters:
SUBCOMMAND subcommand
[ARG] ... subcommand arguments

Subcommands:
add-repository Associate a resource
add-version Update a content view
create Create a content view
delete Delete a content view
filter View and manage filters
info Show a content view
list List content views
publish Publish a content view
puppet-module View and manage puppet modules
remove Remove versions and/or environments from a content view and reassign systems and keys
remove-from-environment Remove a content view from an environment
remove-repository Disassociate a resource
remove-version Update a content view
update Update a content view
version View and manage content view versions

Options:
-h, --help print help

In fact the 'add-version' and 'remove-version' is related to the API variable called components and the webUI 'content view'

This can also be seen with the output of remove-version:
  1. hammer -c /opt/hoici/etc/sat6/hammer-hoici.yaml content-view remove-version --organization-id=3 --id=13 --content-view-version-id=90
    The component version has been removed

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. See in general description.
2.
3.

Actual results:

Expected results:
Please rename the variables to what they really do, as 'version' is too generic name.
Proposals is to stay consistent with the API and change it to
- add-content-view-version-id
- remove-content-view-version-id

And for the description e.g. 'Associate a content view version (for composite content views only)'

Additional info:
The add-content-view-version-id is still a poor user-experience. It would be better to have a subcommand with additional option
- add-content-view
--add-id | --add-name
--add-environment
--add-version
--add-version-id


Related issues 1 (0 open1 closed)

Is duplicate of Katello - Refactor #14444: The hammer content view commands could use better descriptionsClosedDavid Davis04/01/2016Actions
Actions

Also available in: Atom PDF