Red Hat Bugzilla – Bug 463543
satellite.listEntitlements API - inconsistent behavior and generates error if run by Org Admin
Last modified: 2009-01-22 11:30:00 EST
Description of problem:
This API call seems to not be clear in its objectives and actual results when implementing multi-org.
With my satellite and cert at this time there are 208 free_slots. Querying the satellite.listEntitlements API with the "Satellite Administrator" or an "Organization Administrator" user for organization one shows this.
After creating a new organization and allocation 10 management slots to it, the free_slots decrements by 10 to report 198. While the arithmetic seems straight-forward enough, that is not consistent with the API documentation page: Lists all channel and system entitlements *on*the*satellite*.
When I use the "Organization Administrator" account for the second organization, I get this error:
xml declaration not at start of external entity at line 6, column 15, byte 470 at /us
r/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/XML/Parser.pm line 187
This error is reported in /var/log/tomcat5/catalina.out as a java.lang.NullPointerException: null
Steps to Reproduce:
Given the documentation and actual results I'm not exactly sure what I would expect -- other than "not an error".
I would prefer that free_slots (and other information) is reportable on a per-organization basis.
Updated the satellite.listEntitlements API to properly handle the error scenario. Also updated the API documentation to better reflect the expected behavior of the API. E.g. "Lists all channel and system entitlements for the organization associated with the user executing the request."
The data returned by invoking this API should be consistent the Entitlement counts that would be provided to a user if they logged in to the web-ui and selected:
Subscription Management -> System Entitlements
Subscription Management -> Software Channel Entitlements
It should be noted that there are several additional API methods which provide different views of entitlements. E.g.
verified on spacewalk-java-0.4.14-1.el5