Re: [PATCH V4 1/2] Add comparison function for NodeDevice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/12/2014 09:57 AM, Lin Ma wrote:
> PCIDevice and USBDevice include respective comparison logic.
> 
> Signed-off-by: Lin Ma <lma@xxxxxxxx>
> ---
>  virtManager/details.py | 47 ++------------------------------
>  virtinst/nodedev.py    | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 74 insertions(+), 45 deletions(-)
> 

Thanks! Patches generally look good, just a couple bits on this one:

- Break out the initfy and attrVal functions, just move to the top of
nodedev.py and name it _initify/_attrVal, to share it between the two
compare_* implementations

- The function actually doesn't need to be static since it always takes an
instantiated nodedev instance. So remove the static bit. The generic
NodeDevice implementation should just return False, but USB/PCI will override
that with their implementations

- Once the static bit is removed, it makes sense to rename the function to
compare_to_hostdev, since you will only pass a hostdev instance.

After that the patches should be ready. Thanks!

- Cole

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list




[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux