Add related parameters to nova::api class
This patch is aim to add following params in nova::api class - metadata_cache_expiration - vendordata_jsonfile_path - osapi_max_limit - osapi_compute_link_prefix - osapi_glance_link_prefix Change-Id: Ib3f3d9b7d8874c235c9a90dc392a7cf436c0154c Closes-Bug: #1597988
This commit is contained in:
parent
a7bdcd95c4
commit
f040ced872
@ -146,6 +146,32 @@
|
||||
# to make nova be a web app using apache mod_wsgi.
|
||||
# Defaults to '$::nova::params::api_service_name'
|
||||
#
|
||||
# [*metadata_cache_expiration*]
|
||||
# (optional) This option is the time (in seconds) to cache metadata.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*vendordata_jsonfile_path*]
|
||||
# (optional) Represent the path to the data file.
|
||||
# Cloud providers may store custom data in vendor data file that will then be
|
||||
# available to the instances via the metadata service, and to the rendering of
|
||||
# config-drive. The default class for this, JsonFileVendorData, loads this
|
||||
# information from a JSON file, whose path is configured by this option
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*osapi_max_limit*]
|
||||
# (optional) This option is limit the maximum number of items in a single response.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*osapi_compute_link_prefix*]
|
||||
# (optional) This string is prepended to the normal URL that is returned in links
|
||||
# to the OpenStack Compute API.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# [*osapi_glance_link_prefix*]
|
||||
# (optional) This string is prepended to the normal URL that is returned in links
|
||||
# to Glance resources.
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
# DEPRECATED
|
||||
#
|
||||
# [*keystone_ec2_url*]
|
||||
@ -210,6 +236,11 @@ class nova::api(
|
||||
$fping_path = '/usr/sbin/fping',
|
||||
$service_name = $::nova::params::api_service_name,
|
||||
$enable_proxy_headers_parsing = $::os_service_default,
|
||||
$metadata_cache_expiration = $::os_service_default,
|
||||
$vendordata_jsonfile_path = $::os_service_default,
|
||||
$osapi_max_limit = $::os_service_default,
|
||||
$osapi_compute_link_prefix = $::os_service_default,
|
||||
$osapi_glance_link_prefix = $::os_service_default,
|
||||
# DEPRECATED PARAMETER
|
||||
$conductor_workers = undef,
|
||||
$ec2_listen_port = undef,
|
||||
@ -309,6 +340,11 @@ class nova::api(
|
||||
'DEFAULT/use_forwarded_for': value => $use_forwarded_for;
|
||||
'DEFAULT/default_floating_pool': value => $default_floating_pool;
|
||||
'DEFAULT/fping_path': value => $fping_path;
|
||||
'DEFAULT/metadata_cache_expiration': value => $metadata_cache_expiration;
|
||||
'DEFAULT/vendordata_jsonfile_path': value => $vendordata_jsonfile_path;
|
||||
'DEFAULT/osapi_max_limit': value => $osapi_max_limit;
|
||||
'DEFAULT/osapi_compute_link_prefix': value => $osapi_compute_link_prefix;
|
||||
'DEFAULT/osapi_glance_link_prefix': value => $osapi_glance_link_prefix;
|
||||
}
|
||||
|
||||
oslo::middleware {'nova_config':
|
||||
|
@ -63,6 +63,11 @@ describe 'nova::api' do
|
||||
is_expected.to contain_nova_config('DEFAULT/default_floating_pool').with('value' => 'nova')
|
||||
is_expected.to contain_nova_config('DEFAULT/fping_path').with('value' => '/usr/sbin/fping')
|
||||
is_expected.to contain_nova_config('oslo_middleware/enable_proxy_headers_parsing').with('value' => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_cache_expiration').with('value' => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('DEFAULT/vendordata_jsonfile_path').with('value' => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_max_limit').with('value' => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_link_prefix').with('value' => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_glance_link_prefix').with('value' => '<SERVICE DEFAULT>')
|
||||
end
|
||||
|
||||
it 'unconfigures neutron_metadata proxy' do
|
||||
@ -93,6 +98,11 @@ describe 'nova::api' do
|
||||
:metadata_workers => 2,
|
||||
:default_floating_pool => 'public',
|
||||
:enable_proxy_headers_parsing => true,
|
||||
:metadata_cache_expiration => 15,
|
||||
:vendordata_jsonfile_path => '/tmp',
|
||||
:osapi_max_limit => 1000,
|
||||
:osapi_compute_link_prefix => 'https://10.0.0.1:7777/',
|
||||
:osapi_glance_link_prefix => 'https://10.0.0.1:6666/',
|
||||
:pci_alias => "[{\"vendor_id\":\"8086\",\"product_id\":\"0126\",\"name\":\"graphic_card\"},{\"vendor_id\":\"9096\",\"product_id\":\"1520\",\"name\":\"network_card\"}]"
|
||||
})
|
||||
end
|
||||
@ -137,6 +147,11 @@ describe 'nova::api' do
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_workers').with('value' => '1')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_workers').with('value' => '2')
|
||||
is_expected.to contain_nova_config('DEFAULT/default_floating_pool').with('value' => 'public')
|
||||
is_expected.to contain_nova_config('DEFAULT/metadata_cache_expiration').with('value' => '15')
|
||||
is_expected.to contain_nova_config('DEFAULT/vendordata_jsonfile_path').with('value' => '/tmp')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_max_limit').with('value' => '1000')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_compute_link_prefix').with('value' => 'https://10.0.0.1:7777/')
|
||||
is_expected.to contain_nova_config('DEFAULT/osapi_glance_link_prefix').with('value' => 'https://10.0.0.1:6666/')
|
||||
is_expected.to contain_nova_config('neutron/service_metadata_proxy').with('value' => true)
|
||||
is_expected.to contain_nova_config('neutron/metadata_proxy_shared_secret').with('value' => 'secrete')
|
||||
is_expected.to contain_nova_config('oslo_middleware/enable_proxy_headers_parsing').with('value' => true)
|
||||
|
Loading…
Reference in New Issue
Block a user