1 # == Class: neutron::plugins::linuxbridge
3 # Setups linuxbridge plugin for neutron server.
8 # sql_connection is no longer configured in the plugin.ini.
9 # Use $connection in the nuetron::server class to configure the SQL
12 # [*network_vlan_ranges*]
13 # (required) Comma-separated list of <physical_network>[:<vlan_min>:<vlan_max>]
14 # tuples enumerating ranges of VLAN IDs on named physical networks that are
15 # available for allocation.
17 # [*tenant_network_type*]
18 # (optional) Type of network to allocate for tenant networks.
22 # (optional) Ensure state for package. Defaults to 'present'.
24 class neutron::plugins::linuxbridge (
25 $sql_connection = false,
26 $network_vlan_ranges = 'physnet1:1000:2000',
27 $tenant_network_type = 'vlan',
28 $package_ensure = 'present'
31 include neutron::params
33 Package['neutron'] -> Package['neutron-plugin-linuxbridge']
34 Package['neutron-plugin-linuxbridge'] -> Neutron_plugin_linuxbridge<||>
35 Neutron_plugin_linuxbridge<||> ~> Service<| title == 'neutron-server' |>
36 Package['neutron-plugin-linuxbridge'] -> Service<| title == 'neutron-server' |>
38 if $::operatingsystem == 'Ubuntu' {
39 file_line { '/etc/default/neutron-server:NEUTRON_PLUGIN_CONFIG':
40 path => '/etc/default/neutron-server',
41 match => '^NEUTRON_PLUGIN_CONFIG=(.*)$',
42 line => "NEUTRON_PLUGIN_CONFIG=${::neutron::params::linuxbridge_config_file}",
44 Package['neutron-plugin-linuxbridge'],
45 Package['neutron-server'],
47 notify => Service['neutron-server'],
51 package { 'neutron-plugin-linuxbridge':
52 ensure => $package_ensure,
53 name => $::neutron::params::linuxbridge_server_package,
57 warning('sql_connection is deprecated for connection in the neutron::server class')
60 neutron_plugin_linuxbridge {
61 'VLANS/tenant_network_type': value => $tenant_network_type;
62 'VLANS/network_vlan_ranges': value => $network_vlan_ranges;
65 # In RH, this link is used to start Neutron process but in Debian, it's used only
66 # to manage database synchronization.
67 file {'/etc/neutron/plugin.ini':
69 target => '/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini',
70 require => Package['neutron-plugin-linuxbridge']