Bug 1923209

Summary: hammer content-view filter delete fails
Product: Red Hat Satellite Reporter: Stephen Wadeley <swadeley>
Component: Content ViewsAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Danny Synk <dsynk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: apatel, jcallaha, jsherril, kgaikwad, mshira, ofedoren, rabajaj, zhunting
Target Milestone: 6.9.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.18.1.5-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:10:30 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:

Description Stephen Wadeley 2021-02-01 15:04:59 UTC
Description of problem:

hammer content-view filter delete fails 

See line 76 
delefind_filterte
https://github.com/Katello/katello/pull/9003/files

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

snap 11

How reproducible:


Steps to Reproduce:
1. Create CV
2. Create filter and apply to CV
3. Use hammer command to delete filter (see example below)

Actual results:

2021-01-22 10:56:13 - robottelo - INFO - >>> b'LANG=en_US.UTF-8  hammer -v -u admin -p <redacted>  content-view filter delete --content-view-id="402" --name="ZjEkKTaWxnwFWMIbyFztgkXrxfnrpjCYiJkXrKpUewifXMNRCCSVkHFMgZtzIpsqPVokKbvQtnGtQYPpuVhRbTdsZPrldLcPzFiMgBUpGuPhywSmasZFwXxIJAVuiczlRosAQOhNEJDTpaYqwYKQQzYVnaRJCxjQeTlpevUGtAGSWKPMvrniPxlLgVPtiTiFecSMNdbHhXAXVPXHGzMNsErUUQgyxKUfnfhqsDXAI"'
2021-01-22 10:56:16 - robottelo - INFO - <<< stderr
Could not delete the filter:
  Error: undefined method `delefind_filterte' for #RestClient::Resource:0x0000000003b7e3c0


Expected results:

filter is deleted

Comment 1 Justin Sherrill 2021-02-01 15:39:14 UTC
Created redmine issue https://projects.theforeman.org/issues/31775 from this bug

Comment 2 Bryan Kearney 2021-02-02 15:42:53 UTC
Upstream bug assigned to jsherril

Comment 3 Bryan Kearney 2021-02-02 15:42:55 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31775 has been resolved.

Comment 5 Danny Synk 2021-02-22 17:21:27 UTC
Steps to test:

1. Deploy a Satellite 6.9, snap 14.

2. Create a content view.

3. Create a content filter on the content view and add a rule to the filter.

4. Publish a new version of the content view.

5. Attempt to delete the filter using the command from the problem description:

~~~
# hammer content-view filter delete --content-view-id 2
Could not delete the filter:
  Error: At least one of options --id, --name is required.
  
  See: 'hammer content-view filter <delete|destroy> --help'.
~~~

6. Per the error message in the output, specify the ID of the content filter:

~~~
# hammer content-view filter delete --content-view-id 2 --id 1
Filter deleted.
~~~

Expected results:
Content filter is deleted successfully with all required options passed to hammer.

Actual results:
Content filter is deleted successfully with all required options passed to hammer.

Verified on Satellite 6.9, snap 14 (tfm-rubygem-katello-3.18.1.5-1.el7sat.noarch).

Comment 8 errata-xmlrpc 2021-04-21 13:10:30 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 (Moderate: Satellite 6.9 Release), 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-2021:1313