Do not hard-code default of listen/port parameters
The current default values are same as the service defaults, thus can be replaced by $::os_service_default. Change-Id: Iccee55261472221769b549d0617cf1c8bf274e65
This commit is contained in:
parent
3db9d7694e
commit
a383e17b97
@ -22,15 +22,15 @@
|
||||
#
|
||||
# [*api_bind_address*]
|
||||
# (optional) IP address for nova-api server to listen
|
||||
# Defaults to '0.0.0.0'
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*metadata_listen*]
|
||||
# (optional) IP address for metadata server to listen
|
||||
# Defaults to '0.0.0.0'
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*metadata_listen_port*]
|
||||
# (optional) The port on which the metadata API will listen.
|
||||
# Defaults to 8775
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*enabled_apis*]
|
||||
# (optional) A list of apis to enable
|
||||
@ -47,7 +47,7 @@
|
||||
#
|
||||
# [*osapi_compute_listen_port*]
|
||||
# (optional) The port on which the OpenStack API will listen.
|
||||
# Defaults to port 8774
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*metadata_workers*]
|
||||
# (optional) Number of workers for metadata service
|
||||
@ -195,10 +195,10 @@ class nova::api(
|
||||
$manage_service = true,
|
||||
$api_paste_config = 'api-paste.ini',
|
||||
$ensure_package = 'present',
|
||||
$api_bind_address = '0.0.0.0',
|
||||
$osapi_compute_listen_port = 8774,
|
||||
$metadata_listen = '0.0.0.0',
|
||||
$metadata_listen_port = 8775,
|
||||
$api_bind_address = $::os_service_default,
|
||||
$osapi_compute_listen_port = $::os_service_default,
|
||||
$metadata_listen = $::os_service_default,
|
||||
$metadata_listen_port = $::os_service_default,
|
||||
$enabled_apis = ['osapi_compute', 'metadata'],
|
||||
$use_forwarded_for = false,
|
||||
$osapi_compute_workers = $::os_workers,
|
||||
|
@ -47,10 +47,10 @@ describe 'nova::api' do
|
||||
it 'configures various stuff' do
|
||||
is_expected.to contain_nova_config('DEFAULT/instance_name_template').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('wsgi/api_paste_config').with_value('api-paste.ini')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen').with_value('0.0.0.0')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with_value('8774')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_listen').with_value('0.0.0.0')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_listen_port').with_value('8775')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_listen_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_listen').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_listen_port').with_value('<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with_value('5')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_workers').with_value('5')
|
||||
is_expected.to contain_oslo__middleware('nova_config').with(
|
||||
|
Loading…
Reference in New Issue
Block a user