Bug 1255242 - Hammer content view version command very buggy
Hammer content view version command very buggy
Status: CLOSED DUPLICATE of bug 1241956
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Views (Show other bugs)
6.1.0
All Linux
medium Severity medium (vote)
: 6.1.2
: 6.1
Assigned To: satellite6-bugs
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-20 02:02 EDT by Anand Vaddarapu
Modified: 2017-12-11 12:42 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-12-11 12:42:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Anand Vaddarapu 2015-08-20 02:02:11 EDT
Description of problem:
The search, by and order options for this particular command don't seem to work at all.

hammer> content-view version list --help
Usage:
     content-view version list [OPTIONS]

Options:
 --by BY                                     Field to sort the results on
 --composite-version-id COMPOSITE_VERSION_ID Filter versions that are components in the specified composite version
 --content-view CONTENT_VIEW_NAME            Content view name
 --content-view-id CONTENT_VIEW_ID           content view numeric identifier
 --environment ENVIRONMENT_NAME              Name to search by
 --environment-id ENVIRONMENT_ID
 --full-results FULL_RESULTS                 Whether or not to show all results
                                             One of true/false, yes/no, 1/0.
 --order ORDER                               Sort field and order, eg. 'name DESC'
 --organization ORGANIZATION_NAME            Organization name to search by
 --organization-id ORGANIZATION_ID           organization ID
 --organization-label ORGANIZATION_LABEL     Organization label to search by
 --page PAGE                                 Page number, starting at 1
 --per-page PER_PAGE                         Number of results per page to return
 --search SEARCH                             Search string
 --version VERSION                           Filter versions by version number
 -h, --help                                  print help

Sorting using "by" doesn't work (ids are out of order below):

---|-------------------------------|---------|-----------------------
ID | NAME                          | VERSION | LIFECYCLE ENVIRONMENTS
---|-------------------------------|---------|-----------------------
11 | RHEL 6 9.0                    | 9.0     |
10 | RHEL 6 8.0                    | 8.0     |
9  | RHEL 6 7.0                    | 7.0     |
8  | RHEL 6 6.0                    | 6.0     | stage1
24 | EPEL 6 3.0                    | 3.0     | Library

Sorting using "by" doesn't work (names are out of order below):

hammer> content-view version list --by NAME
---|-------------------------------|---------|-----------------------
ID | NAME                          | VERSION | LIFECYCLE ENVIRONMENTS
---|-------------------------------|---------|-----------------------
17 | Puppet Forge 1.0              | 1.0     |
16 | EPEL 6 1.0                    | 1.0     |
2  | RHEL 6 1.0                    | 1.0     | Dev
1  | Default Organization View 1.0 | 1.0     | Library
---|-------------------------------|---------|-----------------------

Sorting using "order" doesn't work at all:

hammer> content-view version list --order 'name ASC'
the field 'name' in the order statement is not valid field for search
hammer> content-view version list --order 'NAME ASC'
the field 'NAME' in the order statement is not valid field for search

Search doesn't filter the data:

hammer> content-view version list --search RHEL
---|-------------------------------|---------|-----------------------
ID | NAME                          | VERSION | LIFECYCLE ENVIRONMENTS
---|-------------------------------|---------|-----------------------
6  | RHEL Repo 2.0                 | 2.0     |                       
5  | RHEL Repo 1.0                 | 1.0     |                       
4  | v2v 1.0                       | 1.0     | Library               
1  | Default Organization View 1.0 | 1.0     | Library               
---|-------------------------------|---------|-----------------------

Sorting using "by" doesn't not request option:

hammer> content-view version list --by
---|-------------------------------|---------|-----------------------
ID | NAME                          | VERSION | LIFECYCLE ENVIRONMENTS
---|-------------------------------|---------|-----------------------
6  | RHEL Repo 2.0                 | 2.0     |                       
5  | RHEL Repo 1.0                 | 1.0     |                       
4  | v2v 1.0                       | 1.0     | Library               
1  | Default Organization View 1.0 | 1.0     | Library               
---|-------------------------------|---------|-----------------------

Sorting using "by" does take wrong option but doesn't give an error:
hammer> content-view version list --by anything
---|-------------------------------|---------|-----------------------
ID | NAME                          | VERSION | LIFECYCLE ENVIRONMENTS
---|-------------------------------|---------|-----------------------
6  | RHEL Repo 2.0                 | 2.0     |                       
5  | RHEL Repo 1.0                 | 1.0     |                       
4  | v2v 1.0                       | 1.0     | Library               
1  | Default Organization View 1.0 | 1.0     | Library               
---|-------------------------------|---------|-----------------------

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


How reproducible:
Reproducible steps are above.

Steps to Reproduce:
1.
2.
3.

Actual results:
See above results.

Expected results:
Hammer content view version command should just work as per help page

Additional info:
Comment 2 Bryan Kearney 2016-07-08 16:25:32 EDT
Per 6.3 planning, moving out non acked bugs to the backlog
Comment 4 hprakash 2016-11-15 01:02:05 EST
Can we have this bug in 6.3 please?
Comment 5 jalviso 2017-01-09 23:42:38 EST
Hi,

Customer requested if this bug can be fix in 6.3? Would be convenient to have those options fully working.

Regards,

Josephine
Comment 8 Bryan Kearney 2017-12-11 12:42:10 EST
Closing as a dupe of 1241956. If this was done incorrectly, please feel free to re-open and provide any additional information

*** This bug has been marked as a duplicate of bug 1241956 ***

Note You need to log in before you can comment on or make changes to this bug.