Puppet Class: pulsevtm::actions_e_mail

Defined in:
manifests/actions_e_mail.pp

Overview

class: pulsevtm::actions_e_mail

This class is a direct implementation of brocadvtm::actions

Please refer to the documentation in that module for more information

Parameters:

  • ensure (Any) (defaults to: present)
  • basic__note (Any) (defaults to: undef)
  • basic__syslog_msg_len_limit (Any) (defaults to: 1024)
  • basic__timeout (Any) (defaults to: 60)
  • basic__type (Any) (defaults to: 'email')
  • basic__verbose (Any) (defaults to: false)
  • email__from (Any) (defaults to: 'vTM@%hostname%')
  • email__server (Any) (defaults to: undef)
  • email__to (Any) (defaults to: '[]')
  • log__file (Any) (defaults to: undef)
  • program__arguments (Any) (defaults to: '[]')
  • program__program (Any) (defaults to: undef)
  • soap__additional_data (Any) (defaults to: undef)
  • soap__password (Any) (defaults to: undef)
  • soap__proxy (Any) (defaults to: undef)
  • soap__username (Any) (defaults to: undef)
  • syslog__sysloghost (Any) (defaults to: undef)
  • trap__auth_password (Any) (defaults to: undef)
  • trap__community (Any) (defaults to: undef)
  • trap__hash_algorithm (Any) (defaults to: 'md5')
  • trap__priv_password (Any) (defaults to: undef)
  • trap__traphost (Any) (defaults to: undef)
  • trap__username (Any) (defaults to: undef)
  • trap__version (Any) (defaults to: 'snmpv1')


7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# File 'manifests/actions_e_mail.pp', line 7

class pulsevtm::actions_e_mail (
  $ensure                      = present,
  $basic__note                 = undef,
  $basic__syslog_msg_len_limit = 1024,
  $basic__timeout              = 60,
  $basic__type                 = 'email',
  $basic__verbose              = false,
  $email__from                 = 'vTM@%hostname%',
  $email__server               = undef,
  $email__to                   = '[]',
  $log__file                   = undef,
  $program__arguments          = '[]',
  $program__program            = undef,
  $soap__additional_data       = undef,
  $soap__password              = undef,
  $soap__proxy                 = undef,
  $soap__username              = undef,
  $syslog__sysloghost          = undef,
  $trap__auth_password         = undef,
  $trap__community             = undef,
  $trap__hash_algorithm        = 'md5',
  $trap__priv_password         = undef,
  $trap__traphost              = undef,
  $trap__username              = undef,
  $trap__version               = 'snmpv1',
){
  include pulsevtm
  $ip              = $pulsevtm::rest_ip
  $port            = $pulsevtm::rest_port
  $user            = $pulsevtm::rest_user
  $pass            = $pulsevtm::rest_pass
  $purge           = $pulsevtm::purge
  $purge_state_dir = $pulsevtm::purge_state_dir

  info ("Configuring actions_e_mail ${name}")
  vtmrest { 'actions/E-Mail':
    ensure   => $ensure,
    before   => Class[pulsevtm::purge],
    endpoint => "https://${ip}:${port}/api/tm/6.0/config/active",
    username => $user,
    password => $pass,
    content  => template('pulsevtm/actions.erb'),
    type     => 'application/json',
    internal => 'actions_e_mail',
    failfast => $pulsevtm::failfast,
    debug    => $pulsevtm::debug,
  }

  if ( $purge ) {
    ensure_resource('file', "${purge_state_dir}/actions", {ensure => present})
    file_line { 'actions/E-Mail':
      line => 'actions/E-Mail',
      path => "${purge_state_dir}/actions",
    }
  }
}