Bug 1336196

Summary: [SR-IOV] Improve the validation for the number of VFs in the edit VF dialog
Product: [oVirt] ovirt-engine Reporter: Michael Burman <mburman>
Component: BLL.NetworkAssignee: Alona Kaplan <alkaplan>
Status: CLOSED WONTFIX QA Contact: Meni Yakove <myakove>
Severity: low Docs Contact:
Priority: low    
Version: 4.0.0CC: bugs, danken, ylavi
Target Milestone: ---Flags: sbonazzo: ovirt-4.3-
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-01 07:57:22 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:
Attachments:
Description Flags
screenshot1 none

Description Michael Burman 2016-05-15 14:34:00 UTC
Description of problem:
[SR-IOV] Improve the validation for the number of VFs in the edit VF dialog. 

Currently(3.6.6.2 and 4.0) engine validate that the number of VFs is an integer number between the supported range. If the supported range of a PF is 0-7, so the higher number that can be entered is 7(not higher). If the range is 0-63, then the higher number can be entered is 63. Any number higher than this and engine will block from plessing the 'OK' button in the edit VF dialog. 

But, when entering values like 2 -0 or 2 mm(there is a space after the first number), engine accepting this and it's possible to approve setup networks operation.

Result - nothing has changed on host(although it seems that changes were saved on host) , the number of VFs is as the last configured.  

Version-Release number of selected component (if applicable):
3.6.6.2-0.1.el6
4.0.0-0.6.master.el7ev

How reproducible:
100

Steps to Reproduce:
1. Install host with SR-IOV capable NICs
2. In the Setup Networks go to the edit VF dialog(pencil) and enter the next values :
2 - 0
2 - mmm
2mmm
2 44

Actual results:
All of the above values are acceptable by the engine and it is possible to approve setup networks operation. 
Engine only blocking numbers higher then the maximum in the supported range, but once pressing the 'space' button after the first number, it is possible enter any desired value in this field and to approve operation.
After approving the setup networks operation, nothing happens and the last configured value isn't changed.  

Expected results:
This validation should be improved.

Comment 1 Michael Burman 2016-05-15 14:36:04 UTC
Created attachment 1157669 [details]
screenshot1

Comment 2 Yaniv Lavi 2018-08-01 07:57:22 UTC
Closing old issues, please reopen if still needed.
In any case patches are welcome.