Frank Kobzik has posted comments on this change. Change subject: backend: Control virtio rng device ......................................................................
Patch Set 14: (5 comments) http://gerrit.ovirt.org/#/c/18176/14/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractRngDeviceCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AbstractRngDeviceCommand.java: Line 25: protected AbstractRngDeviceCommand(T parameters) { Line 26: super(parameters); Line 27: Line 28: if (parameters.getRngDevice() == null) { Line 29: cachedEntity = null; > but if rng device is null then no point in continuing no? added bean validation. Line 30: cachedRngDevices = null; Line 31: return; Line 32: } Line 33: Line 57: return permissionList; Line 58: } Line 59: Line 60: @Override Line 61: protected boolean canDoAction() { > perfect candidate for bean validation on the parameter class Done Line 62: if (getParameters().getRngDevice() == null) { Line 63: return failCanDoAction(VdcBllMessages.ACTION_TYPE_RNG_MUST_BE_SPECIFIED); Line 64: } Line 65: http://gerrit.ovirt.org/#/c/18176/14/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmCommand.java: Line 746: throw > 2 issues: umm, ok. i added logging :) http://gerrit.ovirt.org/#/c/18176/14/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmRngDevice.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmRngDevice.java: Line 7: import java.util.Map; Line 8: import java.util.Set; Line 9: import org.ovirt.engine.core.common.utils.VmDeviceType; Line 10: import org.ovirt.engine.core.compat.Guid; Line 11: > can u add javadoc with short description of what source is? Done Line 12: /** Line 13: * This class represents paravirtualized rng device. Line 14: */ Line 15: public class VmRngDevice extends VmDevice implements Serializable { Line 15: public class VmRngDevice extends VmDevice implements Serializable { Line 16: Line 17: public enum Source { Line 18: RANDOM("random"), Line 19: HWRNG("hwrng"); > yes please. its way simpler and less code actually. i'll do it then. Line 20: Line 21: private final String val; Line 22: Line 23: private Source(String val) { -- To view, visit http://gerrit.ovirt.org/18176 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifc26a484c84244074426f4b0c790e2cc4ebb8da6 Gerrit-PatchSet: 14 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com> Gerrit-Reviewer: Martin Betak <mbe...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches