Bug 1092448
Summary: | Restapi throws NPE when when adding step to job with incorrect step type. | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Ondra Machacek <omachace> |
Component: | ovirt-engine-restapi | Assignee: | Ori Liel <oliel> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Ondra Machacek <omachace> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.4.0 | CC: | aberezin, bazulay, emesika, gklein, iheim, juan.hernandez, oliel, oourfali, oramraz, pstehlik, rbalakri, Rhev-m-bugs, yeylon |
Target Milestone: | --- | ||
Target Release: | 3.5.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | infra | ||
Fixed In Version: | ovirt-engine-3.5.0_alpha1 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-02-17 17:08:40 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1142923, 1156165 |
Description
Ondra Machacek
2014-04-29 10:59:07 UTC
This happens because the RESTAPI isn't validating the values of the enumerated type. We need to create a "StepValidator" class, similar to "DiskValidator", for example. Then we need to call the "validateEnums()" method in the appropriate places inside the resource implementation. Eli, can you take care of this? (In reply to Juan Hernández from comment #1) > This happens because the RESTAPI isn't validating the values of the > enumerated type. We need to create a "StepValidator" class, similar to > "DiskValidator", for example. Then we need to call the "validateEnums()" > method in the appropriate places inside the resource implementation. > > Eli, can you take care of this? Sure Patch posted: http://gerrit.ovirt.org/#/c/27232/1 Verified in ovirt-engine-backend-3.5.0-0.0.master.20140605145557.git3ddd2de.el6.noarch. add step --job-identifier 'dce4297b-98ff-4ee7-a434-08a0b4ca33f8' --description 'step_External_tasks_test' --job-id 'dce4297b-98ff-4ee7-a434-08a0b4ca33f8' --type 'NONEXISTING_TYPE' --expect '201-created' ============================================================================================== ERROR ============================================================================================ status: 400 reason: Bad Request detail: NONEXISTING_TYPE is not a member of StepEnum. Possible values for StepEnum are: validating, executing, finalizing, rebalancing_volume, removing_bricks, unknown ================================================================================================================================================================================================= rhev 3.5.0 was released. closing. |