Martin Polednik has posted comments on this change.

Change subject: vm: move device configuration in a module
......................................................................


Patch Set 6: Code-Review-1

(4 comments)

-1 for the questions/possible improvements, can be (and I expect that they 
should be) implemented or thought of in future patches

http://gerrit.ovirt.org/#/c/36266/6/vdsm/virt/vmdevices/configuration.py
File vdsm/virt/vmdevices/configuration.py:

Line 32: 
Line 33: 
Line 34: DEFAULT_BRIDGE = config.get("vars", "default_bridge")
Line 35: 
Line 36: 
I'm not sure if 'configuration' is the right name for the module, since e.g. 
this part is not really a configuration but rather hwclass thing? OR actually 
the name is right, just this thing belongs somewhere else?
Line 37: DEVICE_MAPPING = (
Line 38:     (hwclass.DISK, storage.Drive),
Line 39:     (hwclass.NIC, network.Interface),
Line 40:     (hwclass.SOUND, core.Sound),


Line 216: 
Line 217:     return confDrives
Line 218: 
Line 219: 
Line 220: def default_disk_interface(arch):
why do we keep DEFAULT_BRIDGE on the top, but disk interfaces here?
Line 221:     DEFAULT_DISK_INTERFACES = {caps.Architecture.X86_64: 'ide',
Line 222:                                caps.Architecture.PPC64: 'scsi'}
Line 223:     return DEFAULT_DISK_INTERFACES[arch]
Line 224: 


Line 221:     DEFAULT_DISK_INTERFACES = {caps.Architecture.X86_64: 'ide',
Line 222:                                caps.Architecture.PPC64: 'scsi'}
Line 223:     return DEFAULT_DISK_INTERFACES[arch]
Line 224: 
Line 225: 
The naming scheme doesn't work here compared to others: 
_removable_drives_from_conf would be more consistent and imho more descriptive
Line 226: def _legacy_drives(conf):
Line 227:     """
Line 228:     Backward compatibility for qa scripts that specify direct paths.
Line 229:     """


Line 237:                              'iface': 'ide', 'index': index,
Line 238:                              'truesize': 0})
Line 239:     return legacies
Line 240: 
Line 241: 
same as above
Line 242: def _removable_drives(conf, arch):
Line 243:     removables = [{
Line 244:         'type': hwclass.DISK,
Line 245:         'device': 'cdrom',


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If9b133a75cd4cb5d11b1f09aff711846eca33ff8
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to