plugins: Wire up python plugin support for NBD_INFO_INIT_STATE
commitb36fbe533ac308e984e935e0aafbac59c0b367a2
authorEric Blake <eblake@redhat.com>
Mon, 3 Feb 2020 22:36:37 +0000 (3 16:36 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 10 Feb 2020 19:57:29 +0000 (10 13:57 -0600)
tree6e77e0e2f6fe468a27d5eb1fc15f268954cd57f8
parent00a3e83bfaae62d6943cd44d26d00f43d95f5ca1
plugins: Wire up python plugin support for NBD_INFO_INIT_STATE

The NBD protocol is adding an extension to let servers advertise
initialization state to the client: whether the image contains holes,
and whether it is known to read as all zeroes.  For python, the
hardest part was figuring out how to conditionally test things
depending on new-enough libnbd (and that wasn't hard).

Note that the python bindings do not yet support extents, so this is
one case where the new protocol addition is definitely useful when
dealing with an initially-empty destination.

Signed-off-by: Eric Blake <eblake@redhat.com>
plugins/python/nbdkit-python-plugin.pod
plugins/python/python.c
tests/test-python-plugin.py
tests/test_python.py