Adds misc options

This change adds support for miscellaneous options to be set.
Things that haven't been added as attributes, or specifically,
third party additions that don't belong in stackforge.

Change-Id: I482c5d15e5d1ad853d1a1792f3e39a45f7911dd4
This commit is contained in:
Chen Zhiwei 2014-10-10 05:43:15 +00:00
parent c7f0bb2e0e
commit eeff4d73a0
5 changed files with 27 additions and 0 deletions

View File

@ -13,6 +13,7 @@ This file is used to list changes made in each version of cookbook-openstack-orc
* Create role and domain setup for heat template defined users
* Add cert_file, key_file, ca_file and insecure for clients so that they are configurable.
* Make 3 schemes configurable instead of being the hardcoded http
* Add misc options for heat.conf
## 9.2.0
* python_packages database client attributes have been migrated to

View File

@ -139,6 +139,13 @@ The following attributes are defined in attributes/default.rb of the common cook
If the value of the 'bind_interface' attribute is non-nil, then the service will be bound to the first IP address on that interface. If the value of the 'bind_interface' attribute is nil, then the service will be bound to the IP address specifie>
Miscellaneous Options
---------------------
Arrays whose elements will be copied exactly into the respective config files (contents e.g. ['option1=value1', 'option2=value2']).
* `openstack["orchestration"]["misc_heat"]` - Array of bare options for `heat.conf`.
Testing
=====

View File

@ -112,6 +112,9 @@ default['openstack']['orchestration']['default_publisher_id'] = ''
default['openstack']['orchestration']['list_notifier_drivers'] = 'heat.openstack.common.notifier.no_op_notifier'
default['openstack']['orchestration']['notification_topics'] = 'notifications'
# Array of options for `heat.conf` (e.g. ['option1=value1', 'option2=value2'])
default['openstack']['orchestration']['misc_heat'] = nil
# platform-specific settings
case platform_family
when 'fedora', 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this

View File

@ -31,5 +31,15 @@ describe 'openstack-orchestration::common' do
expect(chef_run).not_to upgrade_package 'python-ibm-db'
expect(chef_run).not_to upgrade_package 'python-ibm-db-sa'
end
describe 'heat.conf' do
let(:file) { chef_run.template('/etc/heat/heat.conf') }
it 'adds misc_heat array correctly' do
node.set['openstack']['orchestration']['misc_heat'] = ['MISC_OPTION=FOO']
expect(chef_run).to render_file(file.name).with_content('MISC_OPTION=FOO')
end
end
end
end

View File

@ -575,6 +575,12 @@ log_config = /etc/openstack/logging.conf
# (string value)
#policy_default_rule=default
<% if node["openstack"]["orchestration"]["misc_heat"] %>
##### THIRD PARTY ADDITIONS #####
<% node["openstack"]["orchestration"]["misc_heat"].each do |m| %>
<%= m %>
<% end %>
<% end %>
[auth_password]