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

#acl_commands, #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
30
31
# File 'lib/wavefront-cli/commands/window.rb', line 18

def _commands
  ["list #{CMN} [-al] [-O fields] [-o offset] [-L limit]",
   "describe #{CMN} <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} [-al] [-o offset] [-L limit] <condition>...",
   "ongoing #{CMN}",
   "pending #{CMN} [<hours>]"]
end

#_optionsObject



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

def _options
  [common_options,
   '-l, --long              list maintenance windows in detail',
   '-a, --all               list all maintenance windows',
   '-o, --offset=n          start from nth maintenance window',
   '-O, --fields=F1,F2,...  only show given fields',
   '-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