Martin Peřina has posted comments on this change.

Change subject: core: Changes type of VmDevice from String to enum
......................................................................


Patch Set 1: (4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/VmDeviceUtils.java
Line 185:                 updateUSBSlots(null, vmBase);
Line 186:                 // add mem balloon if defined
Line 187:                 updateMemoryBalloon(null, vmBase, 
vm.isBalloonEnabled());
Line 188:             }
Line 189:             if (VmDeviceGeneralType.DISK == device.getType()
No problem, I will do it
Line 190:                     && 
VmDeviceType.DISK.getName().equals(device.getDevice())) {
Line 191:                 if (diskCount < disks.size()) {
Line 192:                     id = (disks.get(diskCount++)).getId();
Line 193:                 }


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmDeviceGeneralType.java
Line 52:     /**
Line 53:      * Converts enum type to string value to save in database
Line 54:      */
Line 55:     public String getValue() {
Line 56:         return name().toLowerCase();
Ok
Line 57:     }
Line 58: 
Line 59:     /**
Line 60:      * Converts string representation to enum value


....................................................
File 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfReader.java
Line 207:             
vmDevice.setSpecParams(Collections.<String,Object>emptyMap());
Line 208:         }
Line 209:         if (node.SelectSingleNode(OvfProperties.VMD_TYPE, _xmlNS) != 
null
Line 210:                 && 
!StringUtils.isEmpty(node.SelectSingleNode(OvfProperties.VMD_TYPE, 
_xmlNS).InnerText)) {
Line 211:             
vmDevice.setType(VmDeviceGeneralType.forValue(String.valueOf(node.SelectSingleNode(OvfProperties.VMD_TYPE,
 _xmlNS).InnerText)));
Well, in all code I've found, there are only some values of VmDeviceType values 
set into VmDevice.type. So can there be some other type of devices? If yes, I 
can add
UNKNOWN value to VmDeviceGeneralType.
Line 212:         } else {
Line 213:             int resourceType = getResourceType(node, 
OvfProperties.VMD_RESOURCE_TYPE);
Line 214:             
vmDevice.setType(VmDeviceGeneralType.forValue(VmDeviceType.getoVirtDevice(resourceType).getName()));
Line 215:         }


....................................................
File 
frontend/webadmin/modules/gwt-common/src/main/resources/org/ovirt/engine/core/Common.gwt.xml
Line 103:               <include name="common/businessentities/VM.java" />
Line 104:               <include name="common/businessentities/VmPayload.java" 
/>
Line 105:               <include name="common/businessentities/VmBase.java" />
Line 106:               <include name="common/businessentities/VmDynamic.java" 
/>
Line 107:         <include name="common/businessentities/VmDevice.java" />
Sorry, I will it immediately.
Line 108:               <include 
name="common/businessentities/VmDeviceGeneralType.java" />
Line 109:               <include name="common/businessentities/VmDeviceId.java" 
/>
Line 110:               <include 
name="common/businessentities/VmExitStatus.java" />
Line 111:               <include name="common/businessentities/VmOsType.java" />


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Icada39e3918fb053cb0ad0388178ccf5c6338ca2
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Martin Peřina <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to