Bug 436543

Summary: satellite.listEntitlements API Call Does Not Include Entitlement Labels
Product: Red Hat Satellite 5 Reporter: Devan Goodwin <dgoodwin>
Component: APIAssignee: Devan Goodwin <dgoodwin>
Status: CLOSED CURRENTRELEASE QA Contact: Preethi Thomas <pthomas>
Severity: low Docs Contact:
Priority: low    
Version: 510   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat511 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-13 19:01:25 UTC Type: ---
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:    
Bug Blocks: 429319    

Description Devan Goodwin 2008-03-07 19:48:25 UTC
Description of problem:

The satellite.listEntitlements API call returns a large struct of both system
and channel entitlements. Entitlements appear by name, but elsewhere in the API
entitlement labels are used to perform operations. This leaves no progrematic
way to obtain the entitlement labels and the user may have to dig into the
database itself to find them.


Steps to Reproduce:
1. Call satellite.listEntitlements.
  
Actual results:

Note for both system and channel entitlements, only the "name" field is present
in the struct.

Expected results:

"label" should also be present.
Additional info:

Comment 1 Devan Goodwin 2008-03-07 19:50:46 UTC
Fixed in trunk as part of 5.2 api work.

Sending        code/src/com/redhat/rhn/common/db/datasource/xml/Channel_queries.xml
Sending        code/src/com/redhat/rhn/domain/server/ServerGroupFactory.java
Sending        code/src/com/redhat/rhn/frontend/dto/ChannelOverview.java
Sending       
code/src/com/redhat/rhn/frontend/xmlrpc/satellite/SatelliteHandler.java
Sending       
code/src/com/redhat/rhn/frontend/xmlrpc/serializer/ChannelOverviewSerializer.java
Sending       
code/src/com/redhat/rhn/frontend/xmlrpc/serializer/EntitlementServerGroupSerializer.java
Transmitting file data ......
Committed revision 137817.


This revision should be backported to the 5.1.1 branch.

Comment 2 Devan Goodwin 2008-04-28 15:53:40 UTC
Backported to 5.1.1 in revision 171826.

Comment 4 Preethi Thomas 2008-05-20 19:23:48 UTC
verified 
 ./test_satellite.list_entitlements.pl

Comment 5 Miroslav Suchý 2008-07-23 12:56:05 UTC
FAILQA in stage:
$ test_satellite.list_entitlements.pl  --host test10-64.rhndev.redhat.com --user
msuchy --password XXXX
xml declaration not at start of external entity at line 1, column 138, byte 138
at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/XML/Parser.pm line 188

I got these responses, the last one seem wrong:
<?xml version="1.0"
encoding="UTF-8"?><methodResponse><params><param><value><string>10976x10b8f24c3a106bdb754d02e3cb29c403</string></value></param></params></methodResponse>
----
<?xml version="1.0"
encoding="UTF-8"?><methodResponse><params><param><value><struct><member><name>system</name><value><array><data><value><?xml
version="1.0"
encoding="UTF-8"?><methodResponse><fault><value><struct><member><name>faultCode</name><value><int>-1</int></value></member><member><name>faultString</name><value><string>java.lang.NullPointerException:
null</string></value></member></struct></value></fault></methodResponse>



Comment 6 Brandon Perkins 2008-07-23 15:51:36 UTC
Release Pending.  The issue in Comment #5 From Miroslav Suchy
(msuchy)   on 2008-07-23 08:56 EST is a real issue, but a different
bug.  I've entered that bug as private bug Bugzilla Bug 456435:
satellite.list_entitlements from an org with no entitlements results in
NullPointerException.  The original issue of this bug is in fact fixed, and what
Miroslav ran across is a new bug.


Comment 7 Brandon Perkins 2008-08-13 19:01:25 UTC
5.1.1 Satellite is now GA, bugs Closed for Current Release.

Comment 8 Brandon Perkins 2008-08-13 19:07:05 UTC
5.1.1 Satellite is now GA, bugs Closed for Current Release.