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:
Michael Chapman
2014-02-28 02:54:42 +11:00
parent 324bd9a325
commit 3e9b901d04
2 changed files with 27 additions and 1 deletions

View File

@@ -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;
}
}

View File

@@ -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