Change in vdsm[master]: virt: devices: move device creation in a submodule

danken at redhat.com danken at redhat.com
Thu Mar 26 14:29:19 UTC 2015


Dan Kenigsberg has posted comments on this change.

Change subject: virt: devices: move device creation in a submodule
......................................................................


Patch Set 5: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/38077/5//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: virt: devices: move device creation in a submodule
Line 8: 
Line 9: In the Vm class, the vm devices are arranged in a
Line 10: tree-like structure.
the vmdevice object are kept in lists per device type, held together in a dictionary.

This is a very degenerate kind of tree. Its tree-ness is nothing more than an easy way to access all devices of a specicic type. It has nothing to do with device tree a-la libvirt's nodedev.

I think that we should hide this implementation detail, rather than cast it into a module name. How about defining a vmdevcontainer class, with a function like iter_by_type()?
I think this would prove a more future-proof approach.
Line 11: This patch moves the related code into a new
Line 12: hwtree module into the vmdevices subpackages.
Line 13: 
Line 14: Change-Id: If17cce15f653843848eea42b567a0e4454757cd1


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If17cce15f653843848eea42b567a0e4454757cd1
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Martin Polednik <mpolednik at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Vitor de Lima <vdelima 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