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.
Javadoc output: ===== Method: createUser Description: 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. Parameters: * 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" Returns: * int
gbarros@ - very good point. I don't want to conflate the two issues, though, so please open a separate BZ for that.
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
ON_DEV. Documentation can be found here: https://rhn.webdev.redhat.com/rhn/apidoc/user/UserHandler.jsp#createUser 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.
Note: the attached test requires that python and libxml2-python be installed on the test-machine.
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): https://rhn.redhat.com/rhn/apidoc/user/UserHandler.jsp#createUser "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? -John This event sent from IssueTracker by jruemker issue 1111313
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 required. -John This event sent from IssueTracker by jruemker issue 1111313
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 :(
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. -John
Ah, good - that means it's just my docs that are off, not the code :)
Event posted on 08-24-2010 09:36am EDT by jruemker Bug submitted. https://bugzilla.redhat.com/show_bug.cgi?id=626809 -John This event sent from IssueTracker by jruemker issue 1111313