Module: WavefrontCli::Mixin::Tag
- Included in:
- Alert, Dashboard, DerivedMetric, Event, Source
- Defined in:
- lib/wavefront-cli/command_mixins/tag.rb
Overview
Standard tag commands
Instance Method Summary collapse
- #do_tag_add ⇒ Object
- #do_tag_clear ⇒ Object
- #do_tag_delete ⇒ Object
- #do_tag_pathsearch ⇒ Object
- #do_tag_set ⇒ Object
- #do_tags ⇒ Object
Instance Method Details
#do_tag_add ⇒ Object
13 14 15 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 13 def do_tag_add wf.tag_add([:'<id>'], [:'<tag>'].first) end |
#do_tag_clear ⇒ Object
25 26 27 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 25 def do_tag_clear wf.tag_set([:'<id>'], []) end |
#do_tag_delete ⇒ Object
17 18 19 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 17 def do_tag_delete wf.tag_delete([:'<id>'], [:'<tag>'].first) end |
#do_tag_pathsearch ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 29 def do_tag_pathsearch require 'wavefront-sdk/search' wfs = Wavefront::Search.new(mk_creds, mk_opts) query = { key: 'tagpath', value: [:'<word>'], matchingMethod: 'TAGPATH', negated: false } wfs.search(search_key, query, range_hash) end |
#do_tag_set ⇒ Object
21 22 23 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 21 def do_tag_set wf.tag_set([:'<id>'], [:'<tag>']) end |
#do_tags ⇒ Object
9 10 11 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 9 def wf.([:'<id>']) end |