1262 lines
43 KiB
Bash
1262 lines
43 KiB
Bash
#compdef kanidmd
|
|
|
|
autoload -U is-at-least
|
|
|
|
_kanidmd() {
|
|
typeset -A opt_args
|
|
typeset -a _arguments_options
|
|
local ret=1
|
|
|
|
if is-at-least 5.2; then
|
|
_arguments_options=(-s -S -C)
|
|
else
|
|
_arguments_options=(-s -C)
|
|
fi
|
|
|
|
local context curcontext="$curcontext" state line
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
":: :_kanidmd_commands" \
|
|
"*::: :->kanidmd" \
|
|
&& ret=0
|
|
case $state in
|
|
(kanidmd)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-command-$line[1]:"
|
|
case $line[1] in
|
|
(server)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(configtest)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(cert-generate)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(recover-account)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
':name -- The account name to recover credentials for:_default' \
|
|
&& ret=0
|
|
;;
|
|
(disable-account)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
':name -- The account name to disable:_default' \
|
|
&& ret=0
|
|
;;
|
|
(show-replication-certificate)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(renew-replication-certificate)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(refresh-replication-consumer)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--i-want-to-refresh-this-servers-database[Acknowledge that this database content will be refreshed from a supplier]' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(db-scan)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
":: :_kanidmd__db-scan_commands" \
|
|
"*::: :->db-scan" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(db-scan)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-db-scan-command-$line[1]:"
|
|
case $line[1] in
|
|
(list-all-indexes)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(list-index)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
':index_name -- The name of the index to list:_default' \
|
|
&& ret=0
|
|
;;
|
|
(list-id2entry)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(get-id2entry)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
':id -- The id of the entry to display:_default' \
|
|
&& ret=0
|
|
;;
|
|
(list-index-analysis)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(quarantine-id2entry)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
':id -- The id of the entry to display:_default' \
|
|
&& ret=0
|
|
;;
|
|
(list-quarantined)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(restore-quarantined)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
':id -- The id of the entry to display:_default' \
|
|
&& ret=0
|
|
;;
|
|
(help)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
":: :_kanidmd__db-scan__help_commands" \
|
|
"*::: :->help" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(help)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-db-scan-help-command-$line[1]:"
|
|
case $line[1] in
|
|
(list-all-indexes)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(list-index)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(list-id2entry)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(get-id2entry)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(list-index-analysis)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(quarantine-id2entry)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(list-quarantined)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(restore-quarantined)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(help)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
(database)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
":: :_kanidmd__database_commands" \
|
|
"*::: :->database" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(database)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-database-command-$line[1]:"
|
|
case $line[1] in
|
|
(vacuum)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(backup)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-C+[Compression method]:COMPRESSION:_default' \
|
|
'--compression=[Compression method]:COMPRESSION:_default' \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
':path -- Output path for the backup content:_files' \
|
|
&& ret=0
|
|
;;
|
|
(restore)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
':path -- Restore from this path. Should be created with "backup":_files' \
|
|
&& ret=0
|
|
;;
|
|
(verify)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(reindex)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(help)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
":: :_kanidmd__database__help_commands" \
|
|
"*::: :->help" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(help)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-database-help-command-$line[1]:"
|
|
case $line[1] in
|
|
(vacuum)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(backup)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(restore)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(verify)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(reindex)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(help)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
(domain)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
":: :_kanidmd__domain_commands" \
|
|
"*::: :->domain" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(domain)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-domain-command-$line[1]:"
|
|
case $line[1] in
|
|
(show)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(rename)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(upgrade-check)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(raise)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(remigrate)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
'::level:_default' \
|
|
&& ret=0
|
|
;;
|
|
(help)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
":: :_kanidmd__domain__help_commands" \
|
|
"*::: :->help" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(help)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-domain-help-command-$line[1]:"
|
|
case $line[1] in
|
|
(show)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(rename)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(upgrade-check)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(raise)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(remigrate)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(help)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
(healthcheck)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-v[Disable TLS verification]' \
|
|
'--verify-tls[Disable TLS verification]' \
|
|
'-O[Check the '\''origin'\'' URL from the server configuration file, instead of the '\''address'\'']' \
|
|
'--check-origin[Check the '\''origin'\'' URL from the server configuration file, instead of the '\''address'\'']' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(version)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
'-c+[]:CONFIG_PATH:_files' \
|
|
'--config-path=[]:CONFIG_PATH:_files' \
|
|
'-o+[Output formatting]:OUTPUT_MODE:_default' \
|
|
'--output=[Output formatting]:OUTPUT_MODE:_default' \
|
|
'-h[Print help]' \
|
|
'--help[Print help]' \
|
|
&& ret=0
|
|
;;
|
|
(help)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
":: :_kanidmd__help_commands" \
|
|
"*::: :->help" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(help)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-help-command-$line[1]:"
|
|
case $line[1] in
|
|
(server)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(configtest)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(cert-generate)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(recover-account)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(disable-account)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(show-replication-certificate)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(renew-replication-certificate)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(refresh-replication-consumer)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(db-scan)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
":: :_kanidmd__help__db-scan_commands" \
|
|
"*::: :->db-scan" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(db-scan)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-help-db-scan-command-$line[1]:"
|
|
case $line[1] in
|
|
(list-all-indexes)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(list-index)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(list-id2entry)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(get-id2entry)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(list-index-analysis)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(quarantine-id2entry)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(list-quarantined)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(restore-quarantined)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
(database)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
":: :_kanidmd__help__database_commands" \
|
|
"*::: :->database" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(database)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-help-database-command-$line[1]:"
|
|
case $line[1] in
|
|
(vacuum)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(backup)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(restore)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(verify)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(reindex)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
(domain)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
":: :_kanidmd__help__domain_commands" \
|
|
"*::: :->domain" \
|
|
&& ret=0
|
|
|
|
case $state in
|
|
(domain)
|
|
words=($line[1] "${words[@]}")
|
|
(( CURRENT += 1 ))
|
|
curcontext="${curcontext%:*:*}:kanidmd-help-domain-command-$line[1]:"
|
|
case $line[1] in
|
|
(show)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(rename)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(upgrade-check)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(raise)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(remigrate)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
(healthcheck)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(version)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
(help)
|
|
_arguments "${_arguments_options[@]}" : \
|
|
&& ret=0
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
;;
|
|
esac
|
|
}
|
|
|
|
(( $+functions[_kanidmd_commands] )) ||
|
|
_kanidmd_commands() {
|
|
local commands; commands=(
|
|
'server:Start the IDM Server' \
|
|
'configtest:Test the IDM Server configuration, without starting network listeners' \
|
|
'cert-generate:Create a self-signed ca and tls certificate in the locations listed from the configuration. These certificates should *not* be used in production, they are for testing and evaluation only!' \
|
|
'recover-account:Recover an account'\''s password' \
|
|
'disable-account:Disable an account so that it can not be used. This can be reset with \`recover-account\`' \
|
|
'show-replication-certificate:Display this server'\''s replication certificate' \
|
|
'renew-replication-certificate:Renew this server'\''s replication certificate' \
|
|
'refresh-replication-consumer:Refresh this servers database content with the content from a supplier. This means that all local content will be deleted and replaced with the supplier content' \
|
|
'db-scan:Inspect the internal content of the database datastructures' \
|
|
'database:Database maintenance, backups, restoration etc' \
|
|
'domain:Change domain settings' \
|
|
'healthcheck:Load the server config and check services are listening' \
|
|
'version:Print the program version and exit' \
|
|
'help:Print this message or the help of the given subcommand(s)' \
|
|
)
|
|
_describe -t commands 'kanidmd commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__cert-generate_commands] )) ||
|
|
_kanidmd__cert-generate_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd cert-generate commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__configtest_commands] )) ||
|
|
_kanidmd__configtest_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd configtest commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database_commands] )) ||
|
|
_kanidmd__database_commands() {
|
|
local commands; commands=(
|
|
'vacuum:Vacuum the database to reclaim space or change db_fs_type/page_size (offline)' \
|
|
'backup:Backup the database content (offline)' \
|
|
'restore:Restore the database content (offline)' \
|
|
'verify:Verify database and entity consistency' \
|
|
'reindex:Reindex the database (offline)' \
|
|
'help:Print this message or the help of the given subcommand(s)' \
|
|
)
|
|
_describe -t commands 'kanidmd database commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__backup_commands] )) ||
|
|
_kanidmd__database__backup_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database backup commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__help_commands] )) ||
|
|
_kanidmd__database__help_commands() {
|
|
local commands; commands=(
|
|
'vacuum:Vacuum the database to reclaim space or change db_fs_type/page_size (offline)' \
|
|
'backup:Backup the database content (offline)' \
|
|
'restore:Restore the database content (offline)' \
|
|
'verify:Verify database and entity consistency' \
|
|
'reindex:Reindex the database (offline)' \
|
|
'help:Print this message or the help of the given subcommand(s)' \
|
|
)
|
|
_describe -t commands 'kanidmd database help commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__help__backup_commands] )) ||
|
|
_kanidmd__database__help__backup_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database help backup commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__help__help_commands] )) ||
|
|
_kanidmd__database__help__help_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database help help commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__help__reindex_commands] )) ||
|
|
_kanidmd__database__help__reindex_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database help reindex commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__help__restore_commands] )) ||
|
|
_kanidmd__database__help__restore_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database help restore commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__help__vacuum_commands] )) ||
|
|
_kanidmd__database__help__vacuum_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database help vacuum commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__help__verify_commands] )) ||
|
|
_kanidmd__database__help__verify_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database help verify commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__reindex_commands] )) ||
|
|
_kanidmd__database__reindex_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database reindex commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__restore_commands] )) ||
|
|
_kanidmd__database__restore_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database restore commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__vacuum_commands] )) ||
|
|
_kanidmd__database__vacuum_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database vacuum commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__database__verify_commands] )) ||
|
|
_kanidmd__database__verify_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd database verify commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan_commands] )) ||
|
|
_kanidmd__db-scan_commands() {
|
|
local commands; commands=(
|
|
'list-all-indexes:List all index tables that exist on the system' \
|
|
'list-index:List all content of a named index' \
|
|
'list-id2entry:List all id2entry values with reduced entry content' \
|
|
'get-id2entry:View the data of a specific entry from id2entry' \
|
|
'list-index-analysis:List all content of index analysis' \
|
|
'quarantine-id2entry:Given an entry id, quarantine the entry in a hidden db partition' \
|
|
'list-quarantined:List the entries in quarantine' \
|
|
'restore-quarantined:Given an entry id, restore the entry from the hidden db partition' \
|
|
'help:Print this message or the help of the given subcommand(s)' \
|
|
)
|
|
_describe -t commands 'kanidmd db-scan commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__get-id2entry_commands] )) ||
|
|
_kanidmd__db-scan__get-id2entry_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan get-id2entry commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help_commands] )) ||
|
|
_kanidmd__db-scan__help_commands() {
|
|
local commands; commands=(
|
|
'list-all-indexes:List all index tables that exist on the system' \
|
|
'list-index:List all content of a named index' \
|
|
'list-id2entry:List all id2entry values with reduced entry content' \
|
|
'get-id2entry:View the data of a specific entry from id2entry' \
|
|
'list-index-analysis:List all content of index analysis' \
|
|
'quarantine-id2entry:Given an entry id, quarantine the entry in a hidden db partition' \
|
|
'list-quarantined:List the entries in quarantine' \
|
|
'restore-quarantined:Given an entry id, restore the entry from the hidden db partition' \
|
|
'help:Print this message or the help of the given subcommand(s)' \
|
|
)
|
|
_describe -t commands 'kanidmd db-scan help commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help__get-id2entry_commands] )) ||
|
|
_kanidmd__db-scan__help__get-id2entry_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan help get-id2entry commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help__help_commands] )) ||
|
|
_kanidmd__db-scan__help__help_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan help help commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help__list-all-indexes_commands] )) ||
|
|
_kanidmd__db-scan__help__list-all-indexes_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan help list-all-indexes commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help__list-id2entry_commands] )) ||
|
|
_kanidmd__db-scan__help__list-id2entry_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan help list-id2entry commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help__list-index_commands] )) ||
|
|
_kanidmd__db-scan__help__list-index_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan help list-index commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help__list-index-analysis_commands] )) ||
|
|
_kanidmd__db-scan__help__list-index-analysis_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan help list-index-analysis commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help__list-quarantined_commands] )) ||
|
|
_kanidmd__db-scan__help__list-quarantined_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan help list-quarantined commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help__quarantine-id2entry_commands] )) ||
|
|
_kanidmd__db-scan__help__quarantine-id2entry_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan help quarantine-id2entry commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__help__restore-quarantined_commands] )) ||
|
|
_kanidmd__db-scan__help__restore-quarantined_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan help restore-quarantined commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__list-all-indexes_commands] )) ||
|
|
_kanidmd__db-scan__list-all-indexes_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan list-all-indexes commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__list-id2entry_commands] )) ||
|
|
_kanidmd__db-scan__list-id2entry_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan list-id2entry commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__list-index_commands] )) ||
|
|
_kanidmd__db-scan__list-index_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan list-index commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__list-index-analysis_commands] )) ||
|
|
_kanidmd__db-scan__list-index-analysis_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan list-index-analysis commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__list-quarantined_commands] )) ||
|
|
_kanidmd__db-scan__list-quarantined_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan list-quarantined commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__quarantine-id2entry_commands] )) ||
|
|
_kanidmd__db-scan__quarantine-id2entry_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan quarantine-id2entry commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__db-scan__restore-quarantined_commands] )) ||
|
|
_kanidmd__db-scan__restore-quarantined_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd db-scan restore-quarantined commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__disable-account_commands] )) ||
|
|
_kanidmd__disable-account_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd disable-account commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain_commands] )) ||
|
|
_kanidmd__domain_commands() {
|
|
local commands; commands=(
|
|
'show:Show the current domain' \
|
|
'rename:Change the IDM domain name based on the values in the configuration' \
|
|
'upgrade-check:Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation' \
|
|
'raise:⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available' \
|
|
'remigrate:⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from' \
|
|
'help:Print this message or the help of the given subcommand(s)' \
|
|
)
|
|
_describe -t commands 'kanidmd domain commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__help_commands] )) ||
|
|
_kanidmd__domain__help_commands() {
|
|
local commands; commands=(
|
|
'show:Show the current domain' \
|
|
'rename:Change the IDM domain name based on the values in the configuration' \
|
|
'upgrade-check:Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation' \
|
|
'raise:⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available' \
|
|
'remigrate:⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from' \
|
|
'help:Print this message or the help of the given subcommand(s)' \
|
|
)
|
|
_describe -t commands 'kanidmd domain help commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__help__help_commands] )) ||
|
|
_kanidmd__domain__help__help_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain help help commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__help__raise_commands] )) ||
|
|
_kanidmd__domain__help__raise_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain help raise commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__help__remigrate_commands] )) ||
|
|
_kanidmd__domain__help__remigrate_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain help remigrate commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__help__rename_commands] )) ||
|
|
_kanidmd__domain__help__rename_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain help rename commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__help__show_commands] )) ||
|
|
_kanidmd__domain__help__show_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain help show commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__help__upgrade-check_commands] )) ||
|
|
_kanidmd__domain__help__upgrade-check_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain help upgrade-check commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__raise_commands] )) ||
|
|
_kanidmd__domain__raise_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain raise commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__remigrate_commands] )) ||
|
|
_kanidmd__domain__remigrate_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain remigrate commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__rename_commands] )) ||
|
|
_kanidmd__domain__rename_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain rename commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__show_commands] )) ||
|
|
_kanidmd__domain__show_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain show commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__domain__upgrade-check_commands] )) ||
|
|
_kanidmd__domain__upgrade-check_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd domain upgrade-check commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__healthcheck_commands] )) ||
|
|
_kanidmd__healthcheck_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd healthcheck commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help_commands] )) ||
|
|
_kanidmd__help_commands() {
|
|
local commands; commands=(
|
|
'server:Start the IDM Server' \
|
|
'configtest:Test the IDM Server configuration, without starting network listeners' \
|
|
'cert-generate:Create a self-signed ca and tls certificate in the locations listed from the configuration. These certificates should *not* be used in production, they are for testing and evaluation only!' \
|
|
'recover-account:Recover an account'\''s password' \
|
|
'disable-account:Disable an account so that it can not be used. This can be reset with \`recover-account\`' \
|
|
'show-replication-certificate:Display this server'\''s replication certificate' \
|
|
'renew-replication-certificate:Renew this server'\''s replication certificate' \
|
|
'refresh-replication-consumer:Refresh this servers database content with the content from a supplier. This means that all local content will be deleted and replaced with the supplier content' \
|
|
'db-scan:Inspect the internal content of the database datastructures' \
|
|
'database:Database maintenance, backups, restoration etc' \
|
|
'domain:Change domain settings' \
|
|
'healthcheck:Load the server config and check services are listening' \
|
|
'version:Print the program version and exit' \
|
|
'help:Print this message or the help of the given subcommand(s)' \
|
|
)
|
|
_describe -t commands 'kanidmd help commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__cert-generate_commands] )) ||
|
|
_kanidmd__help__cert-generate_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help cert-generate commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__configtest_commands] )) ||
|
|
_kanidmd__help__configtest_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help configtest commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__database_commands] )) ||
|
|
_kanidmd__help__database_commands() {
|
|
local commands; commands=(
|
|
'vacuum:Vacuum the database to reclaim space or change db_fs_type/page_size (offline)' \
|
|
'backup:Backup the database content (offline)' \
|
|
'restore:Restore the database content (offline)' \
|
|
'verify:Verify database and entity consistency' \
|
|
'reindex:Reindex the database (offline)' \
|
|
)
|
|
_describe -t commands 'kanidmd help database commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__database__backup_commands] )) ||
|
|
_kanidmd__help__database__backup_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help database backup commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__database__reindex_commands] )) ||
|
|
_kanidmd__help__database__reindex_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help database reindex commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__database__restore_commands] )) ||
|
|
_kanidmd__help__database__restore_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help database restore commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__database__vacuum_commands] )) ||
|
|
_kanidmd__help__database__vacuum_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help database vacuum commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__database__verify_commands] )) ||
|
|
_kanidmd__help__database__verify_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help database verify commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__db-scan_commands] )) ||
|
|
_kanidmd__help__db-scan_commands() {
|
|
local commands; commands=(
|
|
'list-all-indexes:List all index tables that exist on the system' \
|
|
'list-index:List all content of a named index' \
|
|
'list-id2entry:List all id2entry values with reduced entry content' \
|
|
'get-id2entry:View the data of a specific entry from id2entry' \
|
|
'list-index-analysis:List all content of index analysis' \
|
|
'quarantine-id2entry:Given an entry id, quarantine the entry in a hidden db partition' \
|
|
'list-quarantined:List the entries in quarantine' \
|
|
'restore-quarantined:Given an entry id, restore the entry from the hidden db partition' \
|
|
)
|
|
_describe -t commands 'kanidmd help db-scan commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__db-scan__get-id2entry_commands] )) ||
|
|
_kanidmd__help__db-scan__get-id2entry_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help db-scan get-id2entry commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__db-scan__list-all-indexes_commands] )) ||
|
|
_kanidmd__help__db-scan__list-all-indexes_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help db-scan list-all-indexes commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__db-scan__list-id2entry_commands] )) ||
|
|
_kanidmd__help__db-scan__list-id2entry_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help db-scan list-id2entry commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__db-scan__list-index_commands] )) ||
|
|
_kanidmd__help__db-scan__list-index_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help db-scan list-index commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__db-scan__list-index-analysis_commands] )) ||
|
|
_kanidmd__help__db-scan__list-index-analysis_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help db-scan list-index-analysis commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__db-scan__list-quarantined_commands] )) ||
|
|
_kanidmd__help__db-scan__list-quarantined_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help db-scan list-quarantined commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__db-scan__quarantine-id2entry_commands] )) ||
|
|
_kanidmd__help__db-scan__quarantine-id2entry_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help db-scan quarantine-id2entry commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__db-scan__restore-quarantined_commands] )) ||
|
|
_kanidmd__help__db-scan__restore-quarantined_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help db-scan restore-quarantined commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__disable-account_commands] )) ||
|
|
_kanidmd__help__disable-account_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help disable-account commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__domain_commands] )) ||
|
|
_kanidmd__help__domain_commands() {
|
|
local commands; commands=(
|
|
'show:Show the current domain' \
|
|
'rename:Change the IDM domain name based on the values in the configuration' \
|
|
'upgrade-check:Perform a pre-upgrade-check of this domains content. This will report possible incompatibilities that can block a successful upgrade to the next version of Kanidm. This is a safe read only operation' \
|
|
'raise:⚠️ Do not use this command unless directed by a project member. ⚠️ - Raise the functional level of this domain to the maximum available' \
|
|
'remigrate:⚠️ Do not use this command unless directed by a project member. ⚠️ - Rerun migrations of this domains database, optionally nominating the level to start from' \
|
|
)
|
|
_describe -t commands 'kanidmd help domain commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__domain__raise_commands] )) ||
|
|
_kanidmd__help__domain__raise_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help domain raise commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__domain__remigrate_commands] )) ||
|
|
_kanidmd__help__domain__remigrate_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help domain remigrate commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__domain__rename_commands] )) ||
|
|
_kanidmd__help__domain__rename_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help domain rename commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__domain__show_commands] )) ||
|
|
_kanidmd__help__domain__show_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help domain show commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__domain__upgrade-check_commands] )) ||
|
|
_kanidmd__help__domain__upgrade-check_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help domain upgrade-check commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__healthcheck_commands] )) ||
|
|
_kanidmd__help__healthcheck_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help healthcheck commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__help_commands] )) ||
|
|
_kanidmd__help__help_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help help commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__recover-account_commands] )) ||
|
|
_kanidmd__help__recover-account_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help recover-account commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__refresh-replication-consumer_commands] )) ||
|
|
_kanidmd__help__refresh-replication-consumer_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help refresh-replication-consumer commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__renew-replication-certificate_commands] )) ||
|
|
_kanidmd__help__renew-replication-certificate_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help renew-replication-certificate commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__server_commands] )) ||
|
|
_kanidmd__help__server_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help server commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__show-replication-certificate_commands] )) ||
|
|
_kanidmd__help__show-replication-certificate_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help show-replication-certificate commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__help__version_commands] )) ||
|
|
_kanidmd__help__version_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd help version commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__recover-account_commands] )) ||
|
|
_kanidmd__recover-account_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd recover-account commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__refresh-replication-consumer_commands] )) ||
|
|
_kanidmd__refresh-replication-consumer_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd refresh-replication-consumer commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__renew-replication-certificate_commands] )) ||
|
|
_kanidmd__renew-replication-certificate_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd renew-replication-certificate commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__server_commands] )) ||
|
|
_kanidmd__server_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd server commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__show-replication-certificate_commands] )) ||
|
|
_kanidmd__show-replication-certificate_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd show-replication-certificate commands' commands "$@"
|
|
}
|
|
(( $+functions[_kanidmd__version_commands] )) ||
|
|
_kanidmd__version_commands() {
|
|
local commands; commands=()
|
|
_describe -t commands 'kanidmd version commands' commands "$@"
|
|
}
|
|
|
|
if [ "$funcstack[1]" = "_kanidmd" ]; then
|
|
_kanidmd "$@"
|
|
else
|
|
compdef _kanidmd kanidmd
|
|
fi
|