Bug 612574 - [RFE] RHN Hosted - Create User functionality in RHN API
Summary: [RFE] RHN Hosted - Create User functionality in RHN API
Alias: None
Product: Red Hat Network
Classification: Red Hat
Component: RHN/API   
(Show other bugs)
Version: RHN Stable
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Grant Gainey
QA Contact: Red Hat Network Quality Assurance
Keywords: FutureFeature, Triaged
Depends On:
Blocks: rhn-sprint49
TreeView+ depends on / blocked
Reported: 2010-07-08 14:38 UTC by Issue Tracker
Modified: 2018-11-26 19:01 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-08-02 20:52:40 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Test script for user.createUser RHN API (8.05 KB, text/plain)
2010-07-14 18:22 UTC, Grant Gainey
no flags Details

Comment 4 Guil Barros 2010-07-14 13:56:53 UTC
There is also currently no way to see via the API that a user is disabled, this feature would be very useful and is available in the Satellite API.

Comment 5 Grant Gainey 2010-07-14 15:20:23 UTC
Javadoc output:

Method: createUser
Create a new user, in the same Org as that of the invoker.

Invoker must be an Org-Admin in their Org.

detail-keys include the following:

    * address1
    * address2
    * city
    * country
    * email
    * login
    * prefix
    * password
    * phone
    * state
    * zip

address2 is optional; all other details are REQUIRED

Users are created with NO ASSIGNED ROLES

Errors are reflected back to the caller as an xmlrpclib.Fault.faultCode of -500, .faultString containing a list of the errors encountered.


    * string sessionKey
    * struct (user's details)
          o string "address1"
          o string "address2" (optional)
          o string "city"
          o string "country" (two-character country code)
          o string "email"
          o string "first_names"
          o string "last_name"
          o string "login"
          o string "password"
          o string "phone"
          o string "prefix" (one of Dr. , Hr. , Miss , Mr. , Mrs. , Ms. , Sr. )
          o string "state"
          o string "zip"


    * int

Comment 6 Grant Gainey 2010-07-14 15:22:11 UTC
gbarros@ - very good point.  I don't want to conflate the two issues, though, so please open a separate BZ for that.

Comment 8 Grant Gainey 2010-07-14 18:22:39 UTC
Created attachment 431871 [details]
Test script for user.createUser RHN API

Demonstration of API, and a series of tests to insure that failures are caught and reflected back to the user

Comment 9 Grant Gainey 2010-07-14 18:27:27 UTC
ON_DEV.  Documentation can be found here:


See attached script for tests.

NOTE: UserService returns ValidatorErrors without enough information for us to fill in all the information needed by the localization resources.  This results in some error-messages looking like the following:

City cannot be shorter than {1} characters.

This will not be addressed at this time.

Comment 10 Grant Gainey 2010-07-16 13:10:16 UTC
Note: the attached test requires that python and libxml2-python be installed on the test-machine.

Comment 11 Issue Tracker 2010-08-16 16:37:10 UTC
Event posted on 08-16-2010 12:37pm EDT by jruemker

The API spec seems to have a typo (if not, then the logic is incorrect):


"address2 is optional; all other details are REQUIRED"

This should not be for non-US countries.  Can anyone confirm if the state
really is required or not?  


This event sent from IssueTracker by jruemker 
 issue 1111313

Comment 13 Issue Tracker 2010-08-18 15:24:54 UTC
Event posted on 08-18-2010 11:24am EDT by jruemker

Should I file a new bug to correct the documentation in the API, or can
that be addressed here?  This was pointed out by my customer who is
looking to avoid confusion within their organization about the state being


This event sent from IssueTracker by jruemker 
 issue 1111313

Comment 14 Grant Gainey 2010-08-18 18:30:54 UTC
John - file a new one - that'll let us track accurately, and keep you in the loop as we get it addressed.  Also, I have to investigate to see if the code actually enforces that - which would be a flat-out bug all on its lonesome, and make me very sad :(

Comment 15 John Ruemker 2010-08-18 19:11:24 UTC
Thanks Grant.  I'll do that.  

FWIW I tried using your example code (the first entry in the example), using a UK address and no state, and it did seem to work.  


Comment 16 Grant Gainey 2010-08-18 19:34:30 UTC
Ah, good - that means it's just my docs that are off, not the code :)

Comment 17 Issue Tracker 2010-08-24 13:36:53 UTC
Event posted on 08-24-2010 09:36am EDT by jruemker

Bug submitted. 



This event sent from IssueTracker by jruemker 
 issue 1111313

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