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:
		@@ -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_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_user"]` - cinder service user in keystone
 | 
				
			||||||
* `openstack["block-storage"]["service_role"]` - role for the 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"]["use"]`
 | 
				
			||||||
* `openstack["block-storage"]["syslog"]["facility"]`
 | 
					* `openstack["block-storage"]["syslog"]["facility"]`
 | 
				
			||||||
* `openstack["block-storage"]["syslog"]["config_facility"]`
 | 
					* `openstack["block-storage"]["syslog"]["config_facility"]`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,6 +39,8 @@ default['openstack']['block-storage']['debug'] = 'False'
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# Default lock_path
 | 
					# Default lock_path
 | 
				
			||||||
default['openstack']['block-storage']['lock_path'] = '/var/lock/cinder'
 | 
					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
 | 
					# Availability zone/region for the OpenStack Block-Storage service
 | 
				
			||||||
default['openstack']['block-storage']['region'] = 'RegionOne'
 | 
					default['openstack']['block-storage']['region'] = 'RegionOne'
 | 
				
			||||||
default['openstack']['block-storage']['scheduler_role'] = 'os-block-storage-scheduler'
 | 
					default['openstack']['block-storage']['scheduler_role'] = 'os-block-storage-scheduler'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -152,6 +152,7 @@ describe 'openstack-block-storage::cinder-common' do
 | 
				
			|||||||
      before do
 | 
					      before do
 | 
				
			||||||
        @file = @chef_run.template '/etc/cinder/cinder.conf'
 | 
					        @file = @chef_run.template '/etc/cinder/cinder.conf'
 | 
				
			||||||
        @chef_run.node.set['openstack']['mq']['block-storage']['service_type'] = 'qpid'
 | 
					        @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'
 | 
					        @chef_run.converge 'openstack-block-storage::cinder-common'
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -210,6 +211,10 @@ describe 'openstack-block-storage::cinder-common' do
 | 
				
			|||||||
      it 'has qpid_tcp_nodelay' do
 | 
					      it 'has qpid_tcp_nodelay' do
 | 
				
			||||||
        expect(@chef_run).to render_file(@file.name).with_content('qpid_tcp_nodelay=true')
 | 
					        expect(@chef_run).to render_file(@file.name).with_content('qpid_tcp_nodelay=true')
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      it 'has notification_driver' do
 | 
				
			||||||
 | 
					        expect(@chef_run).to render_file(@file.name).with_content('notification_driver=cinder.test_driver')
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@ verbose=<%= node["openstack"]["block-storage"]["verbose"] %>
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
# lock_path
 | 
					# lock_path
 | 
				
			||||||
lock_path=<%= node["openstack"]["block-storage"]["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>
 | 
					# log_config=<None>
 | 
				
			||||||
#### (StrOpt) If this option is specified, the logging configuration file
 | 
					#### (StrOpt) If this option is specified, the logging configuration file
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user