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

Cole Robinson crobinso at redhat.com
Thu Sep 11 20:11:49 UTC 2014


On 09/11/2014 03:44 AM, Lin Ma wrote:
>>>> 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?
> 

Yes, that sounds correct. Thanks for your patience!

- Cole




More information about the virt-tools-list mailing list