Support [DEFAULT] admin_only_metadata
Change-Id: I50a773a189f800193207bed1a4ded6b1f7236490
This commit is contained in:
parent
6d51d11354
commit
d3c1479600
@ -67,6 +67,10 @@
|
||||
# (optional) Number of manila-api workers
|
||||
# Defaults to $facts['os_workers']
|
||||
#
|
||||
# [*admin_only_metadata*]
|
||||
# (optional) Metadata keys that should only be manipulated by administrators.
|
||||
# Defaults to $facts['os_service_default'].
|
||||
#
|
||||
class manila::api (
|
||||
$auth_strategy = 'keystone',
|
||||
$package_ensure = 'present',
|
||||
@ -82,6 +86,7 @@ class manila::api (
|
||||
$max_request_body_size = $facts['os_service_default'],
|
||||
$enabled_share_protocols = $facts['os_service_default'],
|
||||
$service_workers = $facts['os_workers'],
|
||||
$admin_only_metadata = $facts['os_service_default'],
|
||||
) inherits manila::params {
|
||||
|
||||
include manila::deps
|
||||
@ -150,6 +155,7 @@ server.")
|
||||
'DEFAULT/enabled_share_protocols': value => join(any2array($enabled_share_protocols), ',');
|
||||
'DEFAULT/default_share_type': value => $default_share_type;
|
||||
'DEFAULT/osapi_share_workers': value => $service_workers;
|
||||
'DEFAULT/admin_only_metadata': value => join(any2array($admin_only_metadata), ',');
|
||||
}
|
||||
|
||||
oslo::middleware { 'manila_config':
|
||||
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The new ``manila::api::admin_only_metadata`` parameter has been added.
|
@ -36,6 +36,7 @@ describe 'manila::api' do
|
||||
)
|
||||
is_expected.to contain_manila_config('DEFAULT/default_share_type').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_manila_config('DEFAULT/osapi_share_workers').with(:value => '2')
|
||||
is_expected.to contain_manila_config('DEFAULT/admin_only_metadata').with(:value => '<SERVICE DEFAULT>')
|
||||
is_expected.to contain_manila_api_paste_ini('filter:ratelimit/paste.filter_factory').with_ensure('absent')
|
||||
is_expected.to contain_manila_api_paste_ini('filter:ratelimit/limits').with_ensure('absent')
|
||||
end
|
||||
@ -205,6 +206,20 @@ describe 'manila::api' do
|
||||
is_expected.to contain_manila_config('DEFAULT/enabled_share_protocols').with_value('NFS,CIFS')
|
||||
end
|
||||
end
|
||||
|
||||
context 'admin_only_metadata is set' do
|
||||
let :params do
|
||||
req_params.merge!({
|
||||
:admin_only_metadata => ['__affinity_same_host', '__affinity_different_host']
|
||||
})
|
||||
end
|
||||
|
||||
it 'configures enabled_share_protocols' do
|
||||
is_expected.to contain_manila_config('DEFAULT/admin_only_metadata').with_value(
|
||||
'__affinity_same_host,__affinity_different_host'
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
on_supported_os({
|
||||
|
Loading…
x
Reference in New Issue
Block a user