Browse Source

Cleanup options deprecated for mitaka

Some options have been deprecated for Mitaka, replace them with the new
variants.

Change-Id: I7563c8cac90d9caa0095944d8c0835d73f1b8dde
Mark Vanderwiel 3 years ago
parent
commit
37a4707015
5 changed files with 29 additions and 9 deletions
  1. 2
    2
      attributes/cinder_conf.rb
  2. 1
    2
      spec/api_spec.rb
  3. 1
    2
      spec/scheduler_spec.rb
  4. 24
    1
      spec/spec_helper.rb
  5. 1
    2
      spec/volume_spec.rb

+ 2
- 2
attributes/cinder_conf.rb View File

@@ -1,6 +1,6 @@
1 1
 default['openstack']['block-storage']['conf_secrets'] = {}
2 2
 default['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 4
   if node['openstack']['block-storage']['syslog']['use']
5 5
     conf['DEFAULT']['log_config'] = '/etc/openstack/logging.conf'
6 6
   end
@@ -9,7 +9,7 @@ default['openstack']['block-storage']['conf'].tap do |conf|
9 9
   conf['DEFAULT']['control_exchange'] = 'cinder'
10 10
   conf['DEFAULT']['volume_group'] = 'cinder-volumes'
11 11
   conf['DEFAULT']['state_path'] = '/var/lib/cinder'
12
-  conf['keystone_authtoken']['auth_plugin'] = 'v2password'
12
+  conf['keystone_authtoken']['auth_type'] = 'v2password'
13 13
   conf['keystone_authtoken']['region_name'] = node['openstack']['region']
14 14
   conf['keystone_authtoken']['username'] = 'cinder'
15 15
   conf['keystone_authtoken']['tenant_name'] = 'service'

+ 1
- 2
spec/api_spec.rb View File

@@ -12,8 +12,7 @@ describe 'openstack-block-storage::api' do
12 12
 
13 13
     include_context 'block-storage-stubs'
14 14
     include_examples 'common-logging'
15
-
16
-    expect_creates_cinder_conf 'service[cinder-api]', 'cinder', 'cinder'
15
+    include_examples 'creates_cinder_conf', 'service[cinder-api]', 'cinder', 'cinder'
17 16
 
18 17
     it 'upgrades cinder api packages' do
19 18
       expect(chef_run).to upgrade_package('cinder-api')

+ 1
- 2
spec/scheduler_spec.rb View File

@@ -12,8 +12,7 @@ describe 'openstack-block-storage::scheduler' do
12 12
 
13 13
     include_context 'block-storage-stubs'
14 14
     include_examples 'common-logging'
15
-
16
-    expect_creates_cinder_conf 'service[cinder-scheduler]', 'cinder', 'cinder'
15
+    include_examples 'creates_cinder_conf', 'service[cinder-scheduler]', 'cinder', 'cinder'
17 16
 
18 17
     it 'upgrades cinder scheduler package' do
19 18
       expect(chef_run).to upgrade_package 'cinder-scheduler'

+ 24
- 1
spec/spec_helper.rb View File

@@ -90,7 +90,7 @@ def expect_runs_openstack_common_logging_recipe
90 90
   end
91 91
 end
92 92
 
93
-def expect_creates_cinder_conf(service, user, group, action = :restart)
93
+shared_examples 'creates_cinder_conf' do |service, user, group, action = :restart|
94 94
   describe 'cinder.conf' do
95 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 105
     it 'notifies service restart' do
106 106
       expect(file).to notify(service).to(action)
107 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 131
   end
109 132
 end

+ 1
- 2
spec/volume_spec.rb View File

@@ -12,8 +12,7 @@ describe 'openstack-block-storage::volume' do
12 12
 
13 13
     include_context 'block-storage-stubs'
14 14
     include_examples 'common-logging'
15
-
16
-    expect_creates_cinder_conf('service[cinder-volume]', 'cinder', 'cinder')
15
+    include_examples 'creates_cinder_conf', 'service[cinder-volume]', 'cinder', 'cinder'
17 16
 
18 17
     it 'upgrades cinder volume packages' do
19 18
       expect(chef_run).to upgrade_package 'cinder-volume'

Loading…
Cancel
Save