Bug 976813

Summary: submitting a resource with links in body fails to parse
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.8CC: theute
Target Milestone: ---   
Target Release: RHQ 4.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-24 19:08:49 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-06-21 14:11:52 UTC
Description of problem: Our REST api has a little inconvenience. We add 'links' to response bodies (for example resource, alert def and almost everything else). This is good. But if a client wants to send such body back, server does not accept such object (with 'links' key)

This is inconvenient for clients, because they have to "clean up" a body from links

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

How reproducible: always

Consider auto-import discovery queue script:

resources = requests.get(endpoint+'resource?status=NEW').json()
for res in resources:
    res['status'] = 'committed'
    req = requests.put(endpoint+'resource/%d' % res['resourceId'],data=json.dumps(res))


Actual results: this code does not work, because in $res body are links, server refuses such resource.

Expected results: server should ignore links (or maybe any other unknown keys within resource body)

Comment 1 Heiko W. Rupp 2013-06-27 16:02:24 UTC
master a4b1412282bb4423cb7fbafc67ad8d03a6b08727

Comment 2 Heiko W. Rupp 2013-09-24 19:08:49 UTC
Bulk closing of RHQ 4.9 verified items