Omer Frenkel has posted comments on this change. Change subject: core: add graphics device to management classes ......................................................................
Patch Set 8: (2 comments) http://gerrit.ovirt.org/#/c/28567/8/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java: Line 440: } Line 441: Line 442: private static int getNumOfMonitors(VM vm) { Line 443: int maxMonitorsSpice = vm.getSingleQxlPci() ? 1 : vm.getNumOfMonitors(); Line 444: int maxMonitorsVnc = Math.max(1, vm.getNumOfMonitors()); please create a constant for VNC_MAX_MONITORS Line 445: Line 446: return Math.min(maxMonitorsSpice, maxMonitorsVnc); Line 447: } Line 448: http://gerrit.ovirt.org/#/c/28567/8/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VmManagementParametersBase.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VmManagementParametersBase.java: Line 79: * This parameter is used to decide if to create graphics device or not. If it is null then: Line 80: * - for add vm don't add graphics device, Line 81: * - for update the current configuration will remain. Line 82: */ Line 83: private Map<GraphicsType, Boolean> shouldUpdateGraphicsDevice; why having map<type,bool> and map<type,device> and not just can't we use just a list (set?) of devices, if the list is null: - for add dont add, for update use current if the list is not null, create whatever in the list: - for update, if list is empty, or device is missing, remove it. Line 84: Line 85: public VmManagementParametersBase() { Line 86: init(); Line 87: } -- To view, visit http://gerrit.ovirt.org/28567 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I39c84ce94cd3cb52286c52d765a389e69c9b0e62 Gerrit-PatchSet: 8 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: 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