Bug 962853

Summary: resourceId is type of String
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.7CC: theute
Target Milestone: ---   
Target Release: RHQ 4.8   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-08-31 10:09:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Libor Zoubek 2013-05-14 15:05:34 UTC
Description of problem: When I request resource in json format, resourceId is String, but it should be number


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

How reproducible:always


Steps to Reproduce:
1. GET /rest/resource/10014
  
Actual results:
{"resourceName":"RHQ Agent","resourceId":"10014","typeName":"RHQ Agent","typeId":10155,"pluginName":"RHQAgent","parentId":10011,"status":"COMMITTED","links":[{"operationDefinitions":{"href":"http://10.16.23.104:7080/rest/operation/definitions?resourceId=10014"}},{"self":{"href":"http://10.16.23.104:7080/rest/resource/10014"}},{"schedules":{"href":"http://10.16.23.104:7080/rest/resource/10014/schedules"}},{"availability":{"href":"http://10.16.23.104:7080/rest/resource/10014/availability"}},{"alerts":{"href":"http://10.16.23.104:7080/rest/resource/10014/alerts"}},{"parent":{"href":"http://10.16.23.104:7080/rest/resource/10011/"}},{"coregui":{"href":"http://10.16.23.104:7080/coregui/#Resource/10014"}}],"ancestry":"10008_:_10011_:_lzoubek2.bc.jonqe.lab.eng.bos.redhat.com"}


Expected results:
"resourceId" is rendered as 10014 instead of "10014"

Comment 1 Heiko W. Rupp 2013-05-21 20:12:40 UTC
master e5d22cac1559f8f

It was internally already an int, but as the very early version of the api returned a String I kept that around. 
Is changed now.

Comment 2 Heiko W. Rupp 2013-08-31 10:09:57 UTC
Bulk close of old bugs in VERIFIED state.