Description of problem:
[SR-IOV] Improve the validation for the number of VFs in the edit VF dialog.
Currently(220.127.116.11 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):
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
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.
This validation should be improved.
Created attachment 1157669 [details]
Closing old issues, please reopen if still needed.
In any case patches are welcome.