Browse Source

Convert hyphens to underscores for service names

The Chef Style Guide[1] does not recommend using hyphens for
cookbook or resource names. To maintain consistency, we should follow
best practices.

[1]: https://docs.chef.io/ruby.html#use-of-hyphens

Depends-On: Ic2b6d8f1cdf719791faaebdbd7e29e789eb3f31c
Change-Id: Ib8c788f69e9545b2d7121199590e3795f2212c7f
Samuel Cassiba 4 months ago
parent
commit
fd7ca4eddf
6 changed files with 9 additions and 9 deletions
  1. 1
    1
      recipes/api.rb
  2. 1
    1
      recipes/backup.rb
  3. 4
    4
      recipes/cinder-common.rb
  4. 1
    1
      recipes/scheduler.rb
  5. 1
    1
      recipes/volume.rb
  6. 1
    1
      spec/spec_helper.rb

+ 1
- 1
recipes/api.rb View File

@@ -37,7 +37,7 @@ platform_options['cinder_api_packages'].each do |pkg|
37 37
   end
38 38
 end
39 39
 
40
-db_type = node['openstack']['db']['block-storage']['service_type']
40
+db_type = node['openstack']['db']['block_storage']['service_type']
41 41
 node['openstack']['db']['python_packages'][db_type].each do |pkg|
42 42
   package pkg do
43 43
     action :upgrade

+ 1
- 1
recipes/backup.rb View File

@@ -27,7 +27,7 @@ platform_options['cinder_backup_packages'].each do |pkg|
27 27
   end
28 28
 end
29 29
 
30
-db_type = node['openstack']['db']['block-storage']['service_type']
30
+db_type = node['openstack']['db']['block_storage']['service_type']
31 31
 node['openstack']['db']['python_packages'][db_type].each do |pkg|
32 32
   package pkg do
33 33
     action :upgrade

+ 4
- 4
recipes/cinder-common.rb View File

@@ -29,20 +29,20 @@ platform_options['cinder_common_packages'].each do |pkg|
29 29
   end
30 30
 end
31 31
 
32
-db_user = node['openstack']['db']['block-storage']['username']
32
+db_user = node['openstack']['db']['block_storage']['username']
33 33
 db_pass = get_password 'db', 'cinder'
34 34
 node.default['openstack']['block-storage']['conf_secrets']
35 35
   .[]('database')['connection'] =
36
-  db_uri('block-storage', db_user, db_pass)
36
+  db_uri('block_storage', db_user, db_pass)
37 37
 
38 38
 if node['openstack']['endpoints']['db']['enabled_slave']
39 39
   node.default['openstack']['block-storage']['conf_secrets']
40 40
     .[]('database')['slave_connection'] =
41
-    db_uri('block-storage', db_user, db_pass, true)
41
+    db_uri('block_storage', db_user, db_pass, true)
42 42
 end
43 43
 
44 44
 if node['openstack']['mq']['service_type'] == 'rabbit'
45
-  node.default['openstack']['block-storage']['conf_secrets']['DEFAULT']['transport_url'] = rabbit_transport_url 'block-storage'
45
+  node.default['openstack']['block-storage']['conf_secrets']['DEFAULT']['transport_url'] = rabbit_transport_url 'block_storage'
46 46
 end
47 47
 
48 48
 glance_api_endpoint = internal_endpoint 'image_api'

+ 1
- 1
recipes/scheduler.rb View File

@@ -32,7 +32,7 @@ platform_options['cinder_scheduler_packages'].each do |pkg|
32 32
   end
33 33
 end
34 34
 
35
-db_type = node['openstack']['db']['block-storage']['service_type']
35
+db_type = node['openstack']['db']['block_storage']['service_type']
36 36
 node['openstack']['db']['python_packages'][db_type].each do |pkg|
37 37
   package pkg do
38 38
     action :upgrade

+ 1
- 1
recipes/volume.rb View File

@@ -38,7 +38,7 @@ platform_options['cinder_volume_packages'].each do |pkg|
38 38
   end
39 39
 end
40 40
 
41
-db_type = node['openstack']['db']['block-storage']['service_type']
41
+db_type = node['openstack']['db']['block_storage']['service_type']
42 42
 node['openstack']['db']['python_packages'][db_type].each do |pkg|
43 43
   package pkg do
44 44
     action :upgrade

+ 1
- 1
spec/spec_helper.rb View File

@@ -53,7 +53,7 @@ shared_context 'block-storage-stubs' do
53 53
       .with('user', 'ibmnas_admin')
54 54
       .and_return('test_pass')
55 55
     allow_any_instance_of(Chef::Recipe).to receive(:rabbit_transport_url)
56
-      .with('block-storage')
56
+      .with('block_storage')
57 57
       .and_return('rabbit://guest:mypass@127.0.0.1:5672')
58 58
     stub_command('/usr/sbin/httpd -t').and_return(true)
59 59
     stub_command('/usr/sbin/apache2 -t').and_return(true)

Loading…
Cancel
Save