Default: `stateful`
-Valid options: `transparent`, `learn`, `statless`
+Valid options: `transparent`, `learn`, `stateless`
##### `vpp_routing_node`
Valid options: A valid host name to a VPP node handling routing.
+##### `java_opts`
+
+Specifies the Java options to run ODL with as a string.
+
+Default: `'-Djava.net.preferIPv4Stack=true'`
+
+Valid options: A string of valid Java options.
+
## Limitations
- Tested on Fedora 22, 23, CentOS 7 and Ubuntu 14.04.
# Sets the mode to use for security groups (stateful, learn, stateless, transparent)
# [*vpp_routing_node*]
# Sets routing node for VPP deployments. Defaults to ''.
+# [*java_opts*]
+# Sets Java options for ODL in a string format. Defaults to '-Djava.net.preferIPv4Stack=true'.
#
class opendaylight (
$default_features = $::opendaylight::params::default_features,
$ha_node_index = $::opendaylight::params::ha_node_index,
$security_group_mode = $::opendaylight::params::security_group_mode,
$vpp_routing_node = $::opendaylight::params::vpp_routing_node,
+ $java_opts = $::opendaylight::params::java_opts,
) inherits ::opendaylight::params {
# Validate OS family
require => Yumrepo[$opendaylight::rpm_repo],
}
->
- # Configure the systemd file to force ipv4 binds (instead of ipv6)
- file_line { 'odl_start_ipv4':
+ # Configure the systemd file with Java options
+ file_line { 'java_options_systemd':
ensure => present,
path => '/usr/lib/systemd/system/opendaylight.service',
- line => 'Environment=_JAVA_OPTIONS=\'-Djava.net.preferIPv4Stack=true\'',
+ line => "Environment=_JAVA_OPTIONS=\'${opendaylight::java_opts}\'",
+ match => '^Environment.*',
after => 'ExecStart=/opt/opendaylight/bin/start',
}
->
$ha_node_index = 0
$security_group_mode = 'stateful'
$vpp_routing_node = ''
+ $java_opts = '-Djava.net.preferIPv4Stack=true'
}
def rpm_install_tests(options = {})
# Extract params
rpm_repo = options.fetch(:rpm_repo, 'opendaylight-5-testing')
+ java_opts = options.fetch(:java_opts, '-Djava.net.preferIPv4Stack=true')
# Default to CentOS 7 Yum repo URL
}
it {
- should contain_file_line('odl_start_ipv4').with(
+ should contain_file_line('java_options_systemd').with(
'ensure' => 'present',
'path' => '/usr/lib/systemd/system/opendaylight.service',
- 'line' => 'Environment=_JAVA_OPTIONS=\'-Djava.net.preferIPv4Stack=true\'',
+ 'line' => "Environment=_JAVA_OPTIONS=\'#{java_opts}\'",
'after' => 'ExecStart=/opt/opendaylight/bin/start',
)
}