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

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