Change in vdsm[master]: virt: Don't use Vm device configuration in clientIF

fromani at redhat.com fromani at redhat.com
Fri Feb 19 12:45:13 UTC 2016


Francesco Romani has posted comments on this change.

Change subject: virt: Don't use Vm device configuration in clientIF
......................................................................


Patch Set 3:

(1 comment)

https://gerrit.ovirt.org/#/c/53482/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 748:         if drives is None:
        :             drives = self.devSpecMapFromConf()[hwclass.DISK]
> My point is not to rebuild dev spec map if it is already available, namely 
good point. preparePaths() should be public, while devSpecMapFromConf() should be not.
I don't really quite like the rebinding of the default argument, however.

I think the best approach is:

1. rename preparePaths(self, drives) like _preparePathsForDrives(self, drives)
2. inside Vm class, use the renamed _preparePathsForDrives() as usual
3. add public Vm.preparePaths which does

  def preparePaths(self):
    drives = self.devSpecMapFromConf()[hwclass.DISK]
    self._preparePathsForDrives(drives)

What do you think?


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idd0f7c99b4df18d27dfad36bf2275540bc8b958c
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Milan Zamazal <mzamazal at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list