Bug 1349646 - Unable to remove repo content using repo name through hammer
Summary: Unable to remove repo content using repo name through hammer
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Mike McCune
QA Contact: Martin Korbel
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-23 21:09 UTC by Mihir Lele
Modified: 2019-11-14 08:31 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15540 0 Normal Closed Unable to remove repo content using repo name through hammer 2021-02-15 16:47:30 UTC

Description Mihir Lele 2016-06-23 21:09:27 UTC
Description of problem:

Unable to remove content from a custom repo using the repo name.

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

How reproducible:
Try to remove content repo content using repo name

Steps to Reproduce:
1. hammer repository remove-content --name test --content-ids 12345 --organization-id X
2. Same command works if name is substituted by the repository id
3. hammer repository remove-content --id Y --content-ids 12345 --organization-id X

Actual results:
Could not remove content:
  Error: Unknown option name 'option_product_name'

Expected results:
  Repository content removed

Comment 2 Andrew Kofink 2016-06-29 12:50:26 UTC
Created redmine issue http://projects.theforeman.org/issues/15540 from this bug

Comment 3 Bryan Kearney 2016-07-05 22:15:10 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/15540 has been closed

Comment 6 Martin Korbel 2016-10-20 07:43:20 UTC
VERIFIED on tfm-rubygem-hammer_cli-0.8.0-1

> hammer repository list
---|---------------------------------------------------------------------|---------------------------------|--------------|------------------------------------------------------------------------------
ID | NAME                                                                | PRODUCT                         | CONTENT TYPE | URL                                                                          
---|---------------------------------------------------------------------|---------------------------------|--------------|------------------------------------------------------------------------------
6  | centos repo                                                         | Centos7                         | yum          | http://download/released/CentOS/7/os/x86_64/                                 
---|---------------------------------------------------------------------|---------------------------------|--------------|------------------------------------------------------------------------------

> hammer package list --repository "centos repo" --per-page 10 --page 1
------|----------------------------------------------------------
ID    | FILENAME                                                 
------|----------------------------------------------------------
18656 | 389-ds-base-1.3.3.1-13.el7.x86_64.rpm                    
24667 | 389-ds-base-devel-1.3.3.1-13.el7.x86_64.rpm              
18984 | 389-ds-base-libs-1.3.3.1-13.el7.x86_64.rpm               
23694 | a2ps-4.14-23.el7.x86_64.rpm                              
22595 | abattis-cantarell-fonts-0.0.12-3.el7.noarch.rpm          
22658 | abrt-2.1.11-19.el7.centos.0.3.x86_64.rpm                 
18941 | abrt-addon-ccpp-2.1.11-19.el7.centos.0.3.x86_64.rpm      
21296 | abrt-addon-kerneloops-2.1.11-19.el7.centos.0.3.x86_64.rpm
18814 | abrt-addon-pstoreoops-2.1.11-19.el7.centos.0.3.x86_64.rpm
22265 | abrt-addon-python-2.1.11-19.el7.centos.0.3.x86_64.rpm    
------|----------------------------------------------------------
Page 1 of 866 (use --page and --per-page for navigation)


> hammer repository remove-content --name "centos repo" --ids 18656,24667
Repository content removed


> hammer package list --repository "centos repo" --per-page 10 --page 1
------|------------------------------------------------------------
ID    | FILENAME                                                   
------|------------------------------------------------------------
18984 | 389-ds-base-libs-1.3.3.1-13.el7.x86_64.rpm                 
23694 | a2ps-4.14-23.el7.x86_64.rpm                                
22595 | abattis-cantarell-fonts-0.0.12-3.el7.noarch.rpm            
22658 | abrt-2.1.11-19.el7.centos.0.3.x86_64.rpm                   
18941 | abrt-addon-ccpp-2.1.11-19.el7.centos.0.3.x86_64.rpm        
21296 | abrt-addon-kerneloops-2.1.11-19.el7.centos.0.3.x86_64.rpm  
18814 | abrt-addon-pstoreoops-2.1.11-19.el7.centos.0.3.x86_64.rpm  
22265 | abrt-addon-python-2.1.11-19.el7.centos.0.3.x86_64.rpm      
17797 | abrt-addon-upload-watch-2.1.11-19.el7.centos.0.3.x86_64.rpm
19046 | abrt-addon-vmcore-2.1.11-19.el7.centos.0.3.x86_64.rpm      
------|------------------------------------------------------------
Page 1 of 865 (use --page and --per-page for navigation)

Comment 7 Satellite Program 2018-02-21 16:54:17 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


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