Make ironic-inspector's listen_address configurable
Change-Id: Ibbab2f708f4db623de13ddc89de20fca039a2d15 Closes-Bug: #1603757
This commit is contained in:
@@ -25,6 +25,11 @@
|
||||
# (optional) Define if the service must be enabled or not
|
||||
# Defaults to true
|
||||
#
|
||||
# [*listen_address*]
|
||||
# (optional) The listen IP for the Ironic-inspector API server.
|
||||
# Should be an valid IP address
|
||||
# Defaults to $::os_service_default.
|
||||
#
|
||||
# [*pxe_transfer_protocol*]
|
||||
# (optional) Protocol to be used for transferring the ramdisk
|
||||
# Defaults to 'tftp'. Valid values are 'tftp' or 'http'.
|
||||
@@ -169,6 +174,7 @@
|
||||
class ironic::inspector (
|
||||
$package_ensure = 'present',
|
||||
$enabled = true,
|
||||
$listen_address = $::os_service_default,
|
||||
$pxe_transfer_protocol = 'tftp',
|
||||
$enable_uefi = false,
|
||||
$debug = undef,
|
||||
@@ -284,6 +290,7 @@ class ironic::inspector (
|
||||
}
|
||||
|
||||
ironic_inspector_config {
|
||||
'DEFAULT/listen_address': value => $listen_address;
|
||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||
'firewall/dnsmasq_interface': value => $dnsmasq_interface;
|
||||
'database/connection': value => $db_connection;
|
||||
|
@@ -90,6 +90,7 @@ describe 'ironic::inspector' do
|
||||
end
|
||||
|
||||
it 'configures inspector.conf' do
|
||||
is_expected.to contain_ironic_inspector_config('DEFAULT/listen_address').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_ironic_inspector_config('DEFAULT/auth_strategy').with_value(p[:auth_strategy])
|
||||
is_expected.to contain_ironic_inspector_config('keystone_authtoken/auth_type').with_value('password')
|
||||
is_expected.to contain_ironic_inspector_config('keystone_authtoken/auth_uri').with_value(p[:auth_uri])
|
||||
@@ -151,6 +152,7 @@ describe 'ironic::inspector' do
|
||||
before :each do
|
||||
params.merge!(
|
||||
:debug => true,
|
||||
:listen_address => '127.0.0.1',
|
||||
:auth_uri => 'http://192.168.0.1:5000/v2.0',
|
||||
:identity_uri => 'http://192.168.0.1:35357',
|
||||
:admin_password => 'password',
|
||||
@@ -166,6 +168,7 @@ describe 'ironic::inspector' do
|
||||
)
|
||||
end
|
||||
it 'should replace default parameter with new value' do
|
||||
is_expected.to contain_ironic_inspector_config('DEFAULT/listen_address').with_value(p[:listen_address])
|
||||
is_expected.to contain_ironic_inspector_config('DEFAULT/debug').with_value(p[:debug])
|
||||
is_expected.to contain_ironic_inspector_config('keystone_authtoken/auth_uri').with_value(p[:auth_uri])
|
||||
is_expected.to contain_ironic_inspector_config('keystone_authtoken/auth_url').with_value(p[:identity_uri])
|
||||
|
Reference in New Issue
Block a user