Change in vdsm[master]: vmdevices: move storage methods to storage module

danken at redhat.com danken at redhat.com
Tue May 5 10:47:30 UTC 2015


Dan Kenigsberg has posted comments on this change.

Change subject: vmdevices: move storage methods to storage module
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.ovirt.org/#/c/40133/4/vdsm/virt/vmdevices/storage.py
File vdsm/virt/vmdevices/storage.py:

Line 47:         # TODO: use introspection
Line 48:         return (cls.NONE, cls.EXCLUSIVE, cls.SHARED, cls.TRANSIENT)
Line 49: 
Line 50: 
Line 51: def spec_list_from_legacy_conf(conf, arch):
> Nice idea, code will look less cluttered and the legacy stuff will be easie
This function extracts *disk specs* from legacy conf. As such, it is very much related to storage.

I do not understand your suggestion regarding legacy.py. Could you elaborate? We could keep a conversion of legacy-to-devices in a single vm.py function, but I find it nicer to split it per device type.
Line 52:     """
Line 53:     Returns a list of drive specification dictionaries from legacy vm.conf
Line 54:     """
Line 55:     conf_drives = conf.get('drives', [])


Line 73: 
Line 74: def _spec_list_from_legacy_direct_paths(conf):
Line 75:     """
Line 76:     Backward compatibility for qa scripts that specify direct paths.
Line 77:     """
> I think it's just noone cared/remembered to review this snipped before.
Michal mentions that we have to keep support of legacy devices as long as we support clusterLevel=3.0. There may be running VMs with legacy conf, which we want to accept on migration. :-(
Line 78:     legacies = []
Line 79:     device_spec = ((0, 'hda'), (1, 'hdb'), (2, 'hdc'), (3, 'hdd'))
Line 80:     for index, linux_name in device_spec:
Line 81:         path = conf.get(linux_name)


-- 
To view, visit https://gerrit.ovirt.org/40133
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie7b2db4ba7569ff0170a948b2954064c99c804a0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list