Bug 1791025

Summary: Unable to use Organization ID in report templates using CLI
Product: Red Hat Satellite Reporter: Cole Higgins <chiggins>
Component: ReportingAssignee: Amit Upadhye <aupadhye>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: egolov, mhulan, oprazak
Target Milestone: 6.9.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-2.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:12:25 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 Cole Higgins 2020-01-14 17:28:14 UTC
Description of problem:
When trying to generate a report template using hammer, the "organization-id" and "organization" field cannot be called. Organization ID and name cannot be found(404 Not Found).  


Version-Release number of selected component (if applicable): 6.7.0_06 and 6.5.3.1


How reproducible:100%


Steps to Reproduce:
1.Create an organization in Sat
2.ssh into Sat
3.hammer report-template list --organization "org_name"

Actual results:
404 NOt Found

Expected results:
List the organization in the Satellite.

Additional info:

Comment 7 Ondřej Pražák 2020-01-16 07:51:15 UTC
Created redmine issue https://projects.theforeman.org/issues/28771 from this bug

Comment 9 Bryan Kearney 2020-05-05 15:46:46 UTC
Upstream bug assigned to aupadhye

Comment 10 Bryan Kearney 2020-11-06 12:05:25 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/28771 has been resolved.

Comment 11 Lukáš Hellebrandt 2021-01-14 14:36:14 UTC
Verified with Sat 6.9 snap 8.0.

# hammer report-template list --organization "Default Organization"
----|--------------------------------------
ID  | NAME                                 
----|--------------------------------------
128 | Ansible - Ansible Inventory          
186 | editable                             
185 | fish                                 
129 | Host - Applicable Errata             
130 | Host - Applied Errata                
131 | Host - compare content hosts packages
132 | Host - Last Checkin                  
133 | Host - Registered Content Hosts      
134 | Host - Statuses                      
135 | Subscription - Entitlement Report    
136 | Subscription - General Report        
137 | User - Registered Users

# hammer report-template create --organization-id 1 --name whatever --file template_contents.txt
Report template created.

# hammer report-template list --organization-id 1
----|--------------------------------------
ID  | NAME                                 
----|--------------------------------------
128 | Ansible - Ansible Inventory          
186 | editable                             
185 | fish                                 
129 | Host - Applicable Errata             
130 | Host - Applied Errata                
131 | Host - compare content hosts packages
132 | Host - Last Checkin                  
133 | Host - Registered Content Hosts      
134 | Host - Statuses                      
135 | Subscription - Entitlement Report    
136 | Subscription - General Report        
187 | test                                 
137 | User - Registered Users              
188 | whatever                             
----|--------------------------------------

Comment 14 errata-xmlrpc 2021-04-21 13:12:25 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