Blame SOURCES/0067-RHEL-8-Disable-unsupported-remote-drive-protocols-RH.patch

3efd08
From 717d8b6a2d0bb559684a436b4f1bc115ac36d3dd Mon Sep 17 00:00:00 2001
df3bb2
From: "Richard W.M. Jones" <rjones@redhat.com>
df3bb2
Date: Mon, 29 Jul 2013 14:47:56 +0100
df3bb2
Subject: [PATCH] RHEL 8: Disable unsupported remote drive protocols
df3bb2
 (RHBZ#962113).
df3bb2
df3bb2
This disables support for unsupported remote drive protocols:
df3bb2
df3bb2
 * ftp
df3bb2
 * ftps
df3bb2
 * http
df3bb2
 * https
df3bb2
 * tftp
df3bb2
 * gluster
df3bb2
 * iscsi
df3bb2
 * sheepdog
df3bb2
 * ssh
df3bb2
df3bb2
Note 'nbd' is not disabled, and of course 'file' works.
df3bb2
df3bb2
We hope to gradually add some of these back over the lifetime of RHEL 8.
df3bb2
---
df3bb2
 docs/guestfs-testing.pod               |  20 -----
df3bb2
 fish/guestfish.pod                     |  66 ++--------------
df3bb2
 fish/test-add-uri.sh                   |  32 --------
df3bb2
 generator/actions_core.ml              |  50 +------------
df3bb2
 lib/drives.c                           |   8 ++
df3bb2
 lib/guestfs.pod                        | 100 -------------------------
df3bb2
 tests/disks/test-qemu-drive-libvirt.sh |  28 -------
df3bb2
 tests/disks/test-qemu-drive.sh         |  60 ---------------
df3bb2
 8 files changed, 16 insertions(+), 348 deletions(-)
df3bb2
df3bb2
diff --git a/docs/guestfs-testing.pod b/docs/guestfs-testing.pod
df3bb2
index f558964bf..8f264ed17 100644
df3bb2
--- a/docs/guestfs-testing.pod
df3bb2
+++ b/docs/guestfs-testing.pod
df3bb2
@@ -109,26 +109,6 @@ image.  To exit, type C<exit>.
df3bb2
 If you get an error, try enabling debugging (add C<-v> to the command
df3bb2
 line).  Also make sure that L<libguestfs-test-tool(1)> succeeds.
df3bb2
 
df3bb2
-=head2 Try to open a remote guest image with guestfish.
df3bb2
-
df3bb2
-You may also have to disable libvirt by setting this:
df3bb2
-
df3bb2
- export LIBGUESTFS_BACKEND=direct
df3bb2
-
df3bb2
-If you have a disk image available over HTTP/FTP, try to open it.
df3bb2
-
df3bb2
- guestfish --ro -i --format=raw -a http://www.example.com/disk.img
df3bb2
-
df3bb2
-For SSH you will need to make sure that ssh-agent is set up so you
df3bb2
-don't need a password to log in to the remote machine.  Then a command
df3bb2
-similar to this should work:
df3bb2
-
df3bb2
- guestfish --ro -i --format=raw \
df3bb2
-   -a ssh://remote.example.com/path/to/disk.img
df3bb2
-
df3bb2
-If you get an error, try enabling debugging (add C<-v> to the command
df3bb2
-line).  Also make sure that L<libguestfs-test-tool(1)> succeeds.
df3bb2
-
df3bb2
 =head2 Run virt-alignment-scan on all your guests.
df3bb2
 
df3bb2
 Run L<virt-alignment-scan(1)> on guests or disk images:
df3bb2
diff --git a/fish/guestfish.pod b/fish/guestfish.pod
3efd08
index f1fdf094d..bacb60e0b 100644
df3bb2
--- a/fish/guestfish.pod
df3bb2
+++ b/fish/guestfish.pod
df3bb2
@@ -131,9 +131,9 @@ To list what is available do:
df3bb2
 
df3bb2
 =head2 Remote drives
df3bb2
 
df3bb2
-Access a remote disk using ssh:
df3bb2
+Access a remote disk using NBD:
df3bb2
 
df3bb2
- guestfish -a ssh://example.com/path/to/disk.img
df3bb2
+ guestfish -a nbd://example.com
df3bb2
 
df3bb2
 =head2 Remote control
df3bb2
 
3efd08
@@ -1145,12 +1145,12 @@ L<guestfs(3)/REMOTE STORAGE>>.
df3bb2
 On the command line, you can use the I<-a> option to add network
df3bb2
 block devices using a URI-style format, for example:
df3bb2
 
df3bb2
- guestfish -a ssh://root@example.com/disk.img
df3bb2
+ guestfish -a nbd://example.com
df3bb2
 
df3bb2
 URIs I<cannot> be used with the L</add> command.  The equivalent
df3bb2
 command using the API directly is:
df3bb2
 
df3bb2
- ><fs> add /disk.img protocol:ssh server:tcp:example.com username:root
df3bb2
+ ><fs> add /disk.img protocol:nbd server:tcp:example.com
df3bb2
 
df3bb2
 The possible I<-a URI> formats are described below.
df3bb2
 
3efd08
@@ -1160,40 +1160,6 @@ The possible I<-a URI> formats are described below.
df3bb2
 
df3bb2
 Add the local disk image (or device) called F<disk.img>.
df3bb2
 
df3bb2
-=head2 B<-a ftp://[user@]example.com[:port]/disk.img>
df3bb2
-
df3bb2
-=head2 B<-a ftps://[user@]example.com[:port]/disk.img>
df3bb2
-
df3bb2
-=head2 B<-a http://[user@]example.com[:port]/disk.img>
df3bb2
-
df3bb2
-=head2 B<-a https://[user@]example.com[:port]/disk.img>
df3bb2
-
df3bb2
-=head2 B<-a tftp://[user@]example.com[:port]/disk.img>
df3bb2
-
df3bb2
-Add a disk located on a remote FTP, HTTP or TFTP server.
df3bb2
-
df3bb2
-The equivalent API command would be:
df3bb2
-
df3bb2
- ><fs> add /disk.img protocol:(ftp|...) server:tcp:example.com
df3bb2
-
df3bb2
-=head2 B<-a gluster://example.com[:port]/volname/image>
df3bb2
-
df3bb2
-Add a disk image located on GlusterFS storage.
df3bb2
-
df3bb2
-The server is the one running C<glusterd>, and may be C<localhost>.
df3bb2
-
df3bb2
-The equivalent API command would be:
df3bb2
-
df3bb2
- ><fs> add volname/image protocol:gluster server:tcp:example.com
df3bb2
-
df3bb2
-=head2 B<-a iscsi://example.com[:port]/target-iqn-name[/lun]>
df3bb2
-
df3bb2
-Add a disk located on an iSCSI server.
df3bb2
-
df3bb2
-The equivalent API command would be:
df3bb2
-
df3bb2
- ><fs> add target-iqn-name/lun protocol:iscsi server:tcp:example.com
df3bb2
-
df3bb2
 =head2 B<-a nbd://example.com[:port]>
df3bb2
 
df3bb2
 =head2 B<-a nbd://example.com[:port]/exportname>
3efd08
@@ -1228,35 +1194,13 @@ The equivalent API command would be:
df3bb2
 
df3bb2
  ><fs> add pool/disk protocol:rbd server:tcp:example.com:port
df3bb2
 
df3bb2
-=head2 B<-a sheepdog://[example.com[:port]]/volume/image>
df3bb2
-
df3bb2
-Add a disk image located on a Sheepdog volume.
df3bb2
-
df3bb2
-The server name is optional.  Although libguestfs and Sheepdog
df3bb2
-supports multiple servers, only at most one server can be specified
df3bb2
-when using this URI syntax.
df3bb2
-
df3bb2
-The equivalent API command would be:
df3bb2
-
df3bb2
- ><fs> add volume protocol:sheepdog [server:tcp:example.com]
df3bb2
-
df3bb2
-=head2 B<-a ssh://[user@]example.com[:port]/disk.img>
df3bb2
-
df3bb2
-Add a disk image located on a remote server, accessed using the Secure
df3bb2
-Shell (ssh) SFTP protocol.  SFTP is supported out of the box by all
df3bb2
-major SSH servers.
df3bb2
-
df3bb2
-The equivalent API command would be:
df3bb2
-
df3bb2
- ><fs> add /disk protocol:ssh server:tcp:example.com [username:user]
df3bb2
-
df3bb2
 Note that the URIs follow the syntax of
df3bb2
 L<RFC 3986|https://tools.ietf.org/html/rfc3986>: in particular, there
df3bb2
 are restrictions on the allowed characters for the various components
df3bb2
 of the URI.  Characters such as C<:>, C<@>, and C B<must> be
df3bb2
 percent-encoded:
df3bb2
 
df3bb2
- $ guestfish -a ssh://user:pass%40word@example.com/disk.img
df3bb2
+ $ guestfish -a rbd://user:pass%40word@example.com[:port]/pool/disk
df3bb2
 
df3bb2
 In this case, the password is C<pass@word>.
df3bb2
 
df3bb2
diff --git a/fish/test-add-uri.sh b/fish/test-add-uri.sh
df3bb2
index 756df997b..8f84fd31b 100755
df3bb2
--- a/fish/test-add-uri.sh
df3bb2
+++ b/fish/test-add-uri.sh
df3bb2
@@ -40,14 +40,6 @@ function fail ()
df3bb2
 $VG guestfish -x -a file://$abs_builddir/test-add-uri.img </dev/null >test-add-uri.out 2>&1
df3bb2
 grep -sq 'add_drive ".*/test-add-uri.img"' test-add-uri.out || fail
df3bb2
 
df3bb2
-# curl
df3bb2
-$VG guestfish -x -a ftp://user@example.com/disk.img </dev/null >test-add-uri.out 2>&1
df3bb2
-grep -sq 'add_drive "/disk.img" "protocol:ftp" "server:tcp:example.com" "username:user"' test-add-uri.out || fail
df3bb2
-
df3bb2
-# gluster
df3bb2
-$VG guestfish -x -a gluster://example.com/disk </dev/null >test-add-uri.out 2>&1
df3bb2
-grep -sq 'add_drive "disk" "protocol:gluster" "server:tcp:example.com"' test-add-uri.out || fail
df3bb2
-
df3bb2
 # NBD
df3bb2
 $VG guestfish -x -a nbd://example.com </dev/null >test-add-uri.out 2>&1
df3bb2
 grep -sq 'add_drive "" "protocol:nbd" "server:tcp:example.com"' test-add-uri.out || fail
df3bb2
@@ -67,29 +59,5 @@ grep -sq 'add_drive "pool/disk" "protocol:rbd" "server:tcp:example.com:6789"' te
df3bb2
 $VG guestfish -x -a rbd:///pool/disk </dev/null >test-add-uri.out 2>&1
df3bb2
 grep -sq 'add_drive "pool/disk" "protocol:rbd"' test-add-uri.out || fail
df3bb2
 
df3bb2
-# sheepdog
df3bb2
-$VG guestfish -x -a sheepdog:///volume/image </dev/null >test-add-uri.out 2>&1
df3bb2
-grep -sq 'add_drive "volume/image" "protocol:sheepdog"' test-add-uri.out || fail
df3bb2
-
df3bb2
-$VG guestfish -x -a sheepdog://example.com:3000/volume/image </dev/null >test-add-uri.out 2>&1
df3bb2
-grep -sq 'add_drive "volume/image" "protocol:sheepdog" "server:tcp:example.com:3000"' test-add-uri.out || fail
df3bb2
-
df3bb2
-# ssh
df3bb2
-$VG guestfish -x -a ssh://example.com/disk.img </dev/null >test-add-uri.out 2>&1
df3bb2
-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com"' test-add-uri.out || fail
df3bb2
-
df3bb2
-$VG guestfish -x -a ssh://user@example.com/disk.img </dev/null >test-add-uri.out 2>&1
df3bb2
-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com" "username:user"' test-add-uri.out || fail
df3bb2
-
df3bb2
-$VG guestfish -x -a ssh://user@example.com:2000/disk.img </dev/null >test-add-uri.out 2>&1
df3bb2
-grep -sq 'add_drive "/disk.img" "protocol:ssh" "server:tcp:example.com:2000" "username:user"' test-add-uri.out || fail
df3bb2
-
df3bb2
-# iSCSI
df3bb2
-$VG guestfish -x -a iscsi://example.com/iqn.2015-12.com.libguestfs:test1/0 </dev/null >test-add-uri.out 2>&1
df3bb2
-grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test1/0" "protocol:iscsi" "server:tcp:example.com"' test-add-uri.out || fail
df3bb2
-
df3bb2
-$VG guestfish -x -a iscsi://user:password@example.com/iqn.2015-12.com.libguestfs:test2/0 </dev/null >test-add-uri.out 2>&1
df3bb2
-grep -sq 'add_drive "iqn.2015-12.com.libguestfs:test2/0" "protocol:iscsi" "server:tcp:example.com" "username:user" "secret:password"' test-add-uri.out || fail
df3bb2
-
df3bb2
 rm test-add-uri.out
df3bb2
 rm test-add-uri.img
df3bb2
diff --git a/generator/actions_core.ml b/generator/actions_core.ml
3efd08
index f466600df..3893d0e8d 100644
df3bb2
--- a/generator/actions_core.ml
df3bb2
+++ b/generator/actions_core.ml
df3bb2
@@ -297,29 +297,6 @@ F<filename> is interpreted as a local file or device.
df3bb2
 This is the default if the optional protocol parameter
df3bb2
 is omitted.
df3bb2
 
df3bb2
-=item C<protocol = \"ftp\"|\"ftps\"|\"http\"|\"https\"|\"tftp\">
df3bb2
-
df3bb2
-Connect to a remote FTP, HTTP or TFTP server.
df3bb2
-The C<server> parameter must also be supplied - see below.
df3bb2
-
df3bb2
-See also: L<guestfs(3)/FTP, HTTP AND TFTP>
df3bb2
-
df3bb2
-=item C<protocol = \"gluster\">
df3bb2
-
df3bb2
-Connect to the GlusterFS server.
df3bb2
-The C<server> parameter must also be supplied - see below.
df3bb2
-
df3bb2
-See also: L<guestfs(3)/GLUSTER>
df3bb2
-
df3bb2
-=item C<protocol = \"iscsi\">
df3bb2
-
df3bb2
-Connect to the iSCSI server.
df3bb2
-The C<server> parameter must also be supplied - see below.
df3bb2
-The C<username> parameter may be supplied.  See below.
df3bb2
-The C<secret> parameter may be supplied.  See below.
df3bb2
-
df3bb2
-See also: L<guestfs(3)/ISCSI>.
df3bb2
-
df3bb2
 =item C<protocol = \"nbd\">
df3bb2
 
df3bb2
 Connect to the Network Block Device server.
df3bb2
@@ -336,22 +313,6 @@ The C<secret> parameter may be supplied.  See below.
df3bb2
 
df3bb2
 See also: L<guestfs(3)/CEPH>.
df3bb2
 
df3bb2
-=item C<protocol = \"sheepdog\">
df3bb2
-
df3bb2
-Connect to the Sheepdog server.
df3bb2
-The C<server> parameter may also be supplied - see below.
df3bb2
-
df3bb2
-See also: L<guestfs(3)/SHEEPDOG>.
df3bb2
-
df3bb2
-=item C<protocol = \"ssh\">
df3bb2
-
df3bb2
-Connect to the Secure Shell (ssh) server.
df3bb2
-
df3bb2
-The C<server> parameter must be supplied.
df3bb2
-The C<username> parameter may be supplied.  See below.
df3bb2
-
df3bb2
-See also: L<guestfs(3)/SSH>.
df3bb2
-
df3bb2
 =back
df3bb2
 
df3bb2
 =item C<server>
df3bb2
@@ -362,13 +323,8 @@ is a list of server(s).
df3bb2
  Protocol       Number of servers required
df3bb2
  --------       --------------------------
df3bb2
  file           List must be empty or param not used at all
df3bb2
- ftp|ftps|http|https|tftp  Exactly one
df3bb2
- gluster        Exactly one
df3bb2
- iscsi          Exactly one
df3bb2
  nbd            Exactly one
df3bb2
  rbd            Zero or more
df3bb2
- sheepdog       Zero or more
df3bb2
- ssh            Exactly one
df3bb2
 
df3bb2
 Each list element is a string specifying a server.  The string must be
df3bb2
 in one of the following formats:
df3bb2
@@ -384,10 +340,10 @@ for the protocol is used (see F</etc/services>).
df3bb2
 
df3bb2
 =item C<username>
df3bb2
 
df3bb2
-For the C<ftp>, C<ftps>, C<http>, C<https>, C<iscsi>, C<rbd>, C<ssh>
df3bb2
-and C<tftp> protocols, this specifies the remote username.
df3bb2
+For the C<rbd>
df3bb2
+protocol, this specifies the remote username.
df3bb2
 
df3bb2
-If not given, then the local username is used for C<ssh>, and no authentication
df3bb2
+If not given, then no authentication
df3bb2
 is attempted for ceph.  But note this sometimes may give unexpected results, for
df3bb2
 example if using the libvirt backend and if the libvirt backend is configured to
df3bb2
 start the qemu appliance as a special user such as C<qemu.qemu>.  If in doubt,
df3bb2
diff --git a/lib/drives.c b/lib/drives.c
df3bb2
index 82ef30093..3d712c6e4 100644
df3bb2
--- a/lib/drives.c
df3bb2
+++ b/lib/drives.c
df3bb2
@@ -165,6 +165,7 @@ create_drive_non_file (guestfs_h *g,
df3bb2
   return drv;
df3bb2
 }
df3bb2
 
df3bb2
+#if 0 /* DISABLED IN RHEL 8 */
df3bb2
 static struct drive *
df3bb2
 create_drive_curl (guestfs_h *g,
df3bb2
                    const struct drive_create_data *data)
df3bb2
@@ -223,6 +224,7 @@ create_drive_gluster (guestfs_h *g,
df3bb2
 
df3bb2
   return create_drive_non_file (g, data);
df3bb2
 }
df3bb2
+#endif /* DISABLED IN RHEL 8 */
df3bb2
 
df3bb2
 static int
df3bb2
 nbd_port (void)
df3bb2
@@ -291,6 +293,7 @@ create_drive_rbd (guestfs_h *g,
df3bb2
   return create_drive_non_file (g, data);
df3bb2
 }
df3bb2
 
df3bb2
+#if 0 /* DISABLED IN RHEL 8 */
df3bb2
 static struct drive *
df3bb2
 create_drive_sheepdog (guestfs_h *g,
df3bb2
                        const struct drive_create_data *data)
df3bb2
@@ -391,6 +394,7 @@ create_drive_iscsi (guestfs_h *g,
df3bb2
 
df3bb2
   return create_drive_non_file (g, data);
df3bb2
 }
df3bb2
+#endif /* DISABLED IN RHEL 8 */
df3bb2
 
df3bb2
 /**
df3bb2
  * Create the special F</dev/null> drive.
df3bb2
@@ -826,6 +830,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
df3bb2
       drv = create_drive_file (g, &data);
df3bb2
     }
df3bb2
   }
df3bb2
+#if 0 /* DISABLED IN RHEL 8 */
df3bb2
   else if (STREQ (protocol, "ftp")) {
df3bb2
     data.protocol = drive_protocol_ftp;
df3bb2
     drv = create_drive_curl (g, &data);
df3bb2
@@ -850,6 +855,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
df3bb2
     data.protocol = drive_protocol_iscsi;
df3bb2
     drv = create_drive_iscsi (g, &data);
df3bb2
   }
df3bb2
+#endif /* DISABLED IN RHEL 8 */
df3bb2
   else if (STREQ (protocol, "nbd")) {
df3bb2
     data.protocol = drive_protocol_nbd;
df3bb2
     drv = create_drive_nbd (g, &data);
df3bb2
@@ -858,6 +864,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
df3bb2
     data.protocol = drive_protocol_rbd;
df3bb2
     drv = create_drive_rbd (g, &data);
df3bb2
   }
df3bb2
+#if 0 /* DISABLED IN RHEL 8 */
df3bb2
   else if (STREQ (protocol, "sheepdog")) {
df3bb2
     data.protocol = drive_protocol_sheepdog;
df3bb2
     drv = create_drive_sheepdog (g, &data);
df3bb2
@@ -870,6 +877,7 @@ guestfs_impl_add_drive_opts (guestfs_h *g, const char *filename,
df3bb2
     data.protocol = drive_protocol_tftp;
df3bb2
     drv = create_drive_curl (g, &data);
df3bb2
   }
df3bb2
+#endif /* DISABLED IN RHEL 8 */
df3bb2
   else {
df3bb2
     error (g, _("unknown protocol ‘%s’"), protocol);
df3bb2
     drv = NULL; /*FALLTHROUGH*/
df3bb2
diff --git a/lib/guestfs.pod b/lib/guestfs.pod
3efd08
index af944ddb7..58559a6b4 100644
df3bb2
--- a/lib/guestfs.pod
df3bb2
+++ b/lib/guestfs.pod
df3bb2
@@ -714,70 +714,6 @@ servers.  The server string is documented in
df3bb2
 L</guestfs_add_drive_opts>. The C<username> and C<secret> parameters are
df3bb2
 also optional, and if not given, then no authentication will be used.
df3bb2
 
df3bb2
-=head3 FTP, HTTP AND TFTP
df3bb2
-
df3bb2
-Libguestfs can access remote disks over FTP, FTPS, HTTP, HTTPS
df3bb2
-or TFTP protocols.
df3bb2
-
df3bb2
-To do this, set the optional C<protocol> and C<server> parameters of
df3bb2
-L</guestfs_add_drive_opts> like this:
df3bb2
-
df3bb2
- char **servers = { "www.example.org", NULL };
df3bb2
- guestfs_add_drive_opts (g, "/disk.img",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "http",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, servers,
df3bb2
-                         -1);
df3bb2
-
df3bb2
-The C<protocol> can be one of C<"ftp">, C<"ftps">, C<"http">,
df3bb2
-C<"https"> or C<"tftp">.
df3bb2
-
df3bb2
-C<servers> (the C<server> parameter) is a list which must have a
df3bb2
-single element.  The single element is a string defining the web,
df3bb2
-FTP or TFTP server.  The format of this string is documented in
df3bb2
-L</guestfs_add_drive_opts>.
df3bb2
-
df3bb2
-=head3 GLUSTER
df3bb2
-
df3bb2
-Libguestfs can access Gluster disks.
df3bb2
-
df3bb2
-To do this, set the optional C<protocol> and C<server> parameters of
df3bb2
-L</guestfs_add_drive_opts> like this:
df3bb2
-
df3bb2
- char **servers = { "gluster.example.org:24007", NULL };
df3bb2
- guestfs_add_drive_opts (g, "volname/image",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "gluster",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, servers,
df3bb2
-                         -1);
df3bb2
-
df3bb2
-C<servers> (the C<server> parameter) is a list which must have a
df3bb2
-single element.  The single element is a string defining the Gluster
df3bb2
-server.  The format of this string is documented in
df3bb2
-L</guestfs_add_drive_opts>.
df3bb2
-
df3bb2
-Note that gluster usually requires the client process (ie. libguestfs)
df3bb2
-to run as B<root> and will give unfathomable errors if it is not
df3bb2
-(eg. "No data available").
df3bb2
-
df3bb2
-=head3 ISCSI
df3bb2
-
df3bb2
-Libguestfs can access iSCSI disks remotely.
df3bb2
-
df3bb2
-To do this, set the optional C<protocol> and C<server> parameters like
df3bb2
-this:
df3bb2
-
df3bb2
- char **server = { "iscsi.example.org:3000", NULL };
df3bb2
- guestfs_add_drive_opts (g, "target-iqn-name/lun",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "iscsi",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, server,
df3bb2
-                         -1);
df3bb2
-
df3bb2
-The C<server> parameter is a list which must have a single element.
df3bb2
-The single element is a string defining the iSCSI server.  The format
df3bb2
-of this string is documented in L</guestfs_add_drive_opts>.
df3bb2
-
df3bb2
 =head3 NETWORK BLOCK DEVICE
df3bb2
 
df3bb2
 Libguestfs can access Network Block Device (NBD) disks remotely.
df3bb2
@@ -840,42 +776,6 @@ L<https://bugs.launchpad.net/qemu/+bug/1155677>
df3bb2
 
df3bb2
 =back
df3bb2
 
df3bb2
-=head3 SHEEPDOG
df3bb2
-
df3bb2
-Libguestfs can access Sheepdog disks.
df3bb2
-
df3bb2
-To do this, set the optional C<protocol> and C<server> parameters of
df3bb2
-L</guestfs_add_drive_opts> like this:
df3bb2
-
df3bb2
- char **servers = { /* optional servers ... */ NULL };
df3bb2
- guestfs_add_drive_opts (g, "volume",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "sheepdog",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, servers,
df3bb2
-                         -1);
df3bb2
-
df3bb2
-The optional list of C<servers> may be zero or more server addresses
df3bb2
-(C<"hostname:port">).  The format of the server strings is documented
df3bb2
-in L</guestfs_add_drive_opts>.
df3bb2
-
df3bb2
-=head3 SSH
df3bb2
-
df3bb2
-Libguestfs can access disks over a Secure Shell (SSH) connection.
df3bb2
-
df3bb2
-To do this, set the C<protocol> and C<server> and (optionally)
df3bb2
-C<username> parameters of L</guestfs_add_drive_opts> like this:
df3bb2
-
df3bb2
- char **server = { "remote.example.com", NULL };
df3bb2
- guestfs_add_drive_opts (g, "/path/to/disk.img",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_FORMAT, "raw",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_PROTOCOL, "ssh",
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_SERVER, server,
df3bb2
-                         GUESTFS_ADD_DRIVE_OPTS_USERNAME, "remoteuser",
df3bb2
-                         -1);
df3bb2
-
df3bb2
-The format of the server string is documented in
df3bb2
-L</guestfs_add_drive_opts>.
df3bb2
-
df3bb2
 =head2 INSPECTION
df3bb2
 
df3bb2
 Libguestfs has APIs for inspecting an unknown disk image to find out
df3bb2
diff --git a/tests/disks/test-qemu-drive-libvirt.sh b/tests/disks/test-qemu-drive-libvirt.sh
3efd08
index e49c69b43..9b1abc4ec 100755
df3bb2
--- a/tests/disks/test-qemu-drive-libvirt.sh
df3bb2
+++ b/tests/disks/test-qemu-drive-libvirt.sh
df3bb2
@@ -64,34 +64,6 @@ check_output
df3bb2
 grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail ceph2
df3bb2
 rm "$DEBUG_QEMU_FILE"
df3bb2
 
df3bb2
-# Gluster.
df3bb2
-
df3bb2
-$guestfish -d gluster run ||:
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=gluster://1.2.3.4:1234/volname/image,' "$DEBUG_QEMU_FILE" || fail gluster
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
-# iSCSI.
df3bb2
-
df3bb2
-$guestfish -d iscsi run ||:
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=iscsi://1.2.3.4:1234/iqn.2003-01.org.linux-iscsi.fedora' "$DEBUG_QEMU_FILE" || fail iscsi
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
-# NBD.
df3bb2
-
df3bb2
-$guestfish -d nbd run ||:
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=nbd:1.2.3.4:1234,' "$DEBUG_QEMU_FILE" || fail nbd
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
-# Sheepdog.
df3bb2
-
df3bb2
-$guestfish -d sheepdog run ||:
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=sheepdog:volume,' "$DEBUG_QEMU_FILE" || fail sheepdog
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
 # Local, stored in a pool.
df3bb2
 
df3bb2
 $guestfish -d pool1 run ||:
df3bb2
diff --git a/tests/disks/test-qemu-drive.sh b/tests/disks/test-qemu-drive.sh
df3bb2
index 19dd60a2f..583e031bd 100755
df3bb2
--- a/tests/disks/test-qemu-drive.sh
df3bb2
+++ b/tests/disks/test-qemu-drive.sh
df3bb2
@@ -62,45 +62,6 @@ check_output
df3bb2
 grep -sq -- '-drive file=rbd:abc-def/ghi-jkl:auth_supported=none,' "$DEBUG_QEMU_FILE" || fail
df3bb2
 rm "$DEBUG_QEMU_FILE"
df3bb2
 
df3bb2
-# HTTP.
df3bb2
-
df3bb2
-guestfish <
df3bb2
-  add "/disk.img" "format:raw" "protocol:http" "server:www.example.com"
df3bb2
-  run
df3bb2
-EOF
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=http://www.example.com/disk.img,' "$DEBUG_QEMU_FILE" || fail
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
-# Gluster.
df3bb2
-
df3bb2
-guestfish <
df3bb2
-  add "volname/image" "format:raw" "protocol:gluster" "server:www.example.com:24007"
df3bb2
-  run
df3bb2
-EOF
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=gluster://www.example.com:24007/volname/image,' "$DEBUG_QEMU_FILE" || fail
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
-# iSCSI.
df3bb2
-
df3bb2
-guestfish <
df3bb2
-  add "target-iqn-name/lun" "format:raw" "protocol:iscsi" "server:www.example.com:3000"
df3bb2
-  run
df3bb2
-EOF
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=iscsi://www.example.com:3000/target-iqn-name/lun,' "$DEBUG_QEMU_FILE" || fail
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
-guestfish <
df3bb2
-  add "target-iqn-name/lun" "format:raw" "protocol:iscsi" "server:www.example.com:3000" \
df3bb2
-    "username:user" "secret:pass"
df3bb2
-  run
df3bb2
-EOF
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=iscsi://user%pass@www.example.com:3000/target-iqn-name/lun,' "$DEBUG_QEMU_FILE" || fail
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
 # NBD.
df3bb2
 
df3bb2
 guestfish <
df3bb2
@@ -118,24 +79,3 @@ EOF
df3bb2
 check_output
df3bb2
 grep -sq -- '-drive file=nbd:unix:/socket,' "$DEBUG_QEMU_FILE" || fail
df3bb2
 rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
-# Sheepdog.
df3bb2
-
df3bb2
-guestfish <
df3bb2
-  add "volume" "format:raw" "protocol:sheepdog"
df3bb2
-  run
df3bb2
-EOF
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=sheepdog:volume,' "$DEBUG_QEMU_FILE" || fail
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-
df3bb2
-# SSH.
df3bb2
-
df3bb2
-guestfish <
df3bb2
-  add "/disk.img" "format:raw" "protocol:ssh" "server:example.com" \
df3bb2
-    "username:rich"
df3bb2
-  run
df3bb2
-EOF
df3bb2
-check_output
df3bb2
-grep -sq -- '-drive file=ssh://rich@example.com/disk.img,' "$DEBUG_QEMU_FILE" || fail
df3bb2
-rm "$DEBUG_QEMU_FILE"
df3bb2
-- 
3efd08
2.25.4
df3bb2