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
11 12 13 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 11 def do_tag_add wf.tag_add([:'<id>'], [:'<tag>'].first) end |
#do_tag_clear ⇒ Object
23 24 25 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 23 def do_tag_clear wf.tag_set([:'<id>'], []) end |
#do_tag_delete ⇒ Object
15 16 17 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 15 def do_tag_delete wf.tag_delete([:'<id>'], [:'<tag>'].first) end |
#do_tag_pathsearch ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 27 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
19 20 21 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 19 def do_tag_set wf.tag_set([:'<id>'], [:'<tag>']) end |
#do_tags ⇒ Object
7 8 9 |
# File 'lib/wavefront-cli/command_mixins/tag.rb', line 7 def wf.([:'<id>']) end |