Bug 1388642

Summary: Can't specify organization in hammer content-view filter delete/info/list/update commands
Product: Red Hat Satellite Reporter: Andrii Balakhtar <abalakht>
Component: Hammer - ContentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: John Mitsch <jomitsch>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.3.0CC: dhlavacd, inecas, jomitsch, mhulan, rplevka, sabnave, tstrachota
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1398677 (view as bug list) Environment:
Last Closed: 2018-02-21 16:44:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1398677    

Description Andrii Balakhtar 2016-10-25 19:51:22 UTC
Description of problem:
Following content-view filter commands are missing --organization, --organization-id and --organization-label options:
content-view filter delete
content-view filter info
content-view filter list
content-view filter update

This becomes and issue when you don't have `content-view` and `content-view filter` IDs and specifying them by names, in such case organization should be specified too, e.g.:
content-view filter delete --organization="test_org" --name="test_filter" --content-view="test_cv"
Currently this command returns following error:
Error: Unrecognised option '--organization'
However, if you attempt to pass the command with no organization specified, you'll receive following error:
Could not delete the filter:
  Error: Could not find organization. Some search options were missing, please see --help.


Version-Release number of selected component (if applicable):
Satellite 6.3 Snap 5

How reproducible:
Always

Steps to Reproduce:
1. See `Description of problem`
2.
3.

Actual results:
--organization, --organization-id and --organization-label options are missing, no way to execute commands with only names (not ids) specified

Expected results:
--organization, --organization-id and --organization-label options should be accepted

Additional info:

Comment 5 Roman Plevka 2016-11-25 13:43:05 UTC
`hammer content-view delete` is affected by this as well

Comment 6 John Mitsch 2017-08-02 19:20:33 UTC
Verified in 6.3.0 snap 9

The following worked:

hammer content-view list --organization-label "Default_Organization"
hammer content-view list --organization "Default Organization"
hammer content-view list --organization-id 1

I didn't find any issues with create/info/update/delete either

Comment 7 Satellite Program 2018-02-21 16:44:36 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336