diff options
Diffstat (limited to 'build/puppet-neutron')
-rw-r--r-- | build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp | 56 | ||||
-rw-r--r-- | build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp | 33 |
2 files changed, 89 insertions, 0 deletions
diff --git a/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp b/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp new file mode 100644 index 00000000..c25c2817 --- /dev/null +++ b/build/puppet-neutron/manifests/agents/ml2/networking-vpp.pp @@ -0,0 +1,56 @@ +# == Class: neutron::agents::ml2::networking-vpp +# +# Setups networking-vpp Neutron agent for ML2 plugin. +# +# === Parameters +# +# [*package_ensure*] +# (optional) Package ensure state. +# Defaults to 'present'. +# +# [*enabled*] +# (required) Whether or not to enable the agent. +# Defaults to true. +# +# [*manage_service*] +# (optional) Whether to start/stop the service +# Defaults to true +# +# [*physnets*] +# List of <physical_network>:<physical_interface> +# tuples mapping physical network names to agent's node-specific physical +# network interfaces. Defaults to empty list. +# +# [*flat_network_if*] +# VPP interface used for flat network +# Defaults to ''. +# +class neutron::agents::ml2::networking-vpp ( + $package_ensure = 'present', + $enabled = true, + $manage_service = true, + $physnets = '', + $flat_network_if = '', +) { + + include ::neutron::params + + if $manage_service { + if $enabled { + $service_ensure = 'running' + } else { + $service_ensure = 'stopped' + } + } + + neutron_plugin_ml2 { + 'ml2_vpp/physnets': value => $physnets; + 'ml2_vpp/flat_network_if': value => $flat_network_if; + }-> + service { 'networking-vpp-agent': + ensure => $service_ensure, + name => 'networking-vpp-agent', + enable => $enabled, + tag => 'neutron-service', + } +}
\ No newline at end of file diff --git a/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp b/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp new file mode 100644 index 00000000..26548d3a --- /dev/null +++ b/build/puppet-neutron/manifests/plugins/ml2/networking-vpp.pp @@ -0,0 +1,33 @@ +# +# Install the networking-vpp ML2 mechanism driver and generate config file +# from parameters in the other classes. +# +# === Parameters +# +# [*package_ensure*] +# (optional) The intended state of the networking-vpp +# package, i.e. any of the possible values of the 'ensure' +# property for a package resource type. +# Defaults to 'present' +# +# [*agents*] +# Networking-vpp agents's addresses +# Defaults to $::os_service_default +# +class neutron::plugins::ml2::networking-vpp ( + $package_ensure = 'present', + $agents = $::os_service_default, +) { + require ::neutron::plugins::ml2 + + ensure_resource('package', 'networking-vpp', + { + ensure => $package_ensure, + tag => 'openstack', + } + ) + + neutron_plugin_ml2 { + 'ml2_vpp/agents': value => $agents; + } +} |