[virt-tools-list] 答复: Re: [PATCH V2] addhardware: Deal with the conflict host device

Lin Ma lma at suse.com
Thu Sep 11 07:44:26 UTC 2014


>>> Cole Robinson <crobinso at redhat.com> 09/06/14 6:28 AM >>>

......
> - The comparison function will have two consumers: details.py and
> addhardware.py. But if you lump it in with the 'iterate over all VMs'
> behavior, it's only useful in addhardware.py.
So, I should
1. move the comparison logic from details.py:lookup_nodedev to
nodedev.py:NodeDevice.compare_to_nodedev, separate the logic 
implement in PCIDevice and USBDevice.
2. in details.py:lookup_nodedev, iterate all of nodedevices & call 
NodeDevice.compare_to_nodedev to compare against the passed
hostdev and the passed nodedev.
3. in addhardware.py:validate_page_hostdev, iterate all of hostdevs in
all of vms & call NodeDevice.compare_to_nodedev to compare against
the passed hostdev and the passed nodedev.
Are these right?

Thanks,
Lin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20140911/414b7c5e/attachment.htm>


More information about the virt-tools-list mailing list