cephtool/test: both osd.n and n should work as osd args

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2016-04-30 19:11:07 +08:00
parent 5ad9d6a0ff
commit 100231d611

View File

@ -1102,7 +1102,12 @@ function test_mon_osd()
ceph osd thrash 0
ceph osd dump | grep 'osd.0 up'
# ceph osd find expects the OsdName, so both ints and osd.n should work.
ceph osd find 1
ceph osd find osd.1
expect_false osd find osd.xyz
expect_false osd find xyz
expect_false osd find 0.1
ceph --format plain osd find 1 # falls back to json-pretty
ceph osd metadata 1 | grep 'distro'
ceph --format plain osd metadata 1 | grep 'distro' # falls back to json-pretty
@ -1376,7 +1381,7 @@ function test_mon_pg()
ceph osd reweight 0 0.9
expect_false ceph osd reweight 0 -1
ceph osd reweight 0 1
ceph osd reweight osd.0 1
ceph osd primary-affinity osd.0 .9
expect_false ceph osd primary-affinity osd.0 -2
@ -1384,7 +1389,7 @@ function test_mon_pg()
ceph osd primary-affinity osd.0 1
ceph osd pg-temp 0.0 0 1 2
ceph osd pg-temp 0.0 1 0 2
ceph osd pg-temp 0.0 osd.1 osd.0 osd.2
expect_false ceph osd pg-temp asdf qwer
expect_false ceph osd pg-temp 0.0 asdf
expect_false ceph osd pg-temp 0.0