X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Ftest%2Fcli%2Fosdmaptool%2Ftree.t;fp=src%2Fceph%2Fsrc%2Ftest%2Fcli%2Fosdmaptool%2Ftree.t;h=b0f06d7f6c2e5e873d6fcc304149df692b1bd938;hb=812ff6ca9fcd3e629e49d4328905f33eee8ca3f5;hp=0000000000000000000000000000000000000000;hpb=15280273faafb77777eab341909a3f495cf248d9;p=stor4nfv.git diff --git a/src/ceph/src/test/cli/osdmaptool/tree.t b/src/ceph/src/test/cli/osdmaptool/tree.t new file mode 100644 index 0000000..b0f06d7 --- /dev/null +++ b/src/ceph/src/test/cli/osdmaptool/tree.t @@ -0,0 +1,95 @@ + $ osdmaptool --createsimple 3 om --with-default-pool + osdmaptool: osdmap file 'om' + osdmaptool: writing epoch 1 to om + + $ osdmaptool --tree=plain om + osdmaptool: osdmap file 'om' + ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF + -1 3.00000 root default + -3 3.00000 rack localrack + -2 3.00000 host localhost + 0 1.00000 osd.0 DNE 0 + 1 1.00000 osd.1 DNE 0 + 2 1.00000 osd.2 DNE 0 + + $ osdmaptool --tree=json-pretty om + osdmaptool: osdmap file 'om' + { + "nodes": [ + { + "id": -1, + "name": "default", + "type": "root", + "type_id": 10, + "children": [ + -3 + ] + }, + { + "id": -3, + "name": "localrack", + "type": "rack", + "type_id": 3, + "pool_weights": {}, + "children": [ + -2 + ] + }, + { + "id": -2, + "name": "localhost", + "type": "host", + "type_id": 1, + "pool_weights": {}, + "children": [ + 2, + 1, + 0 + ] + }, + { + "id": 0, + "name": "osd.0", + "type": "osd", + "type_id": 0, + "crush_weight": 1.000000, + "depth": 3, + "pool_weights": {}, + "exists": 0, + "status": "down", + "reweight": 0.000000, + "primary_affinity": 1.000000 + }, + { + "id": 1, + "name": "osd.1", + "type": "osd", + "type_id": 0, + "crush_weight": 1.000000, + "depth": 3, + "pool_weights": {}, + "exists": 0, + "status": "down", + "reweight": 0.000000, + "primary_affinity": 1.000000 + }, + { + "id": 2, + "name": "osd.2", + "type": "osd", + "type_id": 0, + "crush_weight": 1.000000, + "depth": 3, + "pool_weights": {}, + "exists": 0, + "status": "down", + "reweight": 0.000000, + "primary_affinity": 1.000000 + } + ], + "stray": [] + } + + + $ rm -f om +