Mike Kolesnik has submitted this change and it was merged.

Change subject: core: Fix vNIC validations (#756437)
......................................................................


core: Fix vNIC validations (#756437)

https://bugzilla.redhat.com/756437

Fixed following issues:
1. Check interface name only when creating or updating.
2. Error message for null name fixed.
3. Template vNIC has no MAC so no validations needed.
4. MAC validation for VM vNIC:
4.1. When creating, need to allow empty or null since in this case
     it will be assigned from the MAC pool.
4.2. When updating, empty or null MAC is not allowed.

Notice that @Pattern validation consides null as valid, so only
@NotNull needed special treatment to discern VM vNIC from Template vNIC
update.

Change-Id: Iacec6a2cc4b12c115eb016754246f8ae0d4a0996
Signed-off-by: Mike Kolesnik <[email protected]>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmInterfaceCommand.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmNetworkInterface.java
A 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/validation/group/UpdateVmNic.java
M 
backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/businessentities/VmNetworkInterfaceValidationTest.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M 
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M 
frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M 
frontend/webadmin/modules/userportal/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M 
frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
9 files changed, 135 insertions(+), 27 deletions(-)

Approvals:
  Mike Kolesnik: Verified; Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/4977
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iacec6a2cc4b12c115eb016754246f8ae0d4a0996
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to