Bug 566434 - system.addEntitlements call fails with "Invalid entitlement" on given right entitlement
Summary: system.addEntitlements call fails with "Invalid entitlement" on given right e...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Tomas Lestach
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks: sat531-api
TreeView+ depends on / blocked
 
Reported: 2010-02-18 13:48 UTC by Garik Khachikyan
Modified: 2015-01-04 21:57 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-03 14:18:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0128 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2010-03-03 14:17:49 UTC

Description Garik Khachikyan 2010-02-18 13:48:08 UTC
Description of problem:
Through Satellite UI make a system unentitled (remove the Management system entitlement from it). 
Then call:
server.system.addEntitlements(session,systemid, ['enterprise_entitled'])

Version-Release number of selected component (if applicable):


How reproducible:
always


Steps to Reproduce:
1. described in problem description above
2.
3.
  
Actual results:
throws an exception: 
<Fault -212: 'redstone.xmlrpc.XmlRpcFault: Invalid entitlement'>

Expected results:
Should pass ok, system should get entitled

Additional info:

Comment 1 Tomas Lestach 2010-02-18 15:39:38 UTC
system.removeEntitlements and system.addEntitlements API calls are not meant for removing and adding Management entitlement ('enterprise_entitled').

For setting/removing this entitlement you can use system.setDetails API call (check base_entitlement).

However, it would be possible to extent the usage of the system.add/removeEntitlements so they would handle also the Management entitlement.

Cliff, what do you think?

Comment 2 Clifford Perry 2010-02-18 15:45:35 UTC
go ahead and do this :) 

I feel allowing these two API calls to also set Management makes sense. 

So folks do not have to go digging for it. 

Cliff

Comment 3 Tomas Lestach 2010-02-19 13:00:16 UTC
I enabled handling of base entitlements using system.add/removeEntitlements API calls

spacewalk.git: 5e5888b9c1d321354a30cbd5ed320044c29b1ffb

Comment 4 Tomas Lestach 2010-02-19 15:33:29 UTC
satellite.git: d02c959c3f12adfdf3dcd74a96bf4ecf4d0e3e06

Comment 7 Garik Khachikyan 2010-02-22 15:25:20 UTC
# VERIFIED

Thanks to Tomas we have now add/removeEntitlements for 'enterprise_entitled' working as well as for other system entitlements.

Checked against Satellite installed on RHEL 4 AS and RHEL 5 Server.

Package(s( fixing the issue are: spacewalk-java-0.5.44-66.5.el[4,5]sat

Comment 10 errata-xmlrpc 2010-03-03 14:18:19 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/RHBA-2010-0128.html


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