-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathceph
More file actions
73 lines (69 loc) · 2.5 KB
/
Copy pathceph
File metadata and controls
73 lines (69 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
# Ceph - scalable distributed file system
#
# Copyright (C) 2011 Wido den Hollander <[email protected]>
#
# This is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1, as published by the Free Software
# Foundation. See file COPYING.
#
_ceph()
{
local cur prev
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
prevprev="${COMP_WORDS[COMP_CWORD-2]}"
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "--conf -c --name --id -m --version -s --status -w --watch -o --out-file -i --in-file" -- ${cur}) )
return 0
fi
case "${prev}" in
-o | --out-file | -i | --in-file | --conf | -c)
COMPREPLY=( $(compgen -f ${cur}) )
return 0
;;
-m)
COMPREPLY=( $(compgen -A hostname ${cur}) )
return 0
;;
auth)
COMPREPLY=( $(compgen -W "list add del print_key print-key export get get-key import get-or-create get-or-create-key" -- ${cur}) )
return 0
;;
pg)
COMPREPLY=( $(compgen -W "stat dump dump_json dump_stuck force_create_pg getmap map send_pg_creates scrub deep-scrub repair" -- ${cur}) )
return 0
;;
osd)
COMPREPLY=( $(compgen -W "stat pool dump getmaxosd tree getmap getcrushmap lspools reweight-by-utilization trash tier" -- ${cur}) )
return 0
;;
mon)
COMPREPLY=( $(compgen -W "stat getmap add remove dump" -- ${cur}) )
return 0
;;
mds)
COMPREPLY=( $(compgen -W "stat stat getmap dump compat" -- ${cur}) )
return 0
;;
pool)
COMPREPLY=( $(compgen -W "create delete rename stats set set-quota get rmsnap mksnap" -- ${cur}) )
return 0
;;
health)
COMPREPLY=( $(compgen -W "detail" -- ${cur}) )
return 0
;;
tier)
COMPREPLY=( $(compgen -W "remove cache-mode" -- ${cur}) )
return 0
;;
ceph)
COMPREPLY=( $(compgen -W "osd mon mds pg auth health df" -- ${cur}) )
return 0
;;
esac
}
complete -F _ceph ceph