mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
rbd: adjusted "showmapped" JSON and XML formatted output
Signed-off-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
parent
443a7f5f7c
commit
de97a3be48
@ -29,6 +29,8 @@
|
||||
|
||||
* The rbd CLI's "lock list" JSON and XML output has changed.
|
||||
|
||||
* The rbd CLI's "showmapped" JSON and XML output has changed.
|
||||
|
||||
* The sample ``crush-location-hook`` script has been removed. Its output is
|
||||
equivalent to the built-in default behavior, so it has been replaced with an
|
||||
example in the CRUSH documentation.
|
||||
|
@ -218,7 +218,7 @@ def run_fio(remote, config, rbd_test_dir):
|
||||
mapped_images = json.loads(out.getvalue())
|
||||
if mapped_images:
|
||||
log.info("Unmapping rbd images on {sn}".format(sn=sn))
|
||||
for image in mapped_images.itervalues():
|
||||
for image in mapped_images:
|
||||
remote.run(args=['sudo', 'rbd', 'unmap', str(image['device'])])
|
||||
log.info("Cleaning up fio install")
|
||||
remote.run(args=['rm','-rf', run.Raw(rbd_test_dir)])
|
||||
|
@ -639,7 +639,8 @@ static bool dump_one_image(Formatter *f, TextTable *tbl,
|
||||
return false;
|
||||
|
||||
if (f) {
|
||||
f->open_object_section(id);
|
||||
f->open_object_section("device");
|
||||
f->dump_string("id", id);
|
||||
f->dump_string("pool", pool);
|
||||
f->dump_string("name", image);
|
||||
f->dump_string("snap", snap);
|
||||
@ -693,7 +694,7 @@ int dump_images(struct krbd_ctx *ctx, Formatter *f)
|
||||
int r;
|
||||
|
||||
if (f) {
|
||||
f->open_object_section("devices");
|
||||
f->open_array_section("devices");
|
||||
} else {
|
||||
tbl.define_column("id", TextTable::LEFT, TextTable::LEFT);
|
||||
tbl.define_column("pool", TextTable::LEFT, TextTable::LEFT);
|
||||
|
Loading…
Reference in New Issue
Block a user