Puppet Class: cubbystack::neutron::fwaas

Defined in:
manifests/neutron/fwaas.pp

Overview

Class: cubbystack::neutron::fwaas

Configures the neutron-fwaas

Parameters

settings

A hash of key => value settings to go in fwaas_agent.ini

config_file

The path to fwaas_agent.ini Defaults to /etc/neutron/fwaas_agent.ini

Parameters:

  • settings (Any)
  • package_ensure (Any) (defaults to: latest)
  • service_enable (Any) (defaults to: true)
  • config_file (Any) (defaults to: '/etc/neutron/fwaas_driver.ini')


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
# File 'manifests/neutron/fwaas.pp', line 14

class cubbystack::neutron::fwaas (
  $settings,
  $package_ensure = latest,
  $service_enable = true,
  $config_file    = '/etc/neutron/fwaas_driver.ini',
) {

  include ::cubbystack::params

  ## Meta settings and globals
  $tags = ['openstack', 'neutron', 'neutron-fwaas']

  # Make sure Neutron L3 is installed before any configuration begins
  # Make sure Neutron L3 is configured before the service starts
  Package<| tag == 'neutron' |> -> Cubbystack_config<| tag == 'neutron-fwaas' |>
  Package<| tag == 'neutron' |> -> File<| tag == 'neutron-fwaas' |>

  # Restart neutron-fwaas after any config changes
  Cubbystack_config<| tag == 'neutron-fwaas' |> ~> Service<| tag == 'neutron' |>

  File {
    ensure => present,
    owner  => 'neutron',
    group  => 'neutron',
    mode   => '0640',
    tag    => $tags,
  }

  ## Neutron L3 configuration
  file { $config_file: }

  # Configure the L3 service
  $settings.each |$setting, $value| {
    cubbystack_config { "${config_file}: ${setting}":
      value => $value,
      tag   => $tags,
    }
  }

}