Description of problem: When I try: server.org.setSystemEntitlements(key, 326, "provisioning_entitled", 1) it works but all - server.org.setSystemEntitlements(key, 326, "enterprise_entitled", 1) server.org.setSystemEntitlements(key, 326, "sw_mgr_entitled", 1) server.org.setSystemEntitlements(key, 326, "management_entitled", 1) fail with "Invalid Entitlement". On the similar note I guess we should mention what system entitlement labels are valid as arguments to the API.
It looks like management_entitled is not a valid one for our case. The current supported entitlements appear to be: base: enterprise_entitled or sw_mgr_entitled add-on: monitoring_entitled, provisioning_entitled, virtualization_host, virtualization_host_platform Currently, the API logic is only allowing the add-on entitlements and throws the exception mentioned for any changes to the base entitlements. This should be updated.
Correction.... sw_mgr_entitled is not valid in this case. Supported values are: base: enterprise_entitled add-on: monitoring_entitled, provisioning_entitled, virtualization_host, virtualization_host_platform
git commit: 262ee714d147730cbbdf51c233fbf5408277128d Updated API to support setting the management entitlements for the org. Also, updated the API doc to list the supported entitlements. E.g. Method: setSystemEntitlements Description: Set an organization's entitlement allocation for the given software entitlement. If increasing the entitlement allocation, the default organization (i.e. orgId=1) must have a sufficient number of free entitlements. Parameters: * string sessionKey * int orgId * string label - System entitlement label. Valid values include: o enterprise_entitled o monitoring_entitled o provisioning_entitled o virtualization_host o virtualization_host_platform * int allocation Returns: * int - 1 on success, exception thrown otherwise.
mass move to ON_QA
verified.
Verified on staged (Satellite-5.3.0-RHEL5-re20090811.0) click Help|About > API > org > setSystemEntitlements Method: setSystemEntitlements Description: Set an organization's entitlement allocation for the given software entitlement. If increasing the entitlement allocation, the default organization (i.e. orgId=1) must have a sufficient number of free entitlements. Parameters: * string sessionKey * int orgId * string label - System entitlement label. Valid values include: o enterprise_entitled o monitoring_entitled o provisioning_entitled o virtualization_host o virtualization_host_platform * int allocation Returns: * int - 1 on success, exception thrown otherwise. [jsefler@jsefler api]$ cat org_setSystemEntitlements.py #!/usr/bin/env python import xmlrpclib u = 'admin' p = 'redhatqa' url = 'http://sun-x4440-01.rhts.bos.redhat.com/rpc/api' server = xmlrpclib.Server(url,verbose=0) oid = 2 try: ses = server.auth.login(u,p) print "result=%d" % (server.org.setSystemEntitlements(ses,oid,"enterprise_entitled",5)) print "result=%d" % (server.org.setSystemEntitlements(ses,oid,"monitoring_entitled",6)) print "result=%d" % (server.org.setSystemEntitlements(ses,oid,"provisioning_entitled",7)) print "result=%d" % (server.org.setSystemEntitlements(ses,oid,"virtualization_host",8)) print "result=%d" % (server.org.setSystemEntitlements(ses,oid,"virtualization_host_platform",9)) print "result=%d" % (server.org.setSystemEntitlements(ses,oid,"bad_entitlement",10)) except(xmlrpclib.Fault), f: print "ERROR: an Error was encountered!\n", f exit(-1) [jsefler@jsefler api]$ ./org_setSystemEntitlements.py result=1 result=1 result=1 result=1 result=1 ERROR: an Error was encountered! <Fault -212: 'redstone.xmlrpc.XmlRpcFault: Invalid entitlement'> Also verified that the api results were updated in the sat GUI: moving to RELEASE_PENDING
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