Bug 468320 - A wrong key name in API documentation (satellite.listEntitlements).
A wrong key name in API documentation (satellite.listEntitlements).
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
511
All Linux
high Severity medium
: ---
: ---
Assigned To: Brad Buckingham
John Matthews
:
Depends On:
Blocks: 456996
  Show dependency treegraph
 
Reported: 2008-10-23 23:44 EDT by Satoru SATOH
Modified: 2009-09-10 15:53 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:53:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Satoru SATOH 2008-10-23 23:44:34 EDT
Description of problem:

There is a typo in "API Overview: satellite" web page (*1).

It says "Method: listEntitlements" returns a struct consist of array "system"
and array "channels". This does not look correct; should be s/channels/channel/.


 *1. https://SATELLITE_HOST/rhn/apidoc/satellite/SatelliteHandler.jsp


Version-Release number of selected component (if applicable):
satellite-5.1.1-28 (ISO image)


How reproducible: always


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Here is a sample ipython session to try accessing this api.

$ ipython
...
In [1]: import xmlrpclib

In [2]: server = xmlrpclib.ServerProxy('https://%s/rpc/api' % 'satellite-1')

In [3]: (user, pwd) = ('foo','xxxxxx')

In [4]: sid = server.auth.login(user, pwd)

In [5]: res = server.satellite.listEntitlements(sid)

In [6]: res.keys()
Out[6]: ['system', 'channel']       # ! 'channels'
...
In [16]: server.api.getVersion()
Out[16]: '5.1.1 Java'

In [18]: res.get('channel')[:3]     # ! 'channels'
Out[19]: 
[{'free_slots': 0,
  'label': 'private-channel-family-22',
  'name': 'private-group-1 (22) Channel Family',
  'total_slots': 0,
  'used_slots': 0},
...
Comment 1 Clifford Perry 2008-11-20 12:47:25 EST
Sat 5.1.1 - good chance we have already addressed this within Spacewalk code. Assigning to review for Sat 5.3.0 cycles.
Comment 2 Brad Buckingham 2009-01-09 11:34:09 EST
An issue still appears to exist in spacewalk as well.  Reference Spacewalk BZ 479440 for details.
Comment 3 Brad Buckingham 2009-01-09 11:38:27 EST
Modifications made to Spacewalk 0.4. Refer to Spacewalk BZ 479440 for details.
Comment 4 John Matthews 2009-02-17 11:32:45 EST
ISO:  Satellite-5.3.0-RHEL5-re20090213.1-i386-embedded-oracle.iso

python
>>> import xmlrpclib
>>> server = xmlrpclib.ServerProxy('https://testsat/rpc/api')
>>> sid = server.auth.login("user", "password")
>>> res = server.satellite.listEntitlements(sid)
>>> res.keys()
['system', 'channel']
>>> 



Method: listEntitlements
Description:
Lists all channel and system entitlements for the organization associated with the user executing the request.

Parameters:

    * string sessionKey

Returns:

    * struct - channel/system entitlements
          o array "system"
                + struct - system entitlement
                      # string "label"
                      # string "name"
                      # int "used_slots"
                      # int "free_slots"
                      # int "total_slots"
          o array "channel"
                + struct - channel entitlement
                      # string "label"
                      # string "name"
                      # int "used_slots"
                      # int "free_slots"
                      # int "total_slots"
Comment 5 Brandon Perkins 2009-09-10 15:53:42 EDT
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-2009-1434.html

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