From 0b0f6289e1e005ad7f3630e038d3d4634e663b54 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Tue, 27 Sep 2016 11:05:33 -0400 Subject: [PATCH] Add options to configure yaql settings Change-Id: Id41001d74ce1008dbb5a98b962d5c53dbf39c903 --- manifests/init.pp | 14 ++++++++++++++ .../yaql_config_options-d25ae9c0bd25706f.yaml | 4 ++++ spec/classes/heat_init_spec.rb | 10 ++++++++++ 3 files changed, 28 insertions(+) create mode 100644 releasenotes/notes/yaql_config_options-d25ae9c0bd25706f.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 4807991b..329cf3fa 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -290,6 +290,16 @@ # (optional) Type of authentication to use # Defaults to 'keystone' # +# [*yaql_limit_iterators*] +# (optional) The maximum number of elements YAQL collection expressions can +# take for evaluation. +# Defaults to $::os_service_default. +# +# [*yaql_memory_quota*] +# (optional) The maximum size of memory in bytes that YAQL expressions can +# take for evaluation. +# Defaults to $::os_service_default. +# # DEPRECATED PARAMETERS # # [*verbose*] @@ -408,6 +418,8 @@ class heat( $heat_clients_url = $::os_service_default, $purge_config = false, $auth_strategy = 'keystone', + $yaql_memory_quota = $::os_service_default, + $yaql_limit_iterators = $::os_service_default, # Deprecated $verbose = undef, $auth_uri = undef, @@ -573,6 +585,8 @@ class heat( 'DEFAULT/enable_stack_adopt': value => $enable_stack_adopt; 'ec2authtoken/auth_uri': value => $keystone_ec2_uri; 'paste_deploy/flavor': value => $flavor; + 'yaql/limit_iterators': value => $yaql_limit_iterators; + 'yaql/memory_quota': value => $yaql_memory_quota; } oslo::messaging::notifications { 'heat_config': diff --git a/releasenotes/notes/yaql_config_options-d25ae9c0bd25706f.yaml b/releasenotes/notes/yaql_config_options-d25ae9c0bd25706f.yaml new file mode 100644 index 00000000..b19d25c8 --- /dev/null +++ b/releasenotes/notes/yaql_config_options-d25ae9c0bd25706f.yaml @@ -0,0 +1,4 @@ +--- +features: + - Allows configuration of [yaql] settings to control + memory_quota and limit_iterators settings. diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index 9c588b4d..bae11691 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -20,6 +20,8 @@ describe 'heat' do :keystone_password => 'secretpassword', :heat_clients_url => '', :purge_config => false, + :yaql_limit_iterators => 400, + :yaql_memory_quota => 20000, } end @@ -135,6 +137,14 @@ describe 'heat' do is_expected.to contain_heat_config('ec2authtoken/auth_uri').with_value( params[:keystone_ec2_uri] ) end + it 'configures yaql_limit_iterators' do + is_expected.to contain_heat_config('yaql/limit_iterators').with_value( params[:yaql_limit_iterators] ) + end + + it 'configures yaql_memory_quota' do + is_expected.to contain_heat_config('yaql/memory_quota').with_value( params[:yaql_memory_quota] ) + end + it { is_expected.to contain_heat_config('paste_deploy/flavor').with_value('keystone') } it 'configures notification_driver' do