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



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

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

#khandle_customHttpHeadersObject

rubocop:disable Naming/MethodName



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

def khandle_customHttpHeaders
  'custom_headers'
end

#khandle_titleObject



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

def khandle_title
  'name'
end

#resource_nameObject



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

def resource_name
  'alert_target'
end

#vhandle_template(val) ⇒ Object



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

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