Bug 636614 - XMLRPC org.listOrgs() does not return key "system_groups"
Summary: XMLRPC org.listOrgs() does not return key "system_groups"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 540
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Šimon Lukašík
URL:
Whiteboard:
Depends On:
Blocks: sat54-blockers
TreeView+ depends on / blocked
 
Reported: 2010-09-22 17:29 UTC by Pavel Novotny
Modified: 2011-10-20 08:21 UTC (History)
2 users (show)

Fixed In Version: spacewalk-java-1.2.39-101
Doc Type: Bug Fix
Doc Text:
Consequence: org.listOrgs API doesn't return key "system_groups" as stated in the documentation Result: org.listOrgs API new correctly returns "system_groups" key
Clone Of:
Environment:
Last Closed: 2011-10-20 08:21:31 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1388 0 normal SHIPPED_LIVE Red Hat Network Satellite server spacewalk-java bug fix and enhancement update 2011-10-20 08:21:14 UTC

Description Pavel Novotny 2010-09-22 17:29:05 UTC
Description of problem:
XMLRPC API call org.listOrgs() does not return key "system_groups".
According to API documentation this key is not optional.

Version-Release number of selected component (if applicable):
10.11
Also reproduced on Satellite 5.3 with API version 10.8

How reproducible:
Always

Steps to Reproduce:
1. See additional info.
2.
3.
  
Actual results:
The key "system_groups" is missing in the returned list of dictionaries.

Expected results:
According to API doc the key "system_groups" with integer value should be in the returned dictionary.

Additional info:
Simple Python reproducer script:
----------

#!/usr/bin/python

import xmlrpclib 

USER='admin'
PASS='pass'
SERVER='<SATELLITE_SERVER>'
client = xmlrpclib.Server("http://%s/rpc/api" % SERVER, verbose=0)
key = client.auth.login(USER, PASS)
result = client.org.listOrgs(key)
print(result)

----------

The output is:

[{'active_users': 2,
  'id': 1,
  'name': 'Testing org',
  'systems': 2,
  'trusts': 0},
 {'active_users': 1, 'id': 2, 'name': 'orga', 'systems': 0, 'trusts': 1},
 {'active_users': 1, 'id': 3, 'name': 'orgb', 'systems': 0, 'trusts': 1}]

Comment 1 Tomas Lestach 2011-05-09 15:38:24 UTC
system_groups were never correctly reported by this API. Number of activation keys was returned instead.

spacewalk.git:
 6c58252e57bf420c3333fe8205bbdd2e5e257e0d
 6fe1d9dc054285307e58bbb24d0e59f27a3a441e

Comment 4 Tomas Lestach 2011-09-27 14:06:46 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Consequence:
org.listOrgs API doesn't return key "system_groups" as stated in the documentation
Result:
org.listOrgs API new correctly returns "system_groups" key

Comment 5 Šimon Lukašík 2011-10-03 14:08:15 UTC
Moving to Verified:

Testing procedure:
Automated test (com.redhat.rhn.rpc.api.org.listOrgs)

Verified against:
spacewalk-java-1.2.39-101

Comment 6 errata-xmlrpc 2011-10-20 08:21:31 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1388.html


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