Class: WavefrontCommandWindow

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

Overview

Define the maintenance window command.

Instance Method Summary collapse

Methods inherited from WavefrontCommandBase

#commands, #common_options, #docopt, #global_options, #opt_row, #option_column_width, #options, #postscript, #tag_commands, #word

Instance Method Details

#_commandsObject



18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/wavefront-cli/commands/window.rb', line 18

def _commands
  ["list #{CMN} [-l] [-f format] [-o offset] [-L limit]",
   "describe #{CMN} [-f format] <id>",
   "create #{CMN} -d reason [-s time] [-e time] " \
   '[-A alert_tag...] [-T host_tag...] [-H host...] <title>',
   "close #{CMN} <id>",
   "extend #{CMN} (by|to) <time> <id>",
   "delete #{CMN} <id>",
   "import #{CMN} <file>",
   "update #{CMN} <key=value> <id>",
   "search #{CMN} [-f format] [-o offset] [-L limit] [-l] <condition>..."]
end

#_optionsObject



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/wavefront-cli/commands/window.rb', line 31

def _options
  [common_options,
   '-l, --long           list maintenance windows in detail',
   '-o, --offset=n       start from nth maintenance window',
   '-L, --limit=COUNT    number of maintenance windows to list',
   '-d, --desc=STRING    reason for maintenance window',
   '-s, --start=TIME     time at which window begins',
   '-e, --end=TIME       time at which window ends',
   '-A, --atag=STRING    alert tag to which window applies',
   '-H, --host=STRING    host to which window applies',
   '-T, --htag=STRING    host tag to which window applies',
   '-f, --format=STRING  output format']
end

#descriptionObject



6
7
8
# File 'lib/wavefront-cli/commands/window.rb', line 6

def description
  'view and manage maintenance windows'
end

#sdk_classObject



14
15
16
# File 'lib/wavefront-cli/commands/window.rb', line 14

def sdk_class
  'MaintenanceWindow'
end

#sdk_fileObject



10
11
12
# File 'lib/wavefront-cli/commands/window.rb', line 10

def sdk_file
  'maintenancewindow'
end