[pve-devel] [PATCH 3/3] iscsi: add check_connection

Alexandre Derumier aderumier at odiso.com
Wed Jul 18 13:35:02 CEST 2012


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/Storage/ISCSIPlugin.pm |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/PVE/Storage/ISCSIPlugin.pm b/PVE/Storage/ISCSIPlugin.pm
index 3113740..ef88143 100644
--- a/PVE/Storage/ISCSIPlugin.pm
+++ b/PVE/Storage/ISCSIPlugin.pm
@@ -371,4 +371,11 @@ sub deactivate_storage {
     }
 }
 
+sub check_connection {
+    my ($class, $storeid, $scfg) = @_;
+
+    my $portal = $scfg->{portal};
+    return iscsi_test_portal($portal);
+}
+
 1;
-- 
1.7.2.5




More information about the pve-devel mailing list