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
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.0.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ovirt-4.0.0-rc
: 4.0.0
Assignee: Juan Hernández
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
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:
Environment:
Last Closed: 2016-07-05 07:52:51 UTC
oVirt Team: Infra
Embargoed:
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


Links
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]
server.log

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:
<fault>
<detail>[VLAN ID must be a number between 0 and 4094.]</detail>
<reason>Operation Failed</reason>
</fault>

Version-Release number of selected component (if applicable):
ovirt-engine-4.0.0-0.0.master.20160521171336.git2e1899b.el7.centos.noarch


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



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
rhevm-4.0.0.5-0.1.el7ev.noarch

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.