Yair Zaslavsky has posted comments on this change.
Change subject: core: Changes type of VmDevice from String to enum
......................................................................
Patch Set 1: (1 inline comment)
Roy, not sure I fully understand your idea.
1. What is DeviceName ?
2. I understood the method that returns a list of all possible "sub values"
(for disk -> it returns disk and cdrom), but what about the CTOR? or - how will
an enum literal hold just a single device name it is associated with? (i.e -
for a certain VmDevice you have a single type which represents INTERFACE/BRIDGE.
....................................................
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)));
Please elaborate, not sure I understood your comment.
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: }
--
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: 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