Add more settings to glance-api

Add settings
 * location_strategy
 * show_multiple_locations

Change-Id: I64b1d5a29faeed98316d4f44c9f24bf2f82a3d35
This commit is contained in:
Jake Yip 2015-12-21 17:28:43 +11:00
parent d59acd2211
commit 8b4b305bc8
2 changed files with 29 additions and 10 deletions

View File

@ -181,6 +181,15 @@
# (optional) Expose image location to trusted clients.
# Defaults to false.
#
# [*show_multiple_locations*]
# (optional) Whether to include the backend image locations in image
# properties.
# Defaults to $::os_service_default.
#
# [*location_strategy*]
# (optional) Strategy used to determine the image location order.
# Defaults to $::os_service_default.
#
# [*purge_config*]
# (optional) Whether to set only the specified config options
# in the api config.
@ -271,6 +280,8 @@ class glance::api(
$use_stderr = undef,
$log_facility = undef,
$show_image_direct_url = false,
$show_multiple_locations = $::os_service_default,
$location_strategy = $::os_service_default,
$purge_config = false,
$cert_file = false,
$key_file = false,
@ -336,16 +347,18 @@ class glance::api(
# basic service config
glance_api_config {
'DEFAULT/bind_host': value => $bind_host;
'DEFAULT/bind_port': value => $bind_port;
'DEFAULT/backlog': value => $backlog;
'DEFAULT/workers': value => $workers;
'DEFAULT/show_image_direct_url': value => $show_image_direct_url;
'DEFAULT/scrub_time': value => $scrub_time;
'DEFAULT/delayed_delete': value => $delayed_delete;
'DEFAULT/image_cache_dir': value => $image_cache_dir;
'DEFAULT/auth_region': value => $auth_region;
'glance_store/os_region_name': value => $os_region_name;
'DEFAULT/bind_host': value => $bind_host;
'DEFAULT/bind_port': value => $bind_port;
'DEFAULT/backlog': value => $backlog;
'DEFAULT/workers': value => $workers;
'DEFAULT/show_image_direct_url': value => $show_image_direct_url;
'DEFAULT/show_multiple_locations': value => $show_multiple_locations;
'DEFAULT/location_strategy': value => $location_strategy;
'DEFAULT/scrub_time': value => $scrub_time;
'DEFAULT/delayed_delete': value => $delayed_delete;
'DEFAULT/image_cache_dir': value => $image_cache_dir;
'DEFAULT/auth_region': value => $auth_region;
'glance_store/os_region_name': value => $os_region_name;
}
# known_stores config

View File

@ -35,6 +35,8 @@ describe 'glance::api' do
:keystone_password => 'ChangeMe',
:token_cache_time => '<SERVICE DEFAULT>',
:show_image_direct_url => false,
:show_multiple_locations => '<SERVICE DEFAULT>',
:location_strategy => '<SERVICE DEFAULT>',
:purge_config => false,
:known_stores => false,
:delayed_delete => '<SERVICE DEFAULT>',
@ -70,6 +72,8 @@ describe 'glance::api' do
:keystone_password => 'ChangeMe2',
:token_cache_time => '300',
:show_image_direct_url => true,
:show_multiple_locations => true,
:location_strategy => 'store_type',
:delayed_delete => 'true',
:scrub_time => '10',
:image_cache_dir => '/tmp/glance',
@ -116,6 +120,8 @@ describe 'glance::api' do
'registry_port',
'registry_client_protocol',
'show_image_direct_url',
'show_multiple_locations',
'location_strategy',
'delayed_delete',
'scrub_time',
'image_cache_dir',