Browse Source

starting rocky development patch

Change-Id: I4d16b90987e8fb6569ff8775694868e2ad91eeef
changes/60/588560/2
Samuel Cassiba 10 months ago
parent
commit
22d034d20a

+ 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

+ 21
- 0
.rubocop_todo.yml View File

@@ -0,0 +1,21 @@
1
+# This configuration was generated by
2
+# `rubocop --auto-gen-config`
3
+# on 2018-08-03 05:26:05 -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: 5
10
+# Cop supports --auto-correct.
11
+Style/IfUnlessModifier:
12
+  Exclude:
13
+    - 'attributes/neutron_conf.rb'
14
+    - 'recipes/default.rb'
15
+    - 'recipes/l3_agent.rb'
16
+
17
+# Offense count: 135
18
+# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
19
+# URISchemes: http, https
20
+Metrics/LineLength:
21
+  Max: 202

+ 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

+ 3
- 3
metadata.rb View File

@@ -4,14 +4,14 @@ maintainer_email 'openstack-dev@lists.openstack.org'
4 4
 license          'Apache-2.0'
5 5
 description      'Installs and configures the OpenStack Network API Service and various agents and plugins'
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'
13
+depends 'openstack-common', '>= 18.0.0'
14
+depends 'openstack-identity', '>= 18.0.0'
15 15
 depends 'openstackclient'
16 16
 
17 17
 issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)

+ 7
- 7
spec/db_migration_spec.rb View File

@@ -6,7 +6,7 @@ describe 'openstack-network::db_migration' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 10
       runner.converge(described_recipe)
11 11
     end
12 12
 
@@ -18,7 +18,7 @@ describe 'openstack-network::db_migration' do
18 18
     end
19 19
 
20 20
     it 'uses db upgrade head with timeout override for neutron-server' do
