Add nova-objectstore bind address
This patch provides an additional parameter that allows the user to specify a bind address for the objectstore service. Change-Id: Ib6d3ba0edd7d0b554231d6db1125e963843c9795
This commit is contained in:
@@ -16,10 +16,15 @@
|
||||
# (optional) The package state to set
|
||||
# Defaults to 'present'
|
||||
#
|
||||
# [*bind_address*]
|
||||
# (optional) The address to bind to
|
||||
# Defaults to '0.0.0.0'
|
||||
#
|
||||
class nova::objectstore(
|
||||
$enabled = false,
|
||||
$manage_service = true,
|
||||
$ensure_package = 'present'
|
||||
$ensure_package = 'present',
|
||||
$bind_address = '0.0.0.0'
|
||||
) {
|
||||
|
||||
include nova::params
|
||||
@@ -32,4 +37,7 @@ class nova::objectstore(
|
||||
ensure_package => $ensure_package,
|
||||
}
|
||||
|
||||
nova_config {
|
||||
'DEFAULT/s3_listen': value => $bind_address;
|
||||
}
|
||||
}
|
||||
|
@@ -15,6 +15,15 @@ describe 'nova::objectstore' do
|
||||
:name => 'nova-objectstore',
|
||||
:package_name => 'nova-objectstore',
|
||||
:service_name => 'nova-objectstore' }
|
||||
it { should contain_nova_config('DEFAULT/s3_listen').with_value('0.0.0.0') }
|
||||
|
||||
context 'with custom bind parameter' do
|
||||
let :params do
|
||||
{ :bind_address => '192.168.0.1'}
|
||||
end
|
||||
it { should contain_nova_config('DEFAULT/s3_listen').with_value('192.168.0.1') }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
context 'on RedHat platforms' do
|
||||
@@ -26,5 +35,14 @@ describe 'nova::objectstore' do
|
||||
:name => 'nova-objectstore',
|
||||
:package_name => 'openstack-nova-objectstore',
|
||||
:service_name => 'openstack-nova-objectstore' }
|
||||
it { should contain_nova_config('DEFAULT/s3_listen').with_value('0.0.0.0')}
|
||||
|
||||
context 'with custom bind parameter' do
|
||||
let :params do
|
||||
{ :bind_address => '192.168.0.1'}
|
||||
end
|
||||
it { should contain_nova_config('DEFAULT/s3_listen').with_value('192.168.0.1') }
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user