Bug 974955 - Creating a DRAFT operation accepts invalid ID parameters
Summary: Creating a DRAFT operation accepts invalid ID parameters
Keywords:
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: REST
Version: 4.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Heiko W. Rupp
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-17 09:06 UTC by Libor Zoubek
Modified: 2022-03-31 04:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

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:


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