Bug 1339907 - REST-API V3| Update network with invalid VLAN id get NPE massage response
Summary: REST-API V3| Update network with invalid VLAN id get NPE massage response
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-4.0.0-rc
: 4.0.0
Assignee: Juan Hernández
QA Contact: Michael Burman
Depends On:
TreeView+ depends on / blocked
Reported: 2016-05-26 06:36 UTC by Meni Yakove
Modified: 2016-07-05 07:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-07-05 07:52:51 UTC
oVirt Team: Infra
rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
rule-engine: testing_ack+

Attachments (Terms of Use)
server.log (102.78 KB, application/zip)
2016-05-26 06:36 UTC, Meni Yakove
no flags Details

System ID Private Priority Status Summary Last Updated
oVirt gerrit 58260 0 master MERGED restapi: Add V3 IO exception mapper 2016-05-31 18:52:38 UTC
oVirt gerrit 58404 0 ovirt-engine-4.0 MERGED restapi: Add V3 IO exception mapper 2016-05-31 20:37:45 UTC

Description Meni Yakove 2016-05-26 06:36:35 UTC
Created attachment 1161743 [details]

Description of problem:
When updating network with invalid VLAN id (-1) from REST-API (V3) the response is:
java.io.IOException: org.ovirt.engine.api.utils.InvalidValueException: Negative value -1 not allowed for unsigned shorts, valid values are between 0 and 65535

(no XML tags) so our validator cannot parse it and our automation test fail.
On REST-API V4 the response is good:
<detail>[VLAN ID must be a number between 0 and 4094.]</detail>
<reason>Operation Failed</reason>

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

Steps to Reproduce:
1. Update network via REST-API V3 with:
PUT ovirt-engine/api/networks/<network_id>
    <vlan id="-1"/>

Additional info:

Comment 1 Red Hat Bugzilla Rules Engine 2016-05-30 12:39:36 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 2 Meni Yakove 2016-06-22 15:15:02 UTC

Comment 3 Sandro Bonazzola 2016-07-05 07:52:51 UTC
oVirt 4.0.0 has been released, closing current release.

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