Bug 1477161

Summary: [REST]- Incorrect error message while creating network with name above 256 characters via REST API
Product: [oVirt] ovirt-engine Reporter: Ori Ben Sasson <obensass>
Component: BLL.NetworkAssignee: Leon Goldberg <lgoldber>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: low Docs Contact:
Priority: high    
Version: 4.2.0CC: bugs, mburman
Target Milestone: ovirt-4.1.6Flags: rule-engine: ovirt-4.1+
Target Release: ---   
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: 2017-09-19 10:03:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1458407    
Attachments:
Description Flags
logs none

Description Ori Ben Sasson 2017-08-01 11:33:40 UTC
Created attachment 1307535 [details]
logs

Description of problem:
Incorrect error message while creating network with name above 256 characters via REST API 


Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170731224404.git1758643.el7.centos.noarc

How reproducible:
100

Steps to Reproduce:
1. create a network name with more than 256 characters via REST

Actual results:
<fault>
<detail>[Internal Engine Error]</detail>
<reason>Operation Failed</reason>
</fault>

Expected results:
We expect to correct error

Additional info:

We send:
<network>
    <name>     io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_ne
t__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_n
et__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_net__io_
   </name>
    <usages/>
    <vlan/>
    <data_center id="<dc id>"/>
</network>

Comment 1 Michael Burman 2017-08-27 05:19:11 UTC
Verified on - 4.1.6-0.1.el7

<fault>
<detail>[size must be between 0 and 256, Attribute: network.name]</detail>
<reason>Operation Failed</reason>
</fault>