Change in vdsm[master]: vm: move device attached check to device itself

nsoffer at redhat.com nsoffer at redhat.com
Thu Nov 26 17:55:35 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: vm: move device attached check to device itself
......................................................................


Patch Set 10: Code-Review-1

(1 comment)

Just need to remove the unneeded changes in storage.py

https://gerrit.ovirt.org/#/c/48881/10/vdsm/virt/vmdevices/storage.py
File vdsm/virt/vmdevices/storage.py:

Line 435:             DISK_TYPE.BLOCK: 'dev',
Line 436:             DISK_TYPE.NETWORK: 'name'
Line 437:         }
Line 438:         return ("./devices/disk/source[@%s='%s']" %
Line 439:                 (source_key[self.diskType], self.path))
All the changes except making _xpath private and adding is_attached_to are not required and should not be in this patch. Please separate them to another patch.

I asked to replace \ with (), because it looked like new code, but now I see this was the existing code. Please reject such requests in the future :-)

I don't know why you reformatted source_key - it was done here:
https://gerrit.ovirt.org/#/c/48881/6/vdsm/virt/vmdevices/storage.py,unified
Line 440: 
Line 441:     def is_attached_to(self, xml_string):
Line 442:         dom = ET.fromstring(xml_string)
Line 443:         return bool(dom.findall(self._xpath))


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4df478798bc774c1134ca36879abd809ea2b6380
Gerrit-PatchSet: 10
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list