Martin Mucha has posted comments on this change. Change subject: engine: Add NetworkAttachmentValidator ......................................................................
Patch Set 21: (1 comment) https://gerrit.ovirt.org/#/c/33331/21/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentValidator.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/NetworkAttachmentValidator.java: Line 76: } Line 77: Line 78: public ValidationResult nicExists() { Line 79: return ValidationResult.failWith(VdcBllMessages.HOST_NETWORK_INTERFACE_NOT_EXIST) Line 80: .when(attachment.getNicName() == null); > Why nicName and not nicId? there's trick. In command canDoAction, there's completer, which fills in missing name for attachments, so then existence is verified on names. I only altered it, so if both is set, consistence is verified. If we do not like this (it's kinda uncommon), it probably can be replaced by two methods, one for new bonds and other for rest. Line 81: } Line 82: Line 83: /** Line 84: * Checks if a network is configured incorrectly: -- To view, visit https://gerrit.ovirt.org/33331 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I908511f4c0f999d82120074c290eccd9e1006cdc Gerrit-PatchSet: 21 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <[email protected]> Gerrit-Reviewer: Alona Kaplan <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Mucha <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
