Bug 464834 - Activationkey.create usage limit isn't parsed correctly
Summary: Activationkey.create usage limit isn't parsed correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Brad Buckingham
QA Contact: Sayli Karmarkar
URL:
Whiteboard:
Depends On:
Blocks: 456996
TreeView+ depends on / blocked
 
Reported: 2008-09-30 18:52 UTC by Justin Sherrill
Modified: 2015-03-23 01:09 UTC (History)
3 users (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-10 19:53:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2008-09-30 18:52:05 UTC
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 18:56:44 UTC
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 21:40:14 UTC
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 20:30:51 UTC
RELEASE_PENDING on latest Stage build.

Comment 5 Brandon Perkins 2009-09-10 19:53:24 UTC
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.