Omer Frenkel has posted comments on this change. Change subject: backend: Control virtio rng device ......................................................................
Patch Set 24: (2 comments) http://gerrit.ovirt.org/#/c/18176/24/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmCommand.java: Line 136: checkTrustedService(); Line 137: setSucceeded(true); Line 138: } Line 139: Line 140: private boolean updateRngDevice() { is there a way to reuse this code with the same function in update template? it looks the same Line 141: // do not update if this flag is not set Line 142: if (getParameters().isUpdateRngDevice()) { Line 143: VdcQueryReturnValue query = Line 144: getBackend().runInternalQuery(VdcQueryType.GetRngDevice, new IdQueryParameters(getParameters().getVmId())); http://gerrit.ovirt.org/#/c/18176/24/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 67: public static final String BYTES_STRING = "bytes"; Line 68: public static final String PERIOD_STRING = "period"; Line 69: public static final String SOURCE_STRING = "source"; Line 70: Line 71: public static VmRngDevice create(Guid id, Guid vmId, Integer bytes, Integer period, Source source) { why do you need a static method to return an instance? Line 72: return new VmRngDevice(new VmDeviceId(id, vmId), createSpecPars(bytes, period, source)); Line 73: } Line 74: Line 75: public static VmRngDevice fromVmDevice(VmDevice dev) { -- 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: 24 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