Class: WavefrontCli::Dashboard

Inherits:
Base
  • Object
show all
Defined in:
lib/wavefront-cli/dashboard.rb

Overview

CLI coverage for the v2 ‘dashboard’ API.

Instance Attribute Summary

Attributes inherited from Base

#klass, #klass_word, #options, #wf

Instance Method Summary collapse

Methods inherited from Base

#check_status, #conds_to_query, #dispatch, #display, #display_api_error, #display_no_api_response, #do_import, #do_list, #do_search, #do_tag_add, #do_tag_clear, #do_tag_delete, #do_tag_set, #do_tags, #do_undelete, #do_update, #format_var, #handle_error, #handle_response, #hcl_fields, #import_to_create, #initialize, #load_display_class, #load_file, #load_from_stdin, #mk_creds, #mk_opts, #no_api_response, #options_and_exit, #parseable_output, #run, #validate_id, #validate_input, #validate_opts, #validate_tags, #validator_exception, #validator_method

Constructor Details

This class inherits a constructor from WavefrontCli::Base

Instance Method Details

#do_deleteObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/wavefront-cli/dashboard.rb', line 12

def do_delete
  word = if wf.describe(options[:'<id>']).status.code == 200
           'Soft'
         else
           'Permanently'
         end

  puts "#{word} deleting dashboard '#{options[:'<id>']}'."
  wf.delete(options[:'<id>'])
end

#do_describeObject



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

def do_describe
  wf.describe(options[:'<id>'], options[:version])
end

#do_historyObject



23
24
25
# File 'lib/wavefront-cli/dashboard.rb', line 23

def do_history
  wf.history(options[:'<id>'])
end