summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Vanderwiel <vanderwl@us.ibm.com>2016-04-13 14:41:44 -0500
committerMark Vanderwiel <vanderwl@us.ibm.com>2016-04-13 15:03:54 -0500
commit37a4707015795be87c4e68a350de466335d8486b (patch)
tree4547632d4ab3beaf31644ce01d0922f8037bb8b8
parent6ce1eb3be6699f245a9b6429222b5c02be4fb7d2 (diff)
Cleanup options deprecated for mitaka
Some options have been deprecated for Mitaka, replace them with the new variants. Change-Id: I7563c8cac90d9caa0095944d8c0835d73f1b8dde
Notes
Notes (review): Code-Review+2: Samuel Cassiba <sam@cassiba.com> Workflow+1: Jan Klare <j.klare@cloudbau.de> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Thu, 21 Apr 2016 20:38:04 +0000 Reviewed-on: https://review.openstack.org/305459 Project: openstack/cookbook-openstack-block-storage Branch: refs/heads/master
-rw-r--r--attributes/cinder_conf.rb4
-rw-r--r--spec/api_spec.rb3
-rw-r--r--spec/scheduler_spec.rb3
-rw-r--r--spec/spec_helper.rb25
-rw-r--r--spec/volume_spec.rb3
5 files changed, 29 insertions, 9 deletions
diff --git a/attributes/cinder_conf.rb b/attributes/cinder_conf.rb
index c42a3c5..9e16ece 100644
--- a/attributes/cinder_conf.rb
+++ b/attributes/cinder_conf.rb
@@ -1,6 +1,6 @@
1default['openstack']['block-storage']['conf_secrets'] = {} 1default['openstack']['block-storage']['conf_secrets'] = {}
2default['openstack']['block-storage']['conf'].tap do |conf| 2default['openstack']['block-storage']['conf'].tap do |conf|
3 conf['DEFAULT']['notification_driver'] = 'cinder.openstack.common.notifier.rpc_notifier' 3 conf['oslo_messaging_notifications']['driver'] = 'cinder.openstack.common.notifier.rpc_notifier'
4 if node['openstack']['block-storage']['syslog']['use'] 4 if node['openstack']['block-storage']['syslog']['use']
5 conf['DEFAULT']['log_config'] = '/etc/openstack/logging.conf' 5 conf['DEFAULT']['log_config'] = '/etc/openstack/logging.conf'
6 end 6 end
@@ -9,7 +9,7 @@ default['openstack']['block-storage']['conf'].tap do |conf|
9 conf['DEFAULT']['control_exchange'] = 'cinder' 9 conf['DEFAULT']['control_exchange'] = 'cinder'
10 conf['DEFAULT']['volume_group'] = 'cinder-volumes' 10 conf['DEFAULT']['volume_group'] = 'cinder-volumes'
11 conf['DEFAULT']['state_path'] = '/var/lib/cinder' 11 conf['DEFAULT']['state_path'] = '/var/lib/cinder'
12 conf['keystone_authtoken']['auth_plugin'] = 'v2password' 12 conf['keystone_authtoken']['auth_type'] = 'v2password'
13 conf['keystone_authtoken']['region_name'] = node['openstack']['region'] 13 conf['keystone_authtoken']['region_name'] = node['openstack']['region']
14 conf['keystone_authtoken']['username'] = 'cinder' 14 conf['keystone_authtoken']['username'] = 'cinder'
15 conf['keystone_authtoken']['tenant_name'] = 'service' 15 conf['keystone_authtoken']['tenant_name'] = 'service'
diff --git a/spec/api_spec.rb b/spec/api_spec.rb
index d04f2d0..ba03c7c 100644
--- a/spec/api_spec.rb
+++ b/spec/api_spec.rb
@@ -12,8 +12,7 @@ describe 'openstack-block-storage::api' do
12 12
13 include_context 'block-storage-stubs' 13 include_context 'block-storage-stubs'
14 include_examples 'common-logging' 14 include_examples 'common-logging'
15 15 include_examples 'creates_cinder_conf', 'service[cinder-api]', 'cinder', 'cinder'
16 expect_creates_cinder_conf 'service[cinder-api]', 'cinder', 'cinder'
17 16
18 it 'upgrades cinder api packages' do 17 it 'upgrades cinder api packages' do
19 expect(chef_run).to upgrade_package('cinder-api') 18 expect(chef_run).to upgrade_package('cinder-api')
diff --git a/spec/scheduler_spec.rb b/spec/scheduler_spec.rb
index 000c942..3b60a7c 100644
--- a/spec/scheduler_spec.rb
+++ b/spec/scheduler_spec.rb
@@ -12,8 +12,7 @@ describe 'openstack-block-storage::scheduler' do
12 12
13 include_context 'block-storage-stubs' 13 include_context 'block-storage-stubs'
14 include_examples 'common-logging' 14 include_examples 'common-logging'
15 15 include_examples 'creates_cinder_conf', 'service[cinder-scheduler]', 'cinder', 'cinder'
16 expect_creates_cinder_conf 'service[cinder-scheduler]', 'cinder', 'cinder'
17 16
18 it 'upgrades cinder scheduler package' do 17 it 'upgrades cinder scheduler package' do
19 expect(chef_run).to upgrade_package 'cinder-scheduler' 18 expect(chef_run).to upgrade_package 'cinder-scheduler'
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index e22dae1..fb74603 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -90,7 +90,7 @@ def expect_runs_openstack_common_logging_recipe
90 end 90 end
91end 91end
92 92
93def expect_creates_cinder_conf(service, user, group, action = :restart) 93shared_examples 'creates_cinder_conf' do |service, user, group, action = :restart|
94 describe 'cinder.conf' do 94 describe 'cinder.conf' do
95 let(:file) { chef_run.template('/etc/cinder/cinder.conf') } 95 let(:file) { chef_run.template('/etc/cinder/cinder.conf') }
96 96
@@ -105,5 +105,28 @@ def expect_creates_cinder_conf(service, user, group, action = :restart)
105 it 'notifies service restart' do 105 it 'notifies service restart' do
106 expect(file).to notify(service).to(action) 106 expect(file).to notify(service).to(action)
107 end 107 end
108
109 it do
110 [
111 /^auth_type = v2password$/,
112 /^region_name = RegionOne$/,
113 /^username = cinder/,
114 /^tenant_name = service$/,
115 %r{^signing_dir = /var/cache/cinder/api$},
116 %r{^auth_url = http://127.0.0.1:5000/v2.0$},
117 /^password = cinder-pass$/
118 ].each do |line|
119 expect(chef_run).to render_config_file(file.name)
120 .with_section_content('keystone_authtoken', line)
121 end
122 end
123
124 it 'has oslo_messaging_notifications conf values' do
125 [
126 /^driver = cinder.openstack.common.notifier.rpc_notifier$/
127 ].each do |line|
128 expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_notifications', line)
129 end
130 end
108 end 131 end
109end 132end
diff --git a/spec/volume_spec.rb b/spec/volume_spec.rb
index 25520d3..acf38eb 100644
--- a/spec/volume_spec.rb
+++ b/spec/volume_spec.rb
@@ -12,8 +12,7 @@ describe 'openstack-block-storage::volume' do
12 12
13 include_context 'block-storage-stubs' 13 include_context 'block-storage-stubs'
14 include_examples 'common-logging' 14 include_examples 'common-logging'
15 15 include_examples 'creates_cinder_conf', 'service[cinder-volume]', 'cinder', 'cinder'
16 expect_creates_cinder_conf('service[cinder-volume]', 'cinder', 'cinder')
17 16
18 it 'upgrades cinder volume packages' do 17 it 'upgrades cinder volume packages' do
19 expect(chef_run).to upgrade_package 'cinder-volume' 18 expect(chef_run).to upgrade_package 'cinder-volume'