Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1339907

Summary: REST-API V3| Update network with invalid VLAN id get NPE massage response
Product: [oVirt] ovirt-engine Reporter: Meni Yakove <myakove>
Component: RestAPIAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.0.0CC: bugs, stirabos
Target Milestone: ovirt-4.0.0-rcKeywords: Automation, Regression
Target Release: 4.0.0Flags: rule-engine: ovirt-4.0.0+
rule-engine: blocker+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
rule-engine: testing_ack+
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-05 07:52:51 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:
Attachments:
Description Flags
server.log none

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.