Frank Kobzik has posted comments on this change.

Change subject: engine: Change DisplayType semantics
......................................................................


Patch Set 27:

(2 comments)

http://gerrit.ovirt.org/#/c/30837/27/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmOnceCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmOnceCommand.java:

Line 140: 
Line 141:         createVmParams.getVm().setVmInit(getParameters().getVmInit());
Line 142: 
Line 143:         for (GraphicsType graphicsType : 
getParameters().getRunOnceGraphics()) {
Line 144:             getVm().getGraphicsInfos().put(graphicsType, new 
GraphicsInfo());
> im a little confused
when VM is stopped, graphicsInfos should be empty map - it contains dynamic 
info filled by vdsm.

- in 'Run' scenario this empty map is untouched (so it's empty) and graphics 
devices are created according to (static) devices from DB.

- in 'Run Once' scenario this map is filled GraphicsInfo values (which 
correspond to user-selected graphics in RunOnce dlg or restapi). VmInfoBuilder 
class recognizes non-empty graphicsInfos and sends vdsm devices according to 
this.

I used similar way of overriding graphics that has been used before my patches.
Line 145:         }
Line 146: 
Line 147:         return createVmParams;
Line 148:     }


http://gerrit.ovirt.org/#/c/30837/27/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java:

Line 815:                                 
Integer.valueOf(node.SelectSingleNode(OvfProperties.VMD_VIRTUAL_QUANTITY, 
_xmlNS).innerText);
Line 816:                         if (virtualQuantity > 1) {
Line 817:                             
vmDevice.setDevice(VmDeviceType.QXL.getName());
Line 818:                         } else {
Line 819:                             VmDeviceType vmDeviceType = 
getDisplayDevice(DisplayType.vga);
> we still need backward compatibility for old ovfs with old values
Oops, thanks reminder. Will fix in a new PS.
Line 820:                             
vmDevice.setDevice(vmDeviceType.getName());
Line 821:                         }
Line 822:                     } else { // default to spice if quantity not found
Line 823:                         
vmDevice.setDevice(VmDeviceType.QXL.getName());


-- 
To view, visit http://gerrit.ovirt.org/30837
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0907c9086f49f909250d9956356a0251954f1427
Gerrit-PatchSet: 27
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Frank Kobzik <fkob...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@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

Reply via email to