Bug 683525 - Enhance spacewalk-report entitlements to include Flex entitlements
Summary: Enhance spacewalk-report entitlements to include Flex entitlements
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 541
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Jan Pazdziora
QA Contact: Šimon Lukašík
URL:
Whiteboard:
Depends On:
Blocks: sat541-blockers sat541-reports
TreeView+ depends on / blocked
 
Reported: 2011-03-09 16:17 UTC by Clifford Perry
Modified: 2011-03-29 08:53 UTC (History)
1 user (show)

Fixed In Version: spacewalk-reports-1.2.2-3
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-29 08:53:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Proposed Patch to add Flex entitlement within spacewalk-report entitlements (3.31 KB, patch)
2011-03-09 16:17 UTC, Clifford Perry
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0396 0 normal SHIPPED_LIVE Red Hat Network Satellite spacewalk-reports enhancement update 2011-03-29 08:53:31 UTC

Description Clifford Perry 2011-03-09 16:17:25 UTC
Created attachment 483255 [details]
Proposed Patch to add Flex entitlement within spacewalk-report entitlements

Description of problem:
During the spec and implementation of Flex entitlements for the 5.4.0 release we mistakenly overlooked enhancing the spacewalk-report command line tool to also include Flex entitlement usage/availability. This bugzilla is to capture the need to add this piece of 'polish' to the feature we released in Satellite 5.4.0. 



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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:
[root@rlx-1-18 ~]# spacewalk-report --list-fields entitlements
organization_id
organization
entitlement_type
entitlement
used
total
[root@rlx-1-18 ~]# 


Expected results:
We include a 'flex_used' and 'flex_total' columns to the report

[root@rlx-1-18 ~]# spacewalk-report --list-fields entitlements
organization_id
organization
entitlement_type
entitlement
used
total
flex_used
flex_total
[root@rlx-1-18 ~]# 


Additional info:
Expect it to look similar too:

[root@rlx-1-18 ~]# spacewalk-report entitlements | grep -i "core" | grep -v "0,0,0,0"
1,Red Hat Unsupported Cert,channel,Red Hat Enterprise Linux (core server),4,2204,1,60
1,Red Hat Unsupported Cert,channel,Red Hat Enterprise Linux Desktop (core client),0,2010,0,0
2,Cliff Test 1,channel,Red Hat Enterprise Linux (core server),0,200,0,50
24,david-test,channel,Red Hat Enterprise Linux (core server),0,100,0,0
[root@rlx-1-18 ~]# spacewalk-report entitlements | head -n 1
organization_id,organization,entitlement_type,entitlement,used,total,flex_used,flex_total
[root@rlx-1-18 ~]#

Comment 1 Jan Pazdziora 2011-03-10 08:10:18 UTC
Committed to Spacewalk master, cad979c0a66959b87ca7863250bc101b0013c2ee.

Tagged in Spacewalk as spacewalk-reports-1.4.4-1.

Comment 3 Jan Pazdziora 2011-03-10 08:46:55 UTC
Cherry picked to SATELLITE-5.4, e58ce31f24da3a32230eb4b6b749ebe95ff115e2.

Tagged as spacewalk-reports-1.2.2-3.

Comment 5 Šimon Lukašík 2011-03-15 08:42:59 UTC
Taking QA contact.

Comment 6 Šimon Lukašík 2011-03-16 13:30:26 UTC
Please, does the feature has a spec?

I can see a lot of lines without value for total and flex_total
columns. What is the meaning of empty string? Does it mean zero
or unlimited?

spacewalk-report entitlements | wc -l
1396
spacewalk-report entitlements | grep ,,0,$ | wc -l
726

Comment 7 Clifford Perry 2011-03-16 14:05:56 UTC
The 'spec' is comment #0 and it's attachment. 

For :
flex_used,flex_total

For Channel Entitlements these should always be:
 - either '0' - for no entitlements assigned/used 
 - or a value greater than 0 for something assigned or being used (depending if it is flex_used vs flex_total). 

For System Entitlements, which has no concept of Flex entitlements, these will be blank or null - ',,' 

Custom channels, typically get unlimited entitlements for regular entitlements but have no concept of flex, as such - there is not flex associations for those channels and those channels should always return '0,0' for Flex used and total. 

Of course, I cannot account for 'unknown' bugs in schema/code for population of those tables, but the above is my expected results/behavior. 


Hope this helps.

Cliff

Comment 9 Šimon Lukašík 2011-03-18 11:37:24 UTC
Changing to Verified.

Testing procedure:
- Automated test (up to the comment 7)
- Compared the new and the old output to ensure that we don't lost anything
(on a Satellite instance with numerous organizations and channels)

Verified against:
spacewalk-reports-1.2.2-3.el5sat

Comment 10 errata-xmlrpc 2011-03-29 08:53:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0396.html


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