21
-      node.set['openstack']['network']['dbsync_timeout'] = 1234
21
+      node.override['openstack']['network']['dbsync_timeout'] = 1234
22 22
       expect(chef_run).to run_bash('migrate network database').with(
23 23
         code: /upgrade head/,
24 24
         timeout: 1234
@@ -26,10 +26,10 @@ describe 'openstack-network::db_migration' do
26 26
     end
27 27
     describe 'run db-migration when services are enabled' do
28 28
       before do
29
-        node.set['openstack']['network_vpnaas']['enabled'] = true
30
-        node.set['openstack']['network_fwaas']['enabled'] = true
31
-        node.set['openstack']['network_lbaas']['enabled'] = true
32
-        node.set['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
29
+        node.override['openstack']['network_vpnaas']['enabled'] = true
30
+        node.override['openstack']['network_fwaas']['enabled'] = true
31
+        node.override['openstack']['network_lbaas']['enabled'] = true
32
+        node.override['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
33 33
       end
34 34
       it 'uses db upgrade head when vpnaas is enabled' do
35 35
         migrate_cmd = %r{neutron-db-manage --subproject neutron-vpnaas --config-file /etc/neutron/neutron.conf|
@@ -58,7 +58,7 @@ describe 'openstack-network::db_migration' do
58 58
     end
59 59
     describe 'run db-migration when services are enabled' do
60 60
       before do
61
-        node.set['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
61
+        node.override['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
62 62
       end
63 63
 
64 64
       it 'does not use db upgrade head when vpnaas is not enabled' do

+ 1
- 1
spec/dhcp_agent-centos_spec.rb View File

@@ -6,7 +6,7 @@ describe 'openstack-network::dhcp_agent' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(CENTOS_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     cached(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 10
       runner.converge(described_recipe)
11 11
     end
12 12
 

+ 1
- 1
spec/dhcp_agent_spec.rb View File

@@ -6,7 +6,7 @@ describe 'openstack-network::dhcp_agent' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 10
       runner.converge(described_recipe)
11 11
     end
12 12
     include_context 'neutron-stubs'

+ 1
- 1
spec/identity_registration_spec.rb View File

@@ -6,7 +6,7 @@ describe 'openstack-network::identity_registration' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 10
 
11 11
       runner.converge(described_recipe)
12 12
     end

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

@@ -6,7 +6,7 @@ describe 'openstack-network::l3_agent' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 10
       stub_command('ovs-vsctl br-exists br-ex').and_return(false)
11 11
       runner.converge(described_recipe)
12 12
     end

+ 2
- 2
spec/l3_agent_spec.rb View File

@@ -6,7 +6,7 @@ describe 'openstack-network::l3_agent' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['network_l3']['external_network_bridge_interface'] = 'enp0s8'
9
+      node.override['openstack']['network_l3']['external_network_bridge_interface'] = 'enp0s8'
10 10
       runner.converge(described_recipe)
11 11
     end
12 12
     describe 'recipe' do
@@ -43,7 +43,7 @@ describe 'openstack-network::l3_agent' do
43 43
           end
44 44
 
45 45
           it 'displays the external_network_bridge l3 attribute' do
46
-            node.set['openstack']['network_l3']['conf']['DEFAULT']['external_network_bridge'] = 'network_l3_external_network_bridge_value'
46
+            node.override['openstack']['network_l3']['conf']['DEFAULT']['external_network_bridge'] = 'network_l3_external_network_bridge_value'
47 47
             stub_command('ovs-vsctl br-exists network_l3_external_network_bridge_value').and_return(false)
48 48
             expect(chef_run).to render_file(file.name).with_content(/^external_network_bridge = network_l3_external_network_bridge_value$/)
49 49
           end

+ 2
- 2
spec/lbaas-redhat_spec.rb View File

@@ -6,8 +6,8 @@ describe 'openstack-network::lbaas' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
10
-      node.set['openstack']['network']['lbaas']['enabled'] = 'True'
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10
+      node.override['openstack']['network']['lbaas']['enabled'] = 'True'
11 11
       runner.converge(described_recipe)
12 12
     end
13 13
 

+ 1
- 1
spec/metadata_agent_spec.rb View File

@@ -6,7 +6,7 @@ describe 'openstack-network::metadata_agent' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 10
       runner.converge(described_recipe)
11 11
     end
12 12
 

+ 2
- 2
spec/ml2_linuxbridge-redhat_spec.rb View File

@@ -16,9 +16,9 @@ describe 'openstack-network::ml2_linuxbridge' do
16 16
     include_context 'neutron-stubs'
17 17
 
18 18
     before do
19
-      node.set['openstack']['network']['plugins']['linuxbridge']['path'] =
19
+      node.override['openstack']['network']['plugins']['linuxbridge']['path'] =
20 20
         '/etc/neutron/plugins/ml2'
21
-      node.set['openstack']['network']['plugins']['linuxbridge']['filename'] =
21
+      node.override['openstack']['network']['plugins']['linuxbridge']['filename'] =
22 22
         'linuxbridge_agent.ini'
23 23
     end
24 24
     it 'creates the /etc/neutron/plugins/ml2 agent directory' do

+ 3
- 3
spec/ml2_linuxbridge_spec.rb View File

@@ -10,16 +10,16 @@ describe 'openstack-network::ml2_linuxbridge' do
10 10
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
11 11
     let(:node) { runner.node }
12 12
     let(:chef_run) do
13
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
13
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
14 14
       runner.converge(described_recipe)
15 15
     end
16 16
 
17 17
     include_context 'neutron-stubs'
18 18
 
19 19
     before do
20
-      node.set['openstack']['network']['plugins']['linuxbridge']['path'] =
20
+      node.override['openstack']['network']['plugins']['linuxbridge']['path'] =
21 21
         '/etc/neutron/plugins/linuxbridge'
22
-      node.set['openstack']['network']['plugins']['linuxbridge']['filename'] =
22
+      node.override['openstack']['network']['plugins']['linuxbridge']['filename'] =
23 23
         'linuxbridge_conf.ini'
24 24
     end
25 25
     it 'creates the /etc/neutron/plugins/linuxbridge agent directory' do

+ 1
- 1
spec/openvswitch_agent_spec.rb View File

@@ -6,7 +6,7 @@ describe 'openstack-network::openvswitch_agent' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['network']['openvswitch']['integration_bridge'] = 'br-int'
9
+      node.override['openstack']['network']['openvswitch']['integration_bridge'] = 'br-int'
10 10
       runner.converge(described_recipe)
11 11
     end
12 12
     before do

+ 2
- 2
spec/plugin_config_spec.rb View File

@@ -6,14 +6,14 @@ describe 'openstack-network::plugin_config' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['network']['plugins']['ml2'].tap do |ml2|
9
+      node.override['openstack']['network']['plugins']['ml2'].tap do |ml2|
10 10
         ml2['path'] = '/etc/neutron/more_plugins'
11 11
         ml2['filename'] = 'ml2_conf.ini'
12 12
         ml2['conf'].tap do |conf|
13 13
           conf['section']['key'] = 'value'
14 14
         end
15 15
       end
16
-      node.set['openstack']['network']['plugins']['openvswitch'].tap do |ovs|
16
+      node.override['openstack']['network']['plugins']['openvswitch'].tap do |ovs|
17 17
         ovs['path'] = '/etc/neutron/plugins/'
18 18
         ovs['filename'] = 'openvswitch_conf.ini'
19 19
         ovs['conf'].tap do |conf|

+ 3
- 3
spec/server-redhat_spec.rb View File

@@ -6,12 +6,12 @@ describe 'openstack-network::server' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 10
       runner.converge(described_recipe)
11 11
     end
12 12
     before do
13
-      node.set['openstack']['network']['plugins']['ml2']['path'] = '/etc/neutron/plugins/ml2'
14
-      node.set['openstack']['network']['plugins']['ml2']['filename'] = 'openvswitch_agent.ini'
13
+      node.override['openstack']['network']['plugins']['ml2']['path'] = '/etc/neutron/plugins/ml2'
14
+      node.override['openstack']['network']['plugins']['ml2']['filename'] = 'openvswitch_agent.ini'
15 15
     end
16 16
     include_context 'neutron-stubs'
17 17
 

+ 3
- 3
spec/spec_helper.rb View File

@@ -56,13 +56,13 @@ shared_context 'neutron-stubs' do
56 56
   end
57 57
   shared_examples 'custom template banner displayer' do
58 58
     it 'shows the custom banner' do
59
-      node.set['openstack']['network']['custom_template_banner'] = 'custom_template_banner_value'
59
+      node.override['openstack']['network']['custom_template_banner'] = 'custom_template_banner_value'
60 60
       expect(chef_run).to render_file(file_name).with_content(/^custom_template_banner_value$/)
61 61
     end
62 62
   end
63 63
   shared_examples 'common network attributes displayer' do |plugin|
64 64
     it 'displays the interface_driver common attribute' do
65
-      node.set['openstack']["network_#{plugin}"]['conf']['DEFAULT']['interface_driver'] = 'network_interface_driver_value'
65
+      node.override['openstack']["network_#{plugin}"]['conf']['DEFAULT']['interface_driver'] = 'network_interface_driver_value'
66 66
       expect(chef_run).to render_file(file_name).with_content(/^interface_driver = network_interface_driver_value$/)
67 67
     end
68 68
   end
@@ -75,7 +75,7 @@ shared_context 'neutron-stubs' do
75 75
     %w(resync_interval ovs_use_veth enable_isolated_metadata
76 76
        enable_metadata_network dnsmasq_lease_max dhcp_delete_namespaces).each do |attr|
77 77
       it "displays the #{attr} dhcp attribute" do
78
-        node.set['openstack']['network_dhcp']['conf']['DEFAULT'][attr] = "network_dhcp_#{attr}_value"
78
+        node.override['openstack']['network_dhcp']['conf']['DEFAULT'][attr] = "network_dhcp_#{attr}_value"
79 79
         expect(chef_run).to render_file(file_name).with_content(/^#{attr} = network_dhcp_#{attr}_value$/)
80 80
       end
81 81
     end

+ 2
- 2
spec/vpnaas-redhat_spec.rb View File

@@ -6,8 +6,8 @@ describe 'openstack-network::vpnaas' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
10
-      node.set['openstack']['network']['enable_vpn'] = true
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10
+      node.override['openstack']['network']['enable_vpn'] = true
11 11
       stub_command('ovs-vsctl br-exists br-ex').and_return(false)
12 12
       runner.converge(described_recipe)
13 13
     end

+ 2
- 2
spec/vpnaas_spec.rb View File

@@ -6,7 +6,7 @@ describe 'openstack-network::vpnaas' do
6 6
     let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 7
     let(:node) { runner.node }
8 8
     let(:chef_run) do
9
-      node.set['openstack']['compute']['network']['service_type'] = 'neutron'
9
+      node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 10
       runner.converge(described_recipe)
11 11
     end
12 12
 
@@ -59,7 +59,7 @@ describe 'openstack-network::vpnaas' do
59 59
         end
60 60
 
61 61
         it 'renders no setted vpn_device_driver entry in vpn_agent.ini, when no vpn_device_driver set' do
62
-          chef_run.node.set['openstack']['network_vpnaas']['conf']['vpnagent']['vpn_device_driver'] = ''
62
+          chef_run.node.override['openstack']['network_vpnaas']['conf']['vpnagent']['vpn_device_driver'] = ''
63 63
           chef_run.converge(described_recipe)
64 64
           expect(chef_run).to render_config_file(file.name).with_section_content('vpnagent', /^vpn_device_driver = $/)
65 65
         end

Loading…
Cancel
Save