Class: WavefrontCommandAlert

Inherits:
WavefrontCommandBase show all
Defined in:
lib/wavefront-cli/commands/alert.rb

Overview

Define the Alert command

Instance Method Summary collapse

Methods inherited from WavefrontCommandBase

#acl_commands, #commands, #common_options, #description, #docopt, #global_option_text, #global_options, #opt_row, #option_column_width, #options, #postscript, #sdk_class, #sdk_file, #tag_commands, #thing, #things, #word

Instance Method Details

#_commandsObject



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
# File 'lib/wavefront-cli/commands/alert.rb', line 8

def _commands
  ["list #{CMN} [-al] [-O fields] [-o offset] [-L limit]",
   "firing #{CMN} [-o offset] [-L limit]",
   "affected #{CMN} hosts [<id>]",
   "snoozed #{CMN} [-o offset] [-L limit]",
   "describe #{CMN} [-v version] <id>",
   "delete #{CMN} <id>",
   "clone #{CMN} [-v version] <id>",
   "undelete #{CMN} <id>",
   "history #{CMN} [-o offset] [-L limit] <id>",
   "latest #{CMN} <id>",
   "dump #{CMN}",
   "import #{CMN} [-uU] <file>",
   "snooze #{CMN} [-T time] <id>",
   "set #{CMN} <key=value> <id>",
   "unsnooze #{CMN} <id>",
   "search #{CMN} [-al] [-o offset] [-L limit] [-O fields] <condition>...",
   tag_commands,
   "currently #{CMN} <state>",
   "queries #{CMN} [-b] [<id>]",
   "install #{CMN} <id>",
   "uninstall #{CMN} <id>",
   acl_commands,
   "summary #{CMN} [-a]"]
end

#_optionsObject



34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/wavefront-cli/commands/alert.rb', line 34

def _options
  [common_options,
   "-l, --long               list #{things} in detail",
   "-a, --all                list all #{things}",
   "-v, --version=INTEGER    describe only this version of #{thing}",
   "-o, --offset=n           start from nth #{thing}",
   "-L, --limit=COUNT        number of #{things} to list",
   '-O, --fields=F1,F2,...   only show given fields',
   "-u, --update             update an existing #{thing}",
   "-U, --upsert             import new or update existing #{thing}",
   '-T, --time=SECONDS       how long to snooze (default 3600)',
   "-b, --brief              do not show #{thing} names"]
end