blob: 6184e0069455743670c589edd621504188d83e25 (
plain)
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
58
59
60
61
62
63
64
65
|
# == 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.
#
# [*etcd_host*]
# etcd server host name/ip
# Defaults to 127.0.0.1.
#
# [*etcd_port*]
# etcd server listening port.
# Defaults to 4001.
#
class neutron::agents::ml2::networking-vpp (
$package_ensure = 'present',
$enabled = true,
$manage_service = true,
$physnets = '',
$etcd_host = '127.0.0.1',
$etcd_port = 4001,
) {
include ::neutron::params
Neutron_agent_vpp<||> ~> Service['networking-vpp-agent']
neutron_agent_vpp {
'ml2_vpp/physnets': value => $physnets;
'ml2_vpp/etcd_host': value => $etcd_host;
'ml2_vpp/etcd_port': value => $etcd_port;
'DEFAULT/host': value => $::fqdn;
}
if $manage_service {
if $enabled {
$service_ensure = 'running'
} else {
$service_ensure = 'stopped'
}
}
service { 'networking-vpp-agent':
ensure => $service_ensure,
name => 'networking-vpp-agent',
enable => $enabled,
}
}
|