Class: WavefrontHclOutput::Notificant

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

Overview

Munge notificant output into something compatible with the Wavefront Terraform provider

Instance Attribute Summary

Attributes inherited from Base

#options, #resp

Instance Method Summary collapse

Methods inherited from Base

#close_output, #handler, #initialize, #open_output, #quote_value, #required_fields, #run, #vhandle_tags

Constructor Details

This class inherits a constructor from WavefrontHclOutput::Base

Instance Method Details

#hcl_fieldsObject



9
10
11
12
# File 'lib/wavefront-cli/output/hcl/notificant.rb', line 9

def hcl_fields
  %w[title description triggers template method recipient emailSubject
     contentType customHttpHeaders]
end

#khandle_customHttpHeadersObject

rubocop:disable Naming/MethodName



27
28
29
# File 'lib/wavefront-cli/output/hcl/notificant.rb', line 27

def khandle_customHttpHeaders
  'custom_headers'
end

#khandle_titleObject



22
23
24
# File 'lib/wavefront-cli/output/hcl/notificant.rb', line 22

def khandle_title
  'name'
end

#resource_nameObject



18
19
20
# File 'lib/wavefront-cli/output/hcl/notificant.rb', line 18

def resource_name
  'alert_target'
end

#vhandle_template(val) ⇒ Object



14
15
16
# File 'lib/wavefront-cli/output/hcl/notificant.rb', line 14

def vhandle_template(val)
  val.gsub(/\s*\n/, '')
end