mirror of
https://github.com/ceph/ceph
synced 2024-12-19 09:57:05 +00:00
mon: 'fs set-default' not 'fs set_default'
The convention is to use - for command names and _ for variable names. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
b1811e3d55
commit
52bd5bbb36
@ -1758,7 +1758,8 @@ int MDSMonitor::management_command(
|
||||
// Persist the new FSMap
|
||||
pending_fsmap.filesystems[new_fs->fscid] = new_fs;
|
||||
return 0;
|
||||
} else if (prefix == "fs set_default") {
|
||||
} else if (prefix == "fs set_default" ||
|
||||
prefix == "fs set-default") {
|
||||
string fs_name;
|
||||
cmd_getval(g_ceph_context, cmdmap, "fs_name", fs_name);
|
||||
auto fs = pending_fsmap.get_filesystem(fs_name);
|
||||
|
@ -413,7 +413,11 @@ COMMAND("fs add_data_pool name=fs_name,type=CephString " \
|
||||
COMMAND("fs rm_data_pool name=fs_name,type=CephString " \
|
||||
"name=pool,type=CephString", \
|
||||
"remove data pool <pool>", "mds", "rw", "cli,rest")
|
||||
COMMAND("fs set_default name=fs_name,type=CephString", \
|
||||
COMMAND_WITH_FLAG("fs set_default name=fs_name,type=CephString", \
|
||||
"set the default to the named filesystem", \
|
||||
"fs", "rw", "cli,rest", \
|
||||
FLAG(DEPRECATED))
|
||||
COMMAND("fs set-default name=fs_name,type=CephString", \
|
||||
"set the default to the named filesystem", \
|
||||
"fs", "rw", "cli,rest")
|
||||
|
||||
|
@ -505,9 +505,9 @@ class TestFS(TestArgparse):
|
||||
assert_equal({}, validate_command(sigdict, ['fs', 'ls', 'toomany']))
|
||||
|
||||
def test_fs_set_default(self):
|
||||
self.assert_valid_command(['fs', 'set_default', 'cephfs'])
|
||||
assert_equal({}, validate_command(sigdict, ['fs', 'set_default']))
|
||||
assert_equal({}, validate_command(sigdict, ['fs', 'set_default', 'cephfs', 'toomany']))
|
||||
self.assert_valid_command(['fs', 'set-default', 'cephfs'])
|
||||
assert_equal({}, validate_command(sigdict, ['fs', 'set-default']))
|
||||
assert_equal({}, validate_command(sigdict, ['fs', 'set-default', 'cephfs', 'toomany']))
|
||||
|
||||
class TestMon(TestArgparse):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user