Change in vdsm[master]: hostdev: add after_hostdev_list_by_caps hooking point

fromani at redhat.com fromani at redhat.com
Fri Mar 20 13:11:09 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: hostdev: add after_hostdev_list_by_caps hooking point
......................................................................


Patch Set 6: Code-Review+1

(2 comments)

a couple of minuscule comments are not enough to delay this patch.

https://gerrit.ovirt.org/#/c/38884/6//COMMIT_MSG
Commit Message:

Line 11: specific hardware, new hooking point, after_hostdev_list_by_caps is
Line 12: introduced. This hooking point is another _json_hook, meaning that
Line 13: it receives device json representation and is free to modify it.
Line 14: 
Line 15: This hook needs to be used with caution: modifying the device forest (multiple trees) may lead to engine's inability to parse it and use it correctly. Safe modification are removing leaf nodes and whole trees. Although engine may not be able to parse broken tree correctly, it should not explode or cause inconsistent database state.
line wrapping is a bit funny
Line 16: 
Line 17: Change-Id: I4ab6b3fee49cea83266c77dbfcd8c08ed69c630e


https://gerrit.ovirt.org/#/c/38884/6/vdsm/hostdev.py
File vdsm/hostdev.py:

Line 179:         devices[devName] = {'params': params}
Line 180:         if devName in device_to_vm:
Line 181:             devices[devName]['vmId'] = device_to_vm[devName]
Line 182: 
Line 183:     devices = hooks.after_hostdev_list_by_caps(devices)
we can return directly, but let's not digress in this nitpicking.
Line 184:     return devices
Line 185: 
Line 186: 
Line 187: def get_device_params(device_name):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4ab6b3fee49cea83266c77dbfcd8c08ed69c630e
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list