activationkey.create takes a usage limit. You should be able to set the usage limit to 'unlimited' or to any value >= 0. Currently you can set it to negative numbers and you can't set it to be unlimited. Ideally we should change the docs to say -1 is treated as unlimited, and then in the code any value less than 0 is treated as unlimited.
There are actually two create methods, one for unlimited usage and the other for a value. So, the real issues here are: 1) The call with 'int usageLimit' should throw an error if a value is < 0. 2) The actual docs right now say: * int usageLimit leave blank for unlimited. this should be changed to: * int usageLimit (If unlimited usage is desired see the similarly named API method with no usage limit argument.)
Modifications made with git commit: 3c4d9b0744a63e0d9382a16fa6c16b2e5bc21be3 Updated as recommended in comment #1. i.e. If users invokes create API that that includes the usageLimit parameter, they must provide a valid value (i.e. >=0); otherwise, an exception will be thrown by the API. If user invokes API that does not include usageLimit parameter, the usageLimit will be unlimited.
RELEASE_PENDING on latest Stage build.
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