1 # == Class: neutron::agents::linuxbridge
3 # Setups linuxbridge neutron agent.
7 # [*physical_interface_mappings*]
8 # (required) Comma-separated list of <physical_network>:<physical_interface>
9 # tuples mapping physical network names to agent's node-specific physical
13 # (optional) Firewall driver for realizing neutron security group function.
14 # Defaults to 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver'.
17 # (optional) Ensure state for package. Defaults to 'present'.
20 # (optional) Enable state for service. Defaults to 'true'.
23 # (optional) Whether to start/stop the service
26 class neutron::agents::linuxbridge (
27 $physical_interface_mappings,
28 $firewall_driver = 'neutron.agent.linux.iptables_firewall.IptablesFirewallDriver',
29 $package_ensure = 'present',
31 $manage_service = true
34 include neutron::params
36 Neutron_config<||> ~> Service['neutron-plugin-linuxbridge-service']
37 Neutron_plugin_linuxbridge<||> ~> Service<| title == 'neutron-plugin-linuxbridge-service' |>
39 if $::neutron::params::linuxbridge_agent_package {
40 Package['neutron'] -> Package['neutron-plugin-linuxbridge-agent']
41 Package['neutron-plugin-linuxbridge-agent'] -> Neutron_plugin_linuxbridge<||>
42 Package['neutron-plugin-linuxbridge-agent'] -> Service['neutron-plugin-linuxbridge-service']
43 package { 'neutron-plugin-linuxbridge-agent':
44 ensure => $package_ensure,
45 name => $::neutron::params::linuxbridge_agent_package,
48 # Some platforms (RedHat) do not provide a separate neutron plugin
49 # linuxbridge agent package. The configuration file for the linuxbridge
50 # agent is provided by the neutron linuxbridge plugin package.
51 Package['neutron-plugin-linuxbridge'] -> Neutron_plugin_linuxbridge<||>
53 if ! defined(Package['neutron-plugin-linuxbridge']) {
54 package { 'neutron-plugin-linuxbridge':
55 ensure => $package_ensure,
56 name => $::neutron::params::linuxbridge_server_package,
61 neutron_plugin_linuxbridge {
62 'LINUX_BRIDGE/physical_interface_mappings': value => $physical_interface_mappings;
63 'SECURITYGROUP/firewall_driver': value => $firewall_driver;
68 $service_ensure = 'running'
70 $service_ensure = 'stopped'
74 service { 'neutron-plugin-linuxbridge-service':
75 ensure => $service_ensure,
76 name => $::neutron::params::linuxbridge_agent_service,