[PATCH] libvirt-perl: Fix the wrong binding of virNodeDeviceLookupSCSIHostByWWN

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

 



The second parameter for virNodeDeviceLookupSCSIHostByWWN is "wwnn"
instead of "wwpn", and the API supports "flags".
---
 AUTHORS                    | 1 +
 lib/Sys/Virt/NodeDevice.pm | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index d53f191..c2af49a 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -12,5 +12,6 @@ Patches contributed by:
    Stepan Kasal      <skasal-at-redhat-dot-com>
    Ludwig Nussel     <ludwig-dot-nussel-at-suse-dot-de>
    Zhe Peng          <zpeng-at-redhat-dot-com>
+   Osier Yang        <jyang-at-redhat-dot-com>
 
 -- End
diff --git a/lib/Sys/Virt/NodeDevice.pm b/lib/Sys/Virt/NodeDevice.pm
index 984910d..29ceac7 100644
--- a/lib/Sys/Virt/NodeDevice.pm
+++ b/lib/Sys/Virt/NodeDevice.pm
@@ -51,10 +51,11 @@ sub _new {
     my $self;
     if (exists $params{name}) {
 	$self = Sys::Virt::NodeDevice::_lookup_by_name($con,  $params{name});
-    } elsif (exists $params{wwpn}) {
+    } elsif (exists $params{wwnn}) {
 	$self = Sys::Virt::NodeDevice::_lookup_scsihost_by_wwn($con,
+							       $params{wwnn},
 							       $params{wwpn},
-							       $params{wwnn});
+                                                               $params{flags});
     } elsif (exists $params{xml}) {
 	$self = Sys::Virt::NodeDevice::_create_xml($con, $params{xml});
     } else {
-- 
1.8.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]