Bug 974955

Summary: Creating a DRAFT operation accepts invalid ID parameters
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: RESTAssignee: Heiko W. Rupp <hrupp>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.8CC: theute
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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-17 09:06:28 UTC
Description of problem: Creating a draft operation accepts wrong parameters (I've hitted this by mistake).


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

How reproducible:always


Steps to Reproduce: let's have OP_ID and RES_ID, where OP_ID is *NOT* an operation definition ID for particular resource (type) having RES_ID
1. do POST /operation/definition/<OP_ID>?resourceId=<RES_ID>

Actual results: server returns successfull response with body

{u'name': u'postStatus', u'links': [{u'edit': {u'href': u'http://localhost:7080/rest/operation/1365114332'}}], u'resourceId': 10006, u'definitionId': 10001, u'readyToSubmit': False, u'params': {u'message': u'TODO'}, u'id': 1365114332}



Expected results: server must return error response, since it cannot schedule operation for this resource


Additional info: