Browse Source

starting rocky development patch

Change-Id: I829e8e793d107b9bf6d35781480cafdb27f7a928
changes/51/588551/3
Samuel Cassiba 10 months ago
parent
commit
681a71fb33

+ 2
- 0
.rubocop.yml View File

@@ -1,3 +1,5 @@
1
+inherit_from: .rubocop_todo.yml
2
+
1 3
 AllCops:
2 4
   Include:
3 5
     - metadata.rb

+ 20
- 0
.rubocop_todo.yml View File

@@ -0,0 +1,20 @@
1
+# This configuration was generated by
2
+# `rubocop --auto-gen-config`
3
+# on 2018-08-03 05:25:43 -0700 using RuboCop version 0.55.0.
4
+# The point is for the user to remove these configuration records
5
+# one by one as the offenses are removed from the code base.
6
+# Note that changes in the inspected code, or installation of new
7
+# versions of RuboCop, may require this file to be generated again.
8
+
9
+# Offense count: 2
10
+# Cop supports --auto-correct.
11
+Style/IfUnlessModifier:
12
+  Exclude:
13
+    - 'attributes/cinder_conf.rb'
14
+    - 'recipes/cinder-common.rb'
15
+
16
+# Offense count: 58
17
+# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
18
+# URISchemes: http, https
19
+Metrics/LineLength:
20
+  Max: 141

+ 1
- 1
Berksfile View File

@@ -9,6 +9,6 @@ source 'https://supermarket.chef.io'
9 9
 end
10 10
 
11 11
 cookbook 'openstackclient',
12
-  github: 'cloudbau/cookbook-openstackclient'
12
+  git: 'https://git.openstack.org/openstack/cookbook-openstackclient'
13 13
 
14 14
 metadata

+ 4
- 4
metadata.rb View File

@@ -4,15 +4,15 @@ maintainer_email 'openstack-dev@lists.openstack.org'
4 4
 license          'Apache-2.0'
5 5
 description      'The OpenStack Advanced Volume Management service Cinder.'
6 6
 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7
-version          '17.0.0'
7
+version          '18.0.0'
8 8
 
9 9
 %w(ubuntu redhat centos).each do |os|
10 10
   supports os
11 11
 end
12 12
 
13
-depends 'openstack-common', '>= 17.0.0'
14
-depends 'openstack-identity', '>= 17.0.0'
15
-depends 'openstack-image', '>= 17.0.0'
13
+depends 'openstack-common', '>= 18.0.0'
14
+depends 'openstack-identity', '>= 18.0.0'
15
+depends 'openstack-image', '>= 18.0.0'
16 16
 depends 'openstackclient'
17 17
 
18 18
 depends 'lvm'

+ 1
- 1
spec/api_spec.rb View File

@@ -31,7 +31,7 @@ describe 'openstack-block-storage::api' do
31 31
         expect(chef_run).not_to create_remote_file('/etc/cinder/policy.json')
32 32
       end
33 33
       describe 'policy file specified' do
34
-        before { node.set['openstack']['block-storage']['policyfile_url'] = 'http://server/mypolicy.json' }
34
+        before { node.override['openstack']['block-storage']['policyfile_url'] = 'http://server/mypolicy.json' }
35 35
         let(:remote_policy) { chef_run.remote_file('/etc/cinder/policy.json') }
36 36
 
37 37
         it 'manages policy file when remote file is specified' do

+ 1
- 1
spec/backup-redhat_spec.rb View File

@@ -14,7 +14,7 @@ describe 'openstack-block-storage::backup' do
14 14
 
15 15
     describe 'enable cinder backup service' do
16 16
       before do
17
-        node.set['openstack']['block-storage']['backup']['enabled'] = true
17
+        node.override['openstack']['block-storage']['backup']['enabled'] = true
18 18
       end
19 19
 
20 20
       it 'starts cinder backup' do

+ 7
- 7
spec/cinder_common_spec.rb View File

@@ -9,8 +9,8 @@ describe 'openstack-block-storage::cinder-common' do
9 9
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
10 10
     let(:node) { runner.node }
11 11
     let(:chef_run) do
12
-      node.set['openstack']['mq']['host'] = '127.0.0.1'
13
-      node.set['openstack']['mq']['block-storage']['rabbit']['notification_topic'] = 'rabbit_topic'
12
+      node.override['openstack']['mq']['host'] = '127.0.0.1'
13
+      node.override['openstack']['mq']['block-storage']['rabbit']['notification_topic'] = 'rabbit_topic'
14 14
 
15 15
       runner.converge(described_recipe)
16 16
     end
