summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Cassiba <s@cassiba.com>2016-07-06 09:18:39 -0700
committerSamuel Cassiba <s@cassiba.com>2016-07-06 09:20:23 -0700
commit67149f00ffcf6c0a19d381cf6d3f79e740dc81bd (patch)
tree72e26260c10d3e460ed0ba4c1624878d479561d6
parentbabac2c1f287f32f7f8ed579cf44863864bf6ca7 (diff)
Style and lint fixes to support newer ChefDK
Notes
Notes (review): Code-Review+2: Mark Vanderwiel <vanderwl@us.ibm.com> Code-Review+2: Jan Klare <j.klare@cloudbau.de> Workflow+1: Jan Klare <j.klare@cloudbau.de> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Wed, 13 Jul 2016 06:59:42 +0000 Reviewed-on: https://review.openstack.org/338383 Project: openstack/cookbook-openstack-block-storage Branch: refs/heads/master
-rw-r--r--README.md4
-rw-r--r--metadata.rb2
-rw-r--r--recipes/identity_registration.rb20
-rw-r--r--spec/spec_helper.rb4
4 files changed, 16 insertions, 14 deletions
diff --git a/README.md b/README.md
index be12947..50ea950 100644
--- a/README.md
+++ b/README.md
@@ -13,8 +13,8 @@ Requirements
13============ 13============
14 14
15- Chef 12 or higher 15- Chef 12 or higher
16- chefdk 0.9.0 for testing (also includes berkshelf for cookbook dependency 16- chefdk 0.9.0 or higher for testing (also includes berkshelf for cookbook
17 resolution) 17 dependency resolution)
18 18
19Platform 19Platform
20======== 20========
diff --git a/metadata.rb b/metadata.rb
index 1732e04..caafa31 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -2,6 +2,8 @@
2name 'openstack-block-storage' 2name 'openstack-block-storage'
3maintainer 'openstack-chef' 3maintainer 'openstack-chef'
4maintainer_email 'openstack-dev@lists.openstack.org' 4maintainer_email 'openstack-dev@lists.openstack.org'
5issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
6source_url 'https://github.com/openstack/cookbook-openstack-block-storage' if respond_to?(:source_url)
5license 'Apache 2.0' 7license 'Apache 2.0'
6description 'The OpenStack Advanced Volume Management service Cinder.' 8description 'The OpenStack Advanced Volume Management service Cinder.'
7long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 9long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
diff --git a/recipes/identity_registration.rb b/recipes/identity_registration.rb
index 44e91c4..8133bba 100644
--- a/recipes/identity_registration.rb
+++ b/recipes/identity_registration.rb
@@ -83,26 +83,26 @@ end
83openstack_identity_register 'Register Cinder V1 Volume Service' do 83openstack_identity_register 'Register Cinder V1 Volume Service' do
84 auth_uri auth_uri 84 auth_uri auth_uri
85 bootstrap_token bootstrap_token 85 bootstrap_token bootstrap_token
86 service_name ((service_name).gsub(/v2/, '')) 86 service_name (service_name.gsub(/v2/, ''))
87 service_type ((service_type).gsub(/v2/, '')) 87 service_type (service_type.gsub(/v2/, ''))
88 service_description 'Cinder Volume Service V1' 88 service_description 'Cinder Volume Service V1'
89 endpoint_region region 89 endpoint_region region
90 endpoint_adminurl ((::URI.decode admin_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')) 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')) 92 endpoint_publicurl (::URI.decode public_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
93 action :create_service 93 action :create_service
94end 94end
95 95
96openstack_identity_register 'Register Cinder V1 Volume Endpoint' do 96openstack_identity_register 'Register Cinder V1 Volume Endpoint' do
97 auth_uri auth_uri 97 auth_uri auth_uri
98 bootstrap_token bootstrap_token 98 bootstrap_token bootstrap_token
99 service_name ((service_name).gsub(/v2/, '')) 99 service_name (service_name.gsub(/v2/, ''))
100 service_type ((service_type).gsub(/v2/, '')) 100 service_type (service_type.gsub(/v2/, ''))
101 service_description 'Cinder Volume Service V1' 101 service_description 'Cinder Volume Service V1'
102 endpoint_region region 102 endpoint_region region
103 endpoint_adminurl ((::URI.decode admin_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')) 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')) 105 endpoint_publicurl (::URI.decode public_cinder_api_endpoint.to_s.gsub(/v2/, 'v1'))
106 action :create_endpoint 106 action :create_endpoint
107end 107end
108 108
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index fb74603..944a4c5 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -14,12 +14,12 @@ REDHAT_OPTS = {
14 platform: 'redhat', 14 platform: 'redhat',
15 version: '7.1', 15 version: '7.1',
16 log_level: LOG_LEVEL 16 log_level: LOG_LEVEL
17} 17}.freeze
18UBUNTU_OPTS = { 18UBUNTU_OPTS = {
19 platform: 'ubuntu', 19 platform: 'ubuntu',
20 version: '14.04', 20 version: '14.04',
21 log_level: LOG_LEVEL 21 log_level: LOG_LEVEL
22} 22}.freeze
23 23
24shared_context 'block-storage-stubs' do 24shared_context 'block-storage-stubs' do
25 before do 25 before do