Bug 1923209 - hammer content-view filter delete fails
Summary: hammer content-view filter delete fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.9.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.9.0
Assignee: Justin Sherrill
QA Contact: Danny Synk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-01 15:04 UTC by Stephen Wadeley
Modified: 2021-04-21 13:11 UTC (History)
8 users (show)

Fixed In Version: tfm-rubygem-katello-3.18.1.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-04-21 13:10:30 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 31775 0 Normal Closed hammer content-view filter delete fails 2021-02-16 19:56:54 UTC
Red Hat Product Errata RHSA-2021:1313 0 None None None 2021-04-21 13:11:04 UTC

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


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