8ce1ea3d93
Change sdn authentication from basic(username, password) to token authentication, deprecate username and password and add a new parameter token Depends-on: https://review.opendev.org/814557 Change-Id: Ie8b347a4705045dfa0363284ec41e9e519ec19f9
52 lines
1.3 KiB
Ruby
52 lines
1.3 KiB
Ruby
require 'spec_helper'
|
|
|
|
describe 'neutron::plugins::ml2::mellanox::mlnx_sdn_assist' do
|
|
let :pre_condition do
|
|
"class { 'neutron::keystone::authtoken':
|
|
password => 'passw0rd',
|
|
}
|
|
class { 'neutron::server': }
|
|
class { 'neutron':
|
|
core_plugin => 'ml2'
|
|
}"
|
|
end
|
|
|
|
let :default_params do
|
|
{
|
|
:sdn_url => '<SERVICE DEFAULT>',
|
|
}
|
|
end
|
|
|
|
let :params do
|
|
{
|
|
:sdn_token => 'token',
|
|
}
|
|
end
|
|
|
|
shared_examples 'neutron plugin mellanox ml2 mlnx_sdn_assist' do
|
|
before do
|
|
params.merge!(default_params)
|
|
end
|
|
|
|
it 'configures sdn settings' do
|
|
should contain_neutron_plugin_ml2('sdn/token').with_value(params[:sdn_token]).with_secret(true)
|
|
should contain_neutron_plugin_ml2('sdn/url').with_value(params[:sdn_url])
|
|
should contain_neutron_plugin_ml2('sdn/sync_enabled').with_value('true')
|
|
should contain_neutron_plugin_ml2('sdn/bind_normal_ports').with_value('false')
|
|
should contain_neutron_plugin_ml2('sdn/bind_normal_ports_physnets').with_value([])
|
|
end
|
|
end
|
|
|
|
on_supported_os({
|
|
:supported_os => OSDefaults.get_supported_os
|
|
}).each do |os,facts|
|
|
context "on #{os}" do
|
|
let (:facts) do
|
|
facts.merge!(OSDefaults.get_facts())
|
|
end
|
|
|
|
it_behaves_like 'neutron plugin mellanox ml2 mlnx_sdn_assist'
|
|
end
|
|
end
|
|
end
|