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.
Created attachment 1157669 [details] screenshot1
Closing old issues, please reopen if still needed. In any case patches are welcome.