Migrate configuration options related to eventlet server from DEFAULT
This patch migrates configuration options related to eventlet server from DEFAULT section to eventlet_server, as the ones in DEFAULT section was deprecated[1] [1] I6dd718c4d54056d0e29978f393ec45f7291f802d Change-Id: I1a726c706f509f2a2be68098cda8431cddc0fe92
This commit is contained in:
parent
512c635280
commit
a4f74ef5fa
|
@ -175,8 +175,8 @@ class Puppet::Provider::Keystone < Puppet::Provider::Openstack
|
|||
if url = get_section('DEFAULT', 'public_endpoint')
|
||||
endpoint = url.chomp('/')
|
||||
else
|
||||
public_port = get_section('DEFAULT', 'public_port') || '5000'
|
||||
host = clean_host(get_section('DEFAULT', 'public_bind_host'))
|
||||
public_port = get_section('eventlet_server', 'public_port') || '5000'
|
||||
host = clean_host(get_section('eventlet_server', 'public_bind_host'))
|
||||
protocol = ssl? ? 'https' : 'http'
|
||||
endpoint = "#{protocol}://#{host}:#{public_port}"
|
||||
end
|
||||
|
|
|
@ -757,10 +757,6 @@ admin_token will be removed in a later release")
|
|||
|
||||
keystone_config {
|
||||
'DEFAULT/admin_token': value => $admin_token, secret => true;
|
||||
'DEFAULT/public_bind_host': value => $public_bind_host;
|
||||
'DEFAULT/admin_bind_host': value => $admin_bind_host;
|
||||
'DEFAULT/public_port': value => $public_port;
|
||||
'DEFAULT/admin_port': value => $admin_port;
|
||||
'DEFAULT/member_role_id': value => $member_role_id;
|
||||
'DEFAULT/member_role_name': value => $member_role_name;
|
||||
}
|
||||
|
@ -894,8 +890,12 @@ admin_token will be removed in a later release")
|
|||
}
|
||||
|
||||
keystone_config {
|
||||
'eventlet_server/admin_workers': value => $admin_workers;
|
||||
'eventlet_server/public_workers': value => $public_workers;
|
||||
'eventlet_server/public_bind_host': value => $public_bind_host;
|
||||
'eventlet_server/admin_bind_host': value => $admin_bind_host;
|
||||
'eventlet_server/public_port': value => $public_port;
|
||||
'eventlet_server/admin_port': value => $admin_port;
|
||||
'eventlet_server/admin_workers': value => $admin_workers;
|
||||
'eventlet_server/public_workers': value => $public_workers;
|
||||
}
|
||||
|
||||
if $manage_service {
|
||||
|
|
|
@ -149,10 +149,6 @@ describe 'keystone' do
|
|||
|
||||
it 'should contain correct config' do
|
||||
[
|
||||
'public_bind_host',
|
||||
'admin_bind_host',
|
||||
'public_port',
|
||||
'admin_port',
|
||||
'member_role_id',
|
||||
'member_role_name',
|
||||
].each do |config|
|
||||
|
@ -215,7 +211,16 @@ describe 'keystone' do
|
|||
is_expected.to contain_keystone_config('DEFAULT/max_token_size').with_value('<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
it 'should ensure proper setting of admin_workers and public_workers' do
|
||||
it 'should contain correct eventlet server config' do
|
||||
[
|
||||
'public_bind_host',
|
||||
'admin_bind_host',
|
||||
'public_port',
|
||||
'admin_port',
|
||||
].each do |config|
|
||||
is_expected.to contain_keystone_config("eventlet_server/#{config}").with_value(param_hash[config])
|
||||
end
|
||||
|
||||
if param_hash['admin_workers']
|
||||
is_expected.to contain_keystone_config('eventlet_server/admin_workers').with_value(param_hash['admin_workers'])
|
||||
else
|
||||
|
|
|
@ -171,7 +171,7 @@ id="the_user_id"
|
|||
end
|
||||
|
||||
it 'should use the specified bind_host in the public endpoint' do
|
||||
mock = {'DEFAULT' => {'public_bind_host' => '192.168.56.210', 'public_port' => '5001' }}
|
||||
mock = {'eventlet_server' => {'public_bind_host' => '192.168.56.210', 'public_port' => '5001' }}
|
||||
File.expects(:exists?).with("/etc/keystone/keystone.conf").returns(true)
|
||||
Puppet::Util::IniConfig::File.expects(:new).returns(mock)
|
||||
mock.expects(:read).with('/etc/keystone/keystone.conf')
|
||||
|
@ -179,7 +179,7 @@ id="the_user_id"
|
|||
end
|
||||
|
||||
it 'should use localhost in the public endpoint if bind_host is 0.0.0.0' do
|
||||
mock = {'DEFAULT' => { 'public_bind_host' => '0.0.0.0', 'public_port' => '5001' }}
|
||||
mock = {'eventlet_server' => { 'public_bind_host' => '0.0.0.0', 'public_port' => '5001' }}
|
||||
File.expects(:exists?).with("/etc/keystone/keystone.conf").returns(true)
|
||||
Puppet::Util::IniConfig::File.expects(:new).returns(mock)
|
||||
mock.expects(:read).with('/etc/keystone/keystone.conf')
|
||||
|
@ -187,7 +187,7 @@ id="the_user_id"
|
|||
end
|
||||
|
||||
it 'should use [::1] in the public endpoint if bind_host is ::0' do
|
||||
mock = {'DEFAULT' => { 'public_bind_host' => '::0', 'public_port' => '5001' }}
|
||||
mock = {'eventlet_server' => { 'public_bind_host' => '::0', 'public_port' => '5001' }}
|
||||
File.expects(:exists?).with("/etc/keystone/keystone.conf").returns(true)
|
||||
Puppet::Util::IniConfig::File.expects(:new).returns(mock)
|
||||
mock.expects(:read).with('/etc/keystone/keystone.conf')
|
||||
|
@ -195,7 +195,7 @@ id="the_user_id"
|
|||
end
|
||||
|
||||
it 'should use [2620:52:0:23a9::25] in the public endpoint if bind_host is 2620:52:0:23a9::25' do
|
||||
mock = {'DEFAULT' => { 'public_bind_host' => '2620:52:0:23a9::25', 'public_port' => '5001' }}
|
||||
mock = {'eventlet_server' => { 'public_bind_host' => '2620:52:0:23a9::25', 'public_port' => '5001' }}
|
||||
File.expects(:exists?).with("/etc/keystone/keystone.conf").returns(true)
|
||||
Puppet::Util::IniConfig::File.expects(:new).returns(mock)
|
||||
mock.expects(:read).with('/etc/keystone/keystone.conf')
|
||||
|
@ -203,7 +203,7 @@ id="the_user_id"
|
|||
end
|
||||
|
||||
it 'should use localhost in the public endpoint if bind_host is unspecified' do
|
||||
mock = {'DEFAULT' => { 'public_port' => '5001' }}
|
||||
mock = {'eventlet_server' => { 'public_port' => '5001' }}
|
||||
File.expects(:exists?).with("/etc/keystone/keystone.conf").returns(true)
|
||||
Puppet::Util::IniConfig::File.expects(:new).returns(mock)
|
||||
mock.expects(:read).with('/etc/keystone/keystone.conf')
|
||||
|
@ -211,7 +211,7 @@ id="the_user_id"
|
|||
end
|
||||
|
||||
it 'should use https if ssl is enabled' do
|
||||
mock = {'DEFAULT' => {'public_bind_host' => '192.168.56.210', 'public_port' => '5001' }, 'ssl' => {'enable' => 'True'}}
|
||||
mock = {'eventlet_server' => {'public_bind_host' => '192.168.56.210', 'public_port' => '5001' }, 'ssl' => {'enable' => 'True'}}
|
||||
File.expects(:exists?).with("/etc/keystone/keystone.conf").returns(true)
|
||||
Puppet::Util::IniConfig::File.expects(:new).returns(mock)
|
||||
mock.expects(:read).with('/etc/keystone/keystone.conf')
|
||||
|
@ -219,7 +219,7 @@ id="the_user_id"
|
|||
end
|
||||
|
||||
it 'should use http if ssl is disabled' do
|
||||
mock = {'DEFAULT' => {'public_bind_host' => '192.168.56.210', 'public_port' => '5001' }, 'ssl' => {'enable' => 'False'}}
|
||||
mock = {'eventlet_server' => {'public_bind_host' => '192.168.56.210', 'public_port' => '5001' }, 'ssl' => {'enable' => 'False'}}
|
||||
File.expects(:exists?).with("/etc/keystone/keystone.conf").returns(true)
|
||||
Puppet::Util::IniConfig::File.expects(:new).returns(mock)
|
||||
mock.expects(:read).with('/etc/keystone/keystone.conf')
|
||||
|
|
Loading…
Reference in New Issue