- Remove ELAN manager config for SFC
2018-05-23 Release 8.2.0
- Configure tos option to support QoS DSCP marking
+2018-06-28 Release 8.2.1
+- Bind karaf shell to ODL bind IP
]
}
+ # Configure karaf bind IP
+ file_line { 'set karaf IP':
+ ensure => present,
+ path => '/opt/opendaylight/etc/org.apache.karaf.shell.cfg',
+ line => "sshHost = ${opendaylight::odl_bind_ip}",
+ match => '^sshHost\s*=.*$',
+ }
+
file_line { 'set pax bind IP':
ensure => present,
path => '/opt/opendaylight/etc/org.ops4j.pax.web.cfg',
{
"name": "opendaylight-opendaylight",
- "version": "8.2.0",
+ "version": "8.2.1",
"author": "Daniel Farrell",
"summary": "Puppet module that installs and configures the OpenDaylight SDN controller",
"license": "BSD-2-Clause",
end
end
+ describe 'testing binding ODL to an IP' do
+ install_odl(odl_bind_ip: '127.0.0.1')
+ context 'using specific IP for ODL' do
+ odl_bind_ip_validation(odl_bind_ip: '127.0.0.1')
+ end
+ end
+
describe 'testing custom logging verbosity' do
context 'using default log levels' do
# Call specialized helper fn to install OpenDaylight
end
end
- # All ODL REST port tests
- describe 'REST port tests' do
+ # All ODL IP/REST port tests
+ describe 'IP and REST port tests' do
# Non-OS-type tests assume CentOS 7
# See issue #43 for reasoning:
# https://github.com/dfarrell07/puppet-opendaylight/issues/43#issue-57343159
'line' => "org.ops4j.pax.web.listening.addresses = #{odl_bind_ip}",
'require' => 'File[org.ops4j.pax.web.cfg]'
)
+ should contain_file_line('set karaf IP').with(
+ 'ensure' => 'present',
+ 'path' => '/opt/opendaylight/etc/org.apache.karaf.shell.cfg',
+ 'line' => "sshHost = #{odl_bind_ip}",
+ 'match' => '^sshHost\s*=.*$',
+ )
}
else
it {
end
end
+# Shared function for validations related to the ODL bind IP
+def odl_bind_ip_validation(options = {})
+ # NB: This param default should match the one used by the opendaylight
+ # class, which is defined in opendaylight::params
+ # TODO: Remove this possible source of bugs^^
+ odl_bind_ip = options.fetch(:odl_bind_ip, '0.0.0.0')
+
+ if odl_bind_ip != '0.0.0.0'
+ describe file('/opt/opendaylight/etc/org.apache.karaf.shell.cfg') do
+ it { should be_file }
+ it { should be_owned_by 'odl' }
+ it { should be_grouped_into 'odl' }
+ its(:content) { should match /sshHost = #{odl_bind_ip}/ }
+ end
+
+ describe command("loop_count=0; until [[ \$loop_count -ge 30 ]]; do netstat -punta | grep 8101 | grep #{odl_bind_ip} && break; loop_count=\$[\$loop_count+1]; sleep 1; done; echo \"Waited \$loop_count seconds to detect ODL karaf bound to IP\"") do
+ its(:exit_status) { should eq 0 }
+ end
+ end
+end
+
# Shared function for validations related to custom logging verbosity
def log_level_validations(options = {})
# NB: This param default should match the one used by the opendaylight