On 09/11/2014 03:44 AM, Lin Ma wrote: >>>> Cole Robinson <crobinso@xxxxxxxxxx> 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 _______________________________________________ virt-tools-list mailing list virt-tools-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/virt-tools-list