Add attribute for notification_driver

- Add default ['openstack']['block-storage']['notification_driver'] attributes
- Value defaults to the same as before, so no change, but attribute can
  be overridden.
- Add test for the attribute
- Add README.md entry for the attribute

Change-Id: I3ee6f044a0d9d7a46f5e0225ae440fac4f9255a3
Closes-Bug: #1275714
This commit is contained in:
Andy McCrae 2014-02-03 12:24:26 +00:00
parent 3cc1b69377
commit ef2cba5c44
4 changed files with 9 additions and 1 deletions

View File

@ -79,6 +79,7 @@ Cinder attributes
* `openstack["block-storage"]["service_tenant_name"]` - name of tenant to use for the cinder service account in keystone
* `openstack["block-storage"]["service_user"]` - cinder service user in keystone
* `openstack["block-storage"]["service_role"]` - role for the cinder service user in keystone
* `openstack["block-storage"]["notification_driver"]` - Set the notification driver to be used (default to cinder.openstack.common.notifier.rpc_notifier)
* `openstack["block-storage"]["syslog"]["use"]`
* `openstack["block-storage"]["syslog"]["facility"]`
* `openstack["block-storage"]["syslog"]["config_facility"]`

View File

@ -39,6 +39,8 @@ default['openstack']['block-storage']['debug'] = 'False'
# Default lock_path
default['openstack']['block-storage']['lock_path'] = '/var/lock/cinder'
# Default notification_driver
default['openstack']['block-storage']['notification_driver'] = 'cinder.openstack.common.notifier.rpc_notifier'
# Availability zone/region for the OpenStack Block-Storage service
default['openstack']['block-storage']['region'] = 'RegionOne'
default['openstack']['block-storage']['scheduler_role'] = 'os-block-storage-scheduler'

View File

@ -152,6 +152,7 @@ describe 'openstack-block-storage::cinder-common' do
before do
@file = @chef_run.template '/etc/cinder/cinder.conf'
@chef_run.node.set['openstack']['mq']['block-storage']['service_type'] = 'qpid'
@chef_run.node.set['openstack']['block-storage']['notification_driver'] = 'cinder.test_driver'
@chef_run.converge 'openstack-block-storage::cinder-common'
end
@ -210,6 +211,10 @@ describe 'openstack-block-storage::cinder-common' do
it 'has qpid_tcp_nodelay' do
expect(@chef_run).to render_file(@file.name).with_content('qpid_tcp_nodelay=true')
end
it 'has notification_driver' do
expect(@chef_run).to render_file(@file.name).with_content('notification_driver=cinder.test_driver')
end
end
end

View File

@ -12,7 +12,7 @@ verbose=<%= node["openstack"]["block-storage"]["verbose"] %>
# lock_path
lock_path=<%= node["openstack"]["block-storage"]["lock_path"] %>
notification_driver=cinder.openstack.common.notifier.rpc_notifier
notification_driver=<%= node["openstack"]["block-storage"]["notification_driver"] %>
# log_config=<None>
#### (StrOpt) If this option is specified, the logging configuration file