#compdef _nova-status nova-status

_nova-status_commands(){
#Script used only if subcommand
  local -a _nova-status_cmds

  # Add subcommands list
  _nova-status_cmds=(
    'version:'
    'bash-completion:'
    'upgrade:'

  )

  if (( CURRENT == 1 )); then
    _describe -t commands 'nova-status command' _nova-status_cmds || compadd "$@"
  else
    local curcontext="$curcontext"
    #Check if subcommand and redefine completion
    case "$words[1]" in
      version)
        _arguments -s \
        '(-h --help)'{-h,--help}'[show this help message and exit]' \

        ;;
      bash-completion)
        _arguments -s \
        '(-h --help)'{-h,--help}'[show this help message and exit]' \
'[]' \

        ;;
      upgrade)
        _arguments -s \
        '(-h --help)'{-h,--help}'[show this help message and exit]' \
'[]' \

        ;;

    esac
  fi
}

_nova-status(){
  local curcontext="$curcontext" state line
  _arguments -s \
    '(--config_dir)'--config_dir'[Path to a config directory to pull `*.conf` files from. This file set is sorted, so as to provide a predictable parse order if individual options are over-ridden. The set is parsed after the file(s) specified via previous --config-file, arguments hence over-ridden options in the directory take precedence. This option must be set from the command-line.]:choice:( )' \
    '(--config_file)'--config_file'[Path to a config file to use. Multiple config files can be specified, with values in later files taking precedence. Defaults to %(default)s. This option must be set from the command-line.]:choice:( )' \
    '(--use_json)'--use_json'[Use JSON formatting for logging. This option is ignored if log_config_append is set.]:choice:( )' \
    '(--syslog_log_facility)'--syslog_log_facility'[Syslog facility to receive log lines. This option is ignored if log_config_append is set.]:choice:( )' \
    '(--use_journal)'--use_journal'[Enable journald for logging. If running in a systemd environment you may wish to enable journal support. Doing so will use the journal native protocol which includes structured metadata in addition to log messages.This option is ignored if log_config_append is set.]:choice:( )' \
    '(--use_syslog)'--use_syslog'[Use syslog for logging. Existing syslog format is DEPRECATED and will be changed later to honor RFC5424. This option is ignored if log_config_append is set.]:choice:( )' \
    '(--watch_log_file)'--watch_log_file'[Uses logging handler designed to watch file system. When log file is moved or removed this handler will open a new log file with specified path instantaneously. It makes sense only if log_file option is specified and Linux platform is used. This option is ignored if log_config_append is set.]:choice:( )' \
    '(--log_dir)'--log_dir'[(Optional) The base directory used for relative log_file  paths. This option is ignored if log_config_append is set.]:choice:( )' \
    '(--log_file)'--log_file'[(Optional) Name of log file to send logging output to. If no default is set, logging will go to stderr as defined by use_stderr. This option is ignored if log_config_append is set.]:choice:( )' \
    '(--log_date_format)'--log_date_format'[Defines the format string for %%(asctime)s in log records. Default: %(default)s . This option is ignored if log_config_append is set.]:choice:( )' \
    '(--log_config_append)'--log_config_append'[The name of a logging configuration file. This file is appended to any existing logging configuration files. For details about logging configuration files, see the Python logging module documentation. Note that when logging configuration files are used then all logging configuration is set in the configuration file and other logging configuration options are ignored (for example, log-date-format).]:choice:( )' \
    '(--debug -d)'{--debug,-d}'[If set to true, the logging level will be set to DEBUG instead of the default INFO level.]:choice:( )' \
    '(--shell_completion)'--shell_completion'[Display a shell completion script]:choice:(bash zsh)' \
    '(--help -h)'{--help,-h}'[show this help message and exit]' \
    '*::nova-status command:_nova-status_commands'

}

