Bug 1378879 - The API system.upgradeEntitlement does not work
Summary: The API system.upgradeEntitlement does not work
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: API
Version: 2.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jiří Dostál
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks: 1395869 space27
TreeView+ depends on / blocked
 
Reported: 2016-09-23 12:38 UTC by Martin Korbel
Modified: 2017-09-27 19:21 UTC (History)
4 users (show)

Fixed In Version: spacewalk-java-2.6.35
Clone Of:
: 1395869 (view as bug list)
Environment:
Last Closed: 2017-09-27 19:21:40 UTC
Embargoed:


Attachments (Terms of Use)

Description Martin Korbel 2016-09-23 12:38:39 UTC
Description of problem:
API method system.upgradeEntitlement does not work.

Version-Release number of selected component (if applicable):
spacewalk-java-2.5.93-1.el6
spacewalk-java-2.6.31-1.el6

How reproducible:
100%

Steps to Reproduce:
1. We have got a satellite with registered systems
2. We choose one with base channel (no virtual guest) and try to setup "virtualization" entitlement by WebUI. It should pass it. 
3. Remove "virtualization" entitlement from this profile.
3. Now we can try it again for the same profile by API
> spacewalk-api --server=localhost --user=admin --password=xxx system.upgradeEntitlement "%session%" 1000010059 'virtualization_host'

Actual results:
Fault returned from XML RPC Server, fault code -1: redstone.xmlrpc.XmlRpcFault: unhandled internal exception: com.redhat.rhn.domain.entitlement.VirtualizationEntitlement cannot be cast to java.lang.String

Expected results:
$result = '1';

Additional info:
Maybe there are some relation with bz1378873.

Comment 1 Jiří Dostál 2016-09-27 13:49:10 UTC
spacewalk.git d4680f87655e139fe4d3cecb5319a8ed3ed65dbd

Comment 2 Lukáš Hellebrandt 2016-11-11 11:43:14 UTC
Verified with SW nightly from 2016-11-10.

Used reporoducer from OP:


# spacewalk-api --server=localhost --user=admin --password=nimda system.upgradeEntitlement "%session%" 1000010000 'virtualization_host'

$result = '1';

Comment 3 Eric Herget 2017-09-27 19:21:40 UTC
This looks like it was fixed in previous release, but I'm closing it in this one.

Spacewalk 2.7 has been released.

https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes27


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