Merge "Fixes specifying OVSDB URIs with TLS for ODL OVS"

This commit is contained in:
Zuul 2018-01-25 18:34:50 +00:00 committed by Gerrit Code Review
commit de00e62822
3 changed files with 13 additions and 1 deletions

View File

@ -139,11 +139,15 @@ class neutron::plugins::ovs::opendaylight (
if $odl_ovsdb_iface =~ /^tcp/ {
warning('TLS enabled but odl_ovsdb_iface set to tcp. Will override to ssl')
$odl_ovsdb_iface_parsed = regsubst($odl_ovsdb_iface, '^tcp', 'ssl')
} else {
$odl_ovsdb_iface_parsed = $odl_ovsdb_iface
}
if $ovsdb_server_iface =~ /^ptcp/ {
warning('TLS enabled but ovsdb_server_iface set to ptcp. Will override to pssl')
$ovsdb_server_iface_parsed = regsubst($ovsdb_server_iface, '^ptcp', 'pssl')
} else {
$ovsdb_server_iface_parsed = $ovsdb_server_iface
}
if $odl_check_url =~ /^http:/ {

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue with using TLS and specifying ovsdb_server_iface and
the odl_ovsdb_iface parameters with the plugins::ovs::opendaylight
class.

View File

@ -150,7 +150,9 @@ describe 'neutron::plugins::ovs::opendaylight' do
shared_examples_for 'with TLS enabled' do
it 'configures OVS for ODL' do
is_expected.to contain_exec('Add trusted cert: dummy.crt')
is_expected.to contain_exec('Set OVS Manager to OpenDaylight')
is_expected.to contain_exec('Set OVS Manager to OpenDaylight').with(
:command => "ovs-vsctl set-manager pssl:6639:127.0.0.1 ssl:127.0.0.1:6640"
)
is_expected.to contain_vs_config('other_config:local_ip')
is_expected.not_to contain_vs_config('other_config:provider_mappings')
is_expected.to contain_vs_config('external_ids:odl_os_hostconfig_hostid')