]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-disk: implement list --format json
authorLoic Dachary <ldachary@redhat.com>
Thu, 27 Aug 2015 11:14:13 +0000 (13:14 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sat, 29 Aug 2015 00:37:52 +0000 (02:37 +0200)
commit796a1403dc23d84f7c5477c862ca265b5d6a6802
treea90f565d4e38dd1202087bfc81c4566a79cb71b0
parent5fd9486c76bde3d1ce8c5d28bfc68089527982c1
ceph-disk: implement list --format json

The ceph-disk list command is reworked in two parts:

 1) the list_devices function that build an internal structure with all
    the information regarding disks and partitions.
 2) a function to display the internal structure in plain text or json

The ceph-disk list show the plain text version and is backward
compatible.

The ceph-disk list --format json output has more information about each
device than the plain text version and is intended for scripts.

The unit tests cover all modified lines (2610 to 2849).

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/ceph-disk
src/test/python/ceph-disk/tests/test_ceph_disk.py
src/test/python/ceph-disk/tox.ini