Bug 823890

Summary: Test case failure: SAM: headpin cli product list appears to return products from cp_product, where some products are not currently available to consumers.
Product: Red Hat Satellite Reporter: Tom McKay <tomckay>
Component: Content ManagementAssignee: Ivan Necas <inecas>
Status: CLOSED NOTABUG QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.1CC: cpelland, esammons, gkhachik, inecas, jrist, lzap
Target Milestone: UnspecifiedKeywords: Triaged, ZStream
Target Release: Unused   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 822665
: 827494 (view as bug list) Environment:
Last Closed: 2012-08-22 17:09:28 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: 822665    
Bug Blocks: 827494    

Description Tom McKay 2012-05-22 12:01:29 UTC
There are two issues here:
1) The CLI is listing out both marketing products (w/ id RH1316844) as well as engineering products (w/ id 69).
2) The CLI is also listing both previously imported inactive subscriptions as well as the active ones.

+++ This bug was initially created as a clone of Bug #822665 +++

https://tcms.engineering.redhat.com/case/127976/?from_plan=5985

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

katello-common-0.3.1-1.el6_2.noarch
katello-cli-common-0.3.2-3.el6_2.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
thumbslug-0.0.24-1.el6_2.noarch
katello-glue-candlepin-0.3.1-1.el6_2.noarch
katello-cli-headpin-0.2.0-1.el6_2.noarch
katello-certs-tools-1.1.5-1.el6_2.noarch
katello-configure-0.3.3-2.el6_2.noarch
katello-headpin-0.2.6-4.el6_2.noarch
candlepin-0.6.2-1.el6_2.noarch
candlepin-tomcat6-0.6.2-1.el6_2.noarch
katello-selinux-0.2.4-1.el6_2.noarch
katello-headpin-all-0.2.6-4.el6_2.noarch


Steps to Reproduce: 

 1. On your SAM server login to get a shell.
    Login: username
    Password: password
 2.  Run headpin cli:
    $ headpin -u [admin] -p [password] product list --org [ORG] 



Actual results: 
# headpin -u admin -p admin product list --org ACME_Corporation
--------------------------------------------------------------------------------
    Product List For Organization ACME_Corporation, Environment 'Library'

 Id          Name                                                                     Provider Id   Provider Name   Sync Plan Name   Last Sync   GPG key  
--------------------------------------------------------------------------------
 69          Red Hat Enterprise Linux Server                                          1             Red Hat                                               
 90          Red Hat Enterprise Linux Resilient Storage for RHEL Server               1             Red Hat                                               
 83          Red Hat Enterprise Linux High Availability for RHEL Server               1             Red Hat                                               
 RH1316844   Resilient Storage 8 sockets                                              1             Red Hat                                               
 RH1149049   High-Availability 8 sockets                                              1             Red Hat                                               
 RH0197181   Red Hat Enterprise Linux Server Self-support 1-2 sockets Up to 1 guest   1             Red Hat                                               


DOES NOT Match the webui, see screen shot

Expected results:
Product list is displayed.

Comment 1 Ivan Necas 2012-05-23 12:51:41 UTC
For the first point see: https://bugzilla.redhat.com/show_bug.cgi?id=824069

Comment 2 Lukas Zapletal 2012-05-24 08:31:30 UTC
First point solved in bug 824069 fyi.

Comment 3 Ivan Necas 2012-05-24 12:27:49 UTC
I've proposed the solution with https://github.com/Katello/katello/pull/144

Comment 4 Ivan Necas 2012-05-29 14:50:54 UTC
Fixed in commit bb587d29aab81e6ff96bc8ecb008f6d25af26f75

Comment 5 Garik Khachikyan 2012-05-30 13:26:21 UTC
qe-acking here. affecting CFSE too.

Comment 8 Mike McCune 2013-08-16 18:07:11 UTC
getting rid of 6.0.0 version since that doesn't exist