@@ -94,7 +94,7 @@ describe 'openstack-block-storage::cinder-common' do
94 94
 
95 95
         context 'syslog use' do
96 96
           it 'sets the log_config value when syslog is in use' do
97
-            node.set['openstack']['block-storage']['syslog']['use'] = true
97
+            node.override['openstack']['block-storage']['syslog']['use'] = true
98 98
 
99 99
             expect(chef_run).to render_file(file.name)
100 100
               .with_content(%r{^log_config = /etc/openstack/logging.conf$})
@@ -131,7 +131,7 @@ describe 'openstack-block-storage::cinder-common' do
131 131
         context 'rabbitmq as mq service' do
132 132
           context 'non ha attributes' do
133 133
             before do
134
-              node.set['openstack']['mq']['block-storage']['rabbit']['ha'] = false
134
+              node.override['openstack']['mq']['block-storage']['rabbit']['ha'] = false
135 135
             end
136 136
 
137 137
             it 'does not have a rabbit_hosts attribute' do
@@ -142,14 +142,14 @@ describe 'openstack-block-storage::cinder-common' do
142 142
 
143 143
         context 'lvm settings' do
144 144
           before do
145
-            node.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
145
+            node.override['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.lvm.LVMVolumeDriver'
146 146
           end
147 147
         end
148 148
 
149 149
         context 'commonly named volume attributes' do
150 150
           %w(iscsi_ip_address iscsi_port iscsi_helper volumes_dir).each do |attr|
151 151
             it "has volume related #{attr} attribute" do
152
-              node.set['openstack']['block-storage']['conf']['DEFAULT'][attr] = "common_volume_#{attr}_value"
152
+              node.override['openstack']['block-storage']['conf']['DEFAULT'][attr] = "common_volume_#{attr}_value"
153 153
               expect(chef_run).to render_file(file.name).with_content(/^#{attr} = common_volume_#{attr}_value$/)
154 154
             end
155 155
           end
@@ -157,7 +157,7 @@ describe 'openstack-block-storage::cinder-common' do
157 157
 
158 158
         context 'netapp ISCSI settings' do
159 159
           before do
160
-            node.set['openstack']['block-storage']['conf']['DEFAULT']['volume_driver'] = 'cinder.volume.drivers.netapp.NetAppISCSIDriver'
160
+            node.override['openstack']['block-storage']['conf']['DEFAULT']['volume_driver'] = 'cinder.volume.drivers.netapp.NetAppISCSIDriver'
161 161
           end
162 162
         end
163 163
       end

+ 1
- 1
spec/identity_registration_spec.rb View File

@@ -84,7 +84,7 @@ describe 'openstack-block-storage::identity_registration' do
84 84
       end
85 85
 
86 86
       it 'with custom region override' do
87
-        node.set['openstack']['block-storage']['region'] = 'volumeRegion'
87
+        node.override['openstack']['block-storage']['region'] = 'volumeRegion'
88 88
         expect(chef_run).to create_openstack_endpoint(
89 89
           service_type
90 90
         ).with(region: 'volumeRegion')

+ 2
- 2
spec/spec_helper.rb View File

@@ -64,7 +64,7 @@ end
64 64
 shared_examples 'common-logging' do
65 65
   context 'when syslog.use is true' do
66 66
     before do
67
-      node.set['openstack']['block-storage']['syslog']['use'] = true
67
+      node.override['openstack']['block-storage']['syslog']['use'] = true
68 68
     end
69 69
 
70 70
     it 'runs logging recipe if node attributes say to' do
@@ -74,7 +74,7 @@ shared_examples 'common-logging' do
74 74
 
75 75
   context 'when syslog.use is false' do
76 76
     before do
77
-      node.set['openstack']['block-storage']['syslog']['use'] = false
77
+      node.override['openstack']['block-storage']['syslog']['use'] = false
78 78
     end
79 79
 
80 80
     it 'runs logging recipe if node attributes say to' do

+ 1
- 1
spec/volume_spec.rb View File

@@ -60,7 +60,7 @@ describe 'openstack-block-storage::volume' do
60 60
       end
61 61
 
62 62
       it 'has ubuntu include' do
63
-        node.set['openstack']['block-storage']['volume']['volumes_dir'] = 'volumes_dir_value'
63
+        node.override['openstack']['block-storage']['volume']['volumes_dir'] = 'volumes_dir_value'
64 64
 
65 65
         expect(chef_run).to render_file(file.name).with_content('include /etc/tgt/conf.d/*.conf')
66 66
         expect(chef_run).not_to render_file(file.name).with_content('include volumes_dir_value/*')

Loading…
Cancel
Save