Browse Source

Style and lint fixes to support newer ChefDK

Change-Id: I39f35c718e706b8f29c2b4d6d6cbd270b510183e
Depends-On: I6ce4587caa3ae68ddbd3ef1a521aaf46f4840b2c
Depends-On: I0a3872cd3a21c31b5e3a7b6190f911280e9ed909
Depends-On: I34e4c7b29ff7c36c91245d90fb0b6897847cd22f
Samuel Cassiba 2 years ago
parent
commit
67149f00ff
4 changed files with 16 additions and 14 deletions
  1. 2
    2
      README.md
  2. 2
    0
      metadata.rb
  3. 10
    10
      recipes/identity_registration.rb
  4. 2
    2
      spec/spec_helper.rb

+ 2
- 2
README.md View File

@@ -13,8 +13,8 @@ Requirements
13 13
 ============
14 14
 
15 15
 - Chef 12 or higher
16
-- chefdk 0.9.0 for testing (also includes berkshelf for cookbook dependency
17
-  resolution)
16
+- chefdk 0.9.0 or higher for testing (also includes berkshelf for cookbook
17
+  dependency resolution)
18 18
 
19 19
 Platform
20 20
 ========

+ 2
- 0
metadata.rb View File

@@ -2,6 +2,8 @@
2 2
 name 'openstack-block-storage'
3 3
 maintainer 'openstack-chef'
4 4
 maintainer_email 'openstack-dev@lists.openstack.org'
5
+issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
6
+source_url 'https://github.com/openstack/cookbook-openstack-block-storage' if respond_to?(:source_url)
5 7
 license 'Apache 2.0'
6 8
 description 'The OpenStack Advanced Volume Management service Cinder.'
7 9
 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))

+ 10
- 10
recipes/identity_registration.rb View File

@@ -83,26 +83,26 @@ end
83 83
 openstack_identity_register 'Register Cinder V1 Volume Service' do
84 84
   auth_uri auth_uri
85 85
   bootstrap_token bootstrap_token
86
-  service_name ((service_name).gsub(/v2/, ''))
87
-  service_type ((service_type).gsub(/v2/, ''))
86
+  service_name (service_name.gsub(/v2/, ''))
87
+  service_type (service_type.gsub(/v2/, ''))
88 88
   service_description 'Cinder Volume Service V1'
89 89
   endpoint_region region
90
-  endpoint_adminurl ((::URI.decode admin_cinder_api_endpoint.to_s).gsub(/v2/, 'v1'))
91
-  endpoint_internalurl ((::URI.decode internal_cinder_api_endpoint.to_s).gsub(/v2/, 'v1'))
92
-  endpoint_publicurl ((::URI.decode public_cinder_api_endpoint.to_s).gsub(/v2/, 'v1'))
90
+  endpoint_adminurl (::URI.decode admin_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
91
+  endpoint_internalurl (::URI.decode internal_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
92
+  endpoint_publicurl (::URI.decode public_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
93 93
   action :create_service
94 94
 end
95 95
 
96 96
 openstack_identity_register 'Register Cinder V1 Volume Endpoint' do
97 97
   auth_uri auth_uri
98 98
   bootstrap_token bootstrap_token
99
-  service_name ((service_name).gsub(/v2/, ''))
100
-  service_type ((service_type).gsub(/v2/, ''))
99
+  service_name (service_name.gsub(/v2/, ''))
100
+  service_type (service_type.gsub(/v2/, ''))
101 101
   service_description 'Cinder Volume Service V1'
102 102
   endpoint_region region
103
-  endpoint_adminurl ((::URI.decode admin_cinder_api_endpoint.to_s).gsub(/v2/, 'v1'))
104
-  endpoint_internalurl ((::URI.decode internal_cinder_api_endpoint.to_s).gsub(/v2/, 'v1'))
105
-  endpoint_publicurl ((::URI.decode public_cinder_api_endpoint.to_s).gsub(/v2/, 'v1'))
103
+  endpoint_adminurl (::URI.decode admin_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
104
+  endpoint_internalurl (::URI.decode internal_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
105
+  endpoint_publicurl (::URI.decode public_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
106 106
   action :create_endpoint
107 107
 end
108 108
 

+ 2
- 2
spec/spec_helper.rb View File

@@ -14,12 +14,12 @@ REDHAT_OPTS = {
14 14
   platform: 'redhat',
15 15
   version: '7.1',
16 16
   log_level: LOG_LEVEL
17
-}
17
+}.freeze
18 18
 UBUNTU_OPTS = {
19 19
   platform: 'ubuntu',
20 20
   version: '14.04',
21 21
   log_level: LOG_LEVEL
22
-}
22
+}.freeze
23 23
 
24 24
 shared_context 'block-storage-stubs' do
25 25
   before do

Loading…
Cancel
Save