Class: WavefrontCommandEvent

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

Overview

Define the event command.

Instance Method Summary collapse

Methods inherited from WavefrontCommandBase

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

Instance Method Details

#_commandsObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/wavefront-cli/commands/event.rb', line 12

def _commands
  ["list #{CMN} [-l] [-O fields] [-s start] [-e end] [-L limit] [-o cursor]",
   "describe #{CMN} <id>",
   "create #{CMN} [-d description] [-s start] [-i | -e end] " \
   '[-S severity] [-T type] [-H host...] [-g tag...] [-N] <event>',
   "close #{CMN} [<id>]",
   "delete #{CMN} <id>",
   "set #{CMN} <key=value> <id>",
   "search #{CMN} [-al] [-o cursor] [-L limit] [-O fields] <condition>...",
   "wrap #{CMN} [-C command] [-d description] [-S severity] [-T type] " \
   '[-H host...] [-g tag...] <event>',
   tag_commands,
   "show #{CMN}"]
end

#_optionsObject



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/wavefront-cli/commands/event.rb', line 27

def _options
  [common_options,
   "-l, --long                list #{things} in detail",
   "-a, --all                 list all #{things}",
   "-o, --cursor=EVENT        start listing from given #{thing}",
   '-O, --fields=F1,F2,...    only show given fields',
   "-L, --limit=COUNT         number of #{things} to list",
   "-s, --start=TIME          start of listed #{things} or time at which " \
   "#{thing} begins",
   "-e, --end=TIME            end of listed #{things} or time at which " \
   "#{thing} ends",
   "-S, --severity=SEVERITY   severity of #{thing}",
   "-i, --instant             create an instantaneous #{thing}",
   "-T, --type=TYPE           type of #{thing}",
   "-d, --desc=STRING         description of #{thing}",
   "-H, --host=STRING         source to which #{thing} applies",
   '-N, --nostate             do not create a local file recording ' \
   "the #{thing}",
   "-g, --evtag=TAG           #{thing} tag",
   '-C, --command=COMMAND     command to run']
end

#descriptionObject



8
9
10
# File 'lib/wavefront-cli/commands/event.rb', line 8

def description
  "open, close, view, and manage #{things}"
end

#postscriptObject



49
50
51
52
# File 'lib/wavefront-cli/commands/event.rb', line 49

def postscript
  "View #{things} in detail using the 'query' command with the " \
    "'events()' function."
end