[Libguestfs] [PATCH 2/2] drives: allow authentication for iSCSI

Pino Toscano
2015-12-01T14:35:57Z

Now that both the direct and libvirt backends handle authentication with
iSCSI correctly, we can allow this in the library.
---
 generator/actions.ml |  2 ++
 src/drives.c         | 10 ----------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/generator/actions.ml b/generator/actions.ml
index 7ab8ee4..db08de0 100644
--- a/generator/actions.ml
+++ b/generator/actions.ml
@@ -1453,6 +1453,8 @@ See also: L<guestfs(3)/GLUSTER>

 Connect to the iSCSI server.
 The C<server> parameter must also be supplied - see below.
+The C<username> parameter may be supplied.  See below.
+The C<secret> parameter may be supplied.  See below.

 See also: L<guestfs(3)/ISCSI>.

diff --git a/src/drives.c b/src/drives.c
index dc88495..385cf04 100644
--- a/src/drives.c
+++ b/src/drives.c
@@ -364,16 +364,6 @@ static struct drive *
 create_drive_iscsi (guestfs_h *g,
                     const struct drive_create_data *data)
 {
-  if (data->username != NULL) {
-    error (g, _("iscsi: you cannot specify a username with this
protocol"));
-    return NULL;
-  }
-
-  if (data->secret != NULL) {
-    error (g, _("iscsi: you cannot specify a secret with this
protocol"));
-    return NULL;
-  }
-
   if (data->nr_servers != 1) {
     error (g, _("iscsi: you must specify exactly one server"));
     return NULL;
--
2.1.0