[Libguestfs] [PATCH 1/2] v2v: -o rhv-upload: Always fetch server options when opening the connection.
Richard W.M. Jones
rjones at redhat.com
Thu Jun 21 12:50:01 UTC 2018
On Thu, Jun 21, 2018 at 01:35:25PM +0100, Richard W.M. Jones wrote:
> + j = json.loads(r.read())
> + can_flush = "flush" in j['features']
> + can_trim = "trim" in j['features']
> + can_zero = "zero" in j['features']
> +
> + # Old imageio servers returned either 405 Method Not Allowed or
> + # 204 No Content (with an empty body). If we see that we leave
> + # all the features as False and they will be emulated.
> + elif r.status == 405 or r.status == 204:
> + pass
> +
> + else:
> + raise RuntimeError("could not use OPTIONS request: %d: %s" %
> + (r.status, r.reason))
> +
> + debug("imageio features: flush=%r trim=%r zero=%r unix_socket=%r" %
> + (can_flush, can_trim, can_zero, unix_socket))
unix_socket in this debug message leaked in from the second patch.
I'll fix this in the next version.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch
http://libguestfs.org/virt-builder.1.html
More information about the Libguestfs
mailing list