Class: WavefrontCli::Metric
Overview
CLI coverage for the v2 ‘metric’ API.
Instance Attribute Summary
Attributes inherited from Base
#klass, #klass_word, #options, #wf
Instance Method Summary collapse
-
#do_describe ⇒ Object
There’s an extra describe flag that other classes don’t have.
- #extra_validation ⇒ Object
Methods inherited from Base
#check_status, #dispatch, #display, #do_delete, #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, #import_to_create, #initialize, #load_display_class, #load_file, #mk_creds, #mk_opts, #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_describe ⇒ Object
There’s an extra describe flag that other classes don’t have.
11 12 13 |
# File 'lib/wavefront-cli/metric.rb', line 11 def do_describe wf.detail([:'<metric>'], [:glob] || [], [:offset]) end |
#extra_validation ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/wavefront-cli/metric.rb', line 15 def extra_validation return unless [:'<metric>'] begin wf_metric_name?([:'<metric>']) rescue Wavefront::Exception::InvalidMetricName abort "'#{options[:'<metric>']}' is not a valid metric." end end |