]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: s/rep/replicated/ in pool create prototype 983/head
authorLoic Dachary <loic@dachary.org>
Sun, 22 Dec 2013 17:26:42 +0000 (18:26 +0100)
committerLoic Dachary <loic@dachary.org>
Sun, 22 Dec 2013 18:37:27 +0000 (19:37 +0100)
The test is updated to remove unecessary asserts. Since all combinations
of properties and pool type are allowed, there is no way to statically
check the validity of the arguments.

Signed-off-by: Loic Dachary <loic@dachary.org>
src/mon/MonCommands.h
src/test/pybind/test_ceph_argparse.py

index 79505f256c32da7e2378f352f702ac8695c5ff38..8c08030f214811fdb29da26d247ed34cc25d7a99 100644 (file)
@@ -496,7 +496,7 @@ COMMAND("osd pool create " \
        "name=pool,type=CephPoolname " \
        "name=pg_num,type=CephInt,range=0 " \
        "name=pgp_num,type=CephInt,range=0,req=false " \
-        "name=pool_type,type=CephChoices,strings=rep|erasure,req=false " \
+        "name=pool_type,type=CephChoices,strings=replicated|erasure,req=false " \
        "name=properties,type=CephString,n=N,req=false,goodchars=[A-Za-z0-9-_.=]", \
        "create pool", "osd", "rw", "cli,rest")
 COMMAND("osd pool delete " \
index fdfd726d4000128287d66e141796f208dead3d56..fbd0b431419a42d92430571a60572c0c7d7f1007 100755 (executable)
@@ -886,30 +886,7 @@ class TestOSD(TestArgparse):
                                    'poolname', '128', '128'])
         self.assert_valid_command(['osd', 'pool', 'create',
                                    'poolname', '128', '128',
-                                   'foo=bar'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128', '128',
-                                   'foo=bar', 'baz=frob'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128',
-                                   'foo=bar', 'baz=frob'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128', '128',
-                                   'rep'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128', '128',
-                                   'raid4'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128', '128',
-                                   'erasure'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128', '128',
-                                   'rep',
-                                   'foo=bar'])
-        self.assert_valid_command(['osd', 'pool', 'create',
-                                   'poolname', '128', '128',
-                                   'rep',
-                                   'foo=bar', 'bar=baz'])
+                                   'whatever'])
         assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create']))
         assert_equal({}, validate_command(sigdict, ['osd', 'pool', 'create',
                                                     'poolname']))