[virt-tools-list] [PATCH V4 1/2] Add comparison function for NodeDevice
Cole Robinson
crobinso at redhat.com
Mon Sep 15 15:10:09 UTC 2014
On 09/12/2014 09:57 AM, Lin Ma wrote:
> PCIDevice and USBDevice include respective comparison logic.
>
> Signed-off-by: Lin Ma <lma at suse.com>
> ---
> 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
More information about the virt-tools-list
mailing list