qemu-e2k/qapi
Florian Florensa 19ae9ae014 block/rbd: Add support for ceph namespaces
Starting from ceph Nautilus, RBD has support for namespaces, allowing
for finer grain ACLs on images inside a pool, and tenant isolation.

In the rbd cli tool documentation, the new image-spec and snap-spec are :
 - [pool-name/[namespace-name/]]image-name
 - [pool-name/[namespace-name/]]image-name@snap-name

When using an non namespace's enabled qemu, it complains about not
finding the image called namespace-name/image-name, thus we only need to
parse the image once again to find if there is a '/' in its name, and if
there is, use what is before it as the name of the namespace to later
pass it to rados_ioctx_set_namespace.
rados_ioctx_set_namespace if called with en empty string or a null
pointer as the namespace parameters pretty much does nothing, as it then
defaults to the default namespace.

The namespace is extracted inside qemu_rbd_parse_filename, stored in the
qdict, and used in qemu_rbd_connect to make it work with both qemu-img,
and qemu itself.

Signed-off-by: Florian Florensa <fflorensa@online.net>
Message-Id: <20200110111513.321728-2-fflorensa@online.net>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2020-03-06 17:21:28 +01:00
..
Makefile.objs qemu-storage-daemon: Add --monitor option 2020-03-06 17:21:28 +01:00
audio.json audio: proper support for float samples in mixeng 2020-02-06 14:35:57 +01:00
authz.json authz: add QAuthZList object type for an access control list 2019-02-26 15:32:18 +00:00
block-core.json block/rbd: Add support for ceph namespaces 2020-03-06 17:21:28 +01:00
block.json block: Move sysemu QMP commands to QAPI block module 2020-03-06 17:15:38 +01:00
char.json qapi: Add blank lines before bulleted lists 2020-02-15 11:41:50 +01:00
common.json qapi: Move query-target from misc.json to machine.json 2019-08-21 13:24:01 +02:00
control.json monitor: Add allow_hmp parameter to monitor_init() 2020-03-06 17:21:28 +01:00
crypto.json crypto: Fix defaults in QCryptoBlockCreateOptionsLUKS 2018-12-12 11:16:49 +00:00
dump.json qapi: Fix indent level on doc comments in json files 2020-02-15 11:41:50 +01:00
error.json qapi: Split error.json off common.json 2019-08-16 13:31:51 +02:00
introspect.json qapi: Fix indent level on doc comments in json files 2020-02-15 11:41:50 +01:00
job.json qapi: Fix indent level on doc comments in json files 2020-02-15 11:41:50 +01:00
machine-target.json qapi: Fix indent level on doc comments in json files 2020-02-15 11:41:50 +01:00
machine.json qapi: Delete all the "foo: dropped in n.n" notes 2020-02-15 11:41:50 +01:00
migration.json multifd: Add zstd compression multifd support 2020-02-28 09:25:49 +01:00
misc-target.json qapi: Fix indent level on doc comments in json files 2020-02-15 11:41:50 +01:00
misc.json qapi: Split control.json off misc.json 2020-02-17 13:53:47 +01:00
net.json qapi: Delete all the "foo: dropped in n.n" notes 2020-02-15 11:41:50 +01:00
opts-visitor.c make check-unit: use after free in test-opts-visitor 2019-09-24 11:03:44 +02:00
pragma.json qapi: Create 'pragma' module 2020-03-06 17:21:28 +01:00
qapi-clone-visitor.c qapi/qnull: Add own header 2017-11-17 18:21:30 +01:00
qapi-dealloc-visitor.c Include qemu/queue.h slightly less 2019-08-16 13:31:52 +02:00
qapi-schema.json qapi: Create 'pragma' module 2020-03-06 17:21:28 +01:00
qapi-util.c qemu-common: Move qemu_isalnum() etc. to qemu/ctype.h 2019-06-11 20:22:09 +02:00
qapi-visit-core.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qdev.json qapi: Fix indent level on doc comments in json files 2020-02-15 11:41:50 +01:00
qmp-dispatch.c qmp-dispatch: Use CommandNotFound error for disabled commands 2019-09-28 16:51:30 +02:00
qmp-event.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qmp-registry.c qapi: remove qmp_unregister_command() 2019-02-18 14:44:05 +01:00
qobject-input-visitor.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qobject-output-visitor.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
qom.json qapi: Flatten object-add 2020-03-06 17:21:27 +01:00
rdma.json qapi: Define new QMP message for pvrdma 2018-12-22 11:09:56 +02:00
rocker.json qapi: Fix indent level on doc comments in json files 2020-02-15 11:41:50 +01:00
run-state.json qapi: Fix indent level on doc comments in json files 2020-02-15 11:41:50 +01:00
sockets.json qapi: Fix indent level on doc comments in json files 2020-02-15 11:41:50 +01:00
string-input-visitor.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
string-output-visitor.c cutils: Move size_to_str() from "qemu-common.h" to "qemu/cutils.h" 2019-09-19 11:57:34 +02:00
tpm.json qapi: Use explicit bulleted lists 2020-02-15 11:41:50 +01:00
trace-events trace-events: Shorten file names in comments 2019-03-22 16:18:07 +00:00
trace.json qapi: Add blank lines before bulleted lists 2020-02-15 11:41:50 +01:00
transaction.json qemu-storage-daemon: Add --monitor option 2020-03-06 17:21:28 +01:00
ui.json qapi: Delete all the "foo: dropped in n.n" notes 2020-02-15 11:41:50 +01:00