Mike Kolesnik has posted comments on this change. Change subject: core: add NetworkLinking to AddVmInterfaceCommand ......................................................................
Patch Set 4: (1 inline comment) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmInterfaceCommand.java Line 167: getVm().getVdsGroupCompatibilityVersion(). Line 168: getValue()); Line 169: Line 170: if (!unlinkingSupported) { Line 171: if (!getParameters().getInterface().isLinked()) { I would put the two validations done here in a validator (see VmValidator for reference) which can then be used in conjunction with valid() method to make code less repetitive & more readable. The two methods would be similar to this: class VmInterfaceValidator { public static ValidationResult linkingSupported(Version) public static ValidationResult noNetworkSupported(Version) } This is since I saw in next patches these two validations appear a lot (sometimes together, sometimes apart) and we don't want to duplicate the code that does it since it's harder to maintain. Line 172: addCanDoActionMessage(VdcBllMessages.UNLINKING_IS_NOT_SUPPORTED); Line 173: addCanDoActionMessage(String.format("$clusterVersion %1$s", Line 174: getVm().getVdsGroupCompatibilityVersion(). Line 175: getValue())); -- To view, visit http://gerrit.ovirt.org/9798 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4f804e0d3117eed22814a8397d0fee12dd9e1347 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches