Bug 464834 - Activationkey.create usage limit isn't parsed correctly
Activationkey.create usage limit isn't parsed correctly
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
530
All Linux
medium Severity medium
: ---
: ---
Assigned To: Brad Buckingham
Sayli Karmarkar
:
Depends On:
Blocks: 456996
  Show dependency treegraph
 
Reported: 2008-09-30 14:52 EDT by Justin Sherrill
Modified: 2015-03-22 21:09 EDT (History)
3 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 15:53:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Justin Sherrill 2008-09-30 14:52:05 EDT
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.
Comment 1 Brandon Perkins 2008-10-01 14:56:44 EDT
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.)
Comment 2 Brad Buckingham 2009-02-10 16:40:14 EST
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.
Comment 4 Steve Salevan 2009-08-14 16:30:51 EDT
RELEASE_PENDING on latest Stage build.
Comment 5 Brandon Perkins 2009-09-10 15:53:24 EDT
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

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