Puppet Class: kickstack::neutron::agent::l2::compute

Inherits:
kickstack
Defined in:
manifests/neutron/agent/l2/compute.pp

Overview



1
2
3
4
5
6
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
# File 'manifests/neutron/agent/l2/compute.pp', line 1

class kickstack::neutron::agent::l2::compute inherits kickstack {

  include kickstack::neutron::config

  $tenant_network_type = "$::kickstack::neutron_tenant_network_type"

  case "$::kickstack::neutron_plugin" {
    'ovs': {
      file { "/etc/neutron/plugins/openvswitch/":
        ensure => directory,
      }
      file { "/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini":
        content => template("kickstack/l2-agent-config.erb"),
        replace => false,
      }
      case $tenant_network_type {
        'gre': {
          $local_tunnel_ip = getvar("ipaddress_${nic_data}")
          class { 'neutron::agents::ovs':
            bridge_mappings    => [],
            bridge_uplinks     => [],
            integration_bridge => $::kickstack::neutron_integration_bridge,
            enable_tunneling   => true,
            local_ip           => $local_tunnel_ip,
            tunnel_bridge      => $::kickstack::neutron_tunnel_bridge,
            tunnel_types       => ['gre'],
            package_ensure => $::kickstack::package_version,
            require        => [ File["/etc/neutron/plugins/openvswitch/"], File["/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini"] ],
          }
        }
        default: {
          $bridge_uplinks = ["br-${nic_data}:${nic_data}"]
          class { 'neutron::agents::ovs':
            bridge_mappings    => ["${::kickstack::neutron_physnet}:br-${nic_data}"],
            bridge_uplinks     => $bridge_uplinks,
            integration_bridge => $::kickstack::neutron_integration_bridge,
            enable_tunneling   => false,
            local_ip           => '',
            package_ensure => $::kickstack::package_version,
          }
        }
      }
      case $::osfamily {
        'Debian': {
          file { "/etc/init/neutron-plugin-openvswitch-agent.conf":
            content => template("kickstack/init.neutron-plugin-openvswitch-agent.erb"),
          }
        }
      }
    }
    'linuxbridge': {
      class { "neutron::agents::linuxbridge":
        physical_interface_mappings => "default:$nic_data"
      }
    }
  } 
}