summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Cassiba <s@cassiba.com>2018-08-03 06:27:57 -0700
committerSamuel Cassiba <s@cassiba.com>2018-08-03 06:41:32 -0700
commit22d034d20a24277d97034d280845ec73d199ebd3 (patch)
tree135b3eb17c4e6e5bfe363671e2f6342fab52e255
parent3d096b57fdf8e2effdfc61a64d3d0771a94a8367 (diff)
starting rocky development patch
Notes
Notes (review): Code-Review+2: Samuel Cassiba <samuel@cassi.ba> Workflow+1: Samuel Cassiba <samuel@cassi.ba> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sat, 04 Aug 2018 02:14:14 +0000 Reviewed-on: https://review.openstack.org/588560 Project: openstack/cookbook-openstack-network Branch: refs/heads/master
-rw-r--r--.rubocop.yml2
-rw-r--r--.rubocop_todo.yml21
-rw-r--r--Berksfile2
-rw-r--r--metadata.rb6
-rw-r--r--spec/db_migration_spec.rb14
-rw-r--r--spec/dhcp_agent-centos_spec.rb2
-rw-r--r--spec/dhcp_agent_spec.rb2
-rw-r--r--spec/identity_registration_spec.rb2
-rw-r--r--spec/l3_agent-redhat_spec.rb2
-rw-r--r--spec/l3_agent_spec.rb4
-rw-r--r--spec/lbaas-redhat_spec.rb4
-rw-r--r--spec/metadata_agent_spec.rb2
-rw-r--r--spec/ml2_linuxbridge-redhat_spec.rb4
-rw-r--r--spec/ml2_linuxbridge_spec.rb6
-rw-r--r--spec/openvswitch_agent_spec.rb2
-rw-r--r--spec/plugin_config_spec.rb4
-rw-r--r--spec/server-redhat_spec.rb6
-rw-r--r--spec/spec_helper.rb6
-rw-r--r--spec/vpnaas-redhat_spec.rb4
-rw-r--r--spec/vpnaas_spec.rb4
20 files changed, 61 insertions, 38 deletions
diff --git a/.rubocop.yml b/.rubocop.yml
index 253be24..5e0be9f 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -1,3 +1,5 @@
1inherit_from: .rubocop_todo.yml
2
1AllCops: 3AllCops:
2 Include: 4 Include:
3 - metadata.rb 5 - metadata.rb
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
new file mode 100644
index 0000000..e12bee3
--- /dev/null
+++ b/.rubocop_todo.yml
@@ -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.
11Style/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
20Metrics/LineLength:
21 Max: 202
diff --git a/Berksfile b/Berksfile
index 9f53c79..4951939 100644
--- a/Berksfile
+++ b/Berksfile
@@ -9,6 +9,6 @@ source 'https://supermarket.chef.io'
9end 9end
10 10
11cookbook 'openstackclient', 11cookbook 'openstackclient',
12 github: 'cloudbau/cookbook-openstackclient' 12 git: 'https://git.openstack.org/openstack/cookbook-openstackclient'
13 13
14metadata 14metadata
diff --git a/metadata.rb b/metadata.rb
index 353f75b..35328bb 100644
--- a/metadata.rb
+++ b/metadata.rb
@@ -4,14 +4,14 @@ maintainer_email 'openstack-dev@lists.openstack.org'
4license 'Apache-2.0' 4license 'Apache-2.0'
5description 'Installs and configures the OpenStack Network API Service and various agents and plugins' 5description 'Installs and configures the OpenStack Network API Service and various agents and plugins'
6long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) 6long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7version '17.0.0' 7version '18.0.0'
8 8
9%w(ubuntu redhat centos).each do |os| 9%w(ubuntu redhat centos).each do |os|
10 supports os 10 supports os
11end 11end
12 12
13depends 'openstack-common', '>= 17.0.0' 13depends 'openstack-common', '>= 18.0.0'
14depends 'openstack-identity', '>= 17.0.0' 14depends 'openstack-identity', '>= 18.0.0'
15depends 'openstackclient' 15depends 'openstackclient'
16 16
17issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url) 17issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
diff --git a/spec/db_migration_spec.rb b/spec/db_migration_spec.rb
index ad6190f..fb54a7c 100644
--- a/spec/db_migration_spec.rb
+++ b/spec/db_migration_spec.rb
@@ -6,7 +6,7 @@ describe 'openstack-network::db_migration' do
6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 8 let(:chef_run) do
9 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 9 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 runner.converge(described_recipe) 10 runner.converge(described_recipe)
11 end 11 end
12 12
@@ -18,7 +18,7 @@ describe 'openstack-network::db_migration' do
18 end 18 end
19 19
20 it 'uses db upgrade head with timeout override for neutron-server' do 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 expect(chef_run).to run_bash('migrate network database').with( 22 expect(chef_run).to run_bash('migrate network database').with(
23 code: /upgrade head/, 23 code: /upgrade head/,
24 timeout: 1234 24 timeout: 1234
@@ -26,10 +26,10 @@ describe 'openstack-network::db_migration' do
26 end 26 end
27 describe 'run db-migration when services are enabled' do 27 describe 'run db-migration when services are enabled' do
28 before do 28 before do
29 node.set['openstack']['network_vpnaas']['enabled'] = true 29 node.override['openstack']['network_vpnaas']['enabled'] = true
30 node.set['openstack']['network_fwaas']['enabled'] = true 30 node.override['openstack']['network_fwaas']['enabled'] = true
31 node.set['openstack']['network_lbaas']['enabled'] = true 31 node.override['openstack']['network_lbaas']['enabled'] = true
32 node.set['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini' 32 node.override['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
33 end 33 end
34 it 'uses db upgrade head when vpnaas is enabled' do 34 it 'uses db upgrade head when vpnaas is enabled' do
35 migrate_cmd = %r{neutron-db-manage --subproject neutron-vpnaas --config-file /etc/neutron/neutron.conf| 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 end 58 end
59 describe 'run db-migration when services are enabled' do 59 describe 'run db-migration when services are enabled' do
60 before do 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 end 62 end
63 63
64 it 'does not use db upgrade head when vpnaas is not enabled' do 64 it 'does not use db upgrade head when vpnaas is not enabled' do
diff --git a/spec/dhcp_agent-centos_spec.rb b/spec/dhcp_agent-centos_spec.rb
index 1029acb..8f5967c 100644
--- a/spec/dhcp_agent-centos_spec.rb
+++ b/spec/dhcp_agent-centos_spec.rb
@@ -6,7 +6,7 @@ describe 'openstack-network::dhcp_agent' do
6 let(:runner) { ChefSpec::SoloRunner.new(CENTOS_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(CENTOS_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 cached(:chef_run) do 8 cached(:chef_run) do
9 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 9 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 runner.converge(described_recipe) 10 runner.converge(described_recipe)
11 end 11 end
12 12
diff --git a/spec/dhcp_agent_spec.rb b/spec/dhcp_agent_spec.rb
index 7c6d1eb..edd4af2 100644
--- a/spec/dhcp_agent_spec.rb
+++ b/spec/dhcp_agent_spec.rb
@@ -6,7 +6,7 @@ describe 'openstack-network::dhcp_agent' do
6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 8 let(:chef_run) do
9 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 9 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 runner.converge(described_recipe) 10 runner.converge(described_recipe)
11 end 11 end
12 include_context 'neutron-stubs' 12 include_context 'neutron-stubs'
diff --git a/spec/identity_registration_spec.rb b/spec/identity_registration_spec.rb
index 01a8adc..18aeaff 100644
--- a/spec/identity_registration_spec.rb
+++ b/spec/identity_registration_spec.rb
@@ -6,7 +6,7 @@ describe 'openstack-network::identity_registration' do
6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 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 runner.converge(described_recipe) 11 runner.converge(described_recipe)
12 end 12 end
diff --git a/spec/l3_agent-redhat_spec.rb b/spec/l3_agent-redhat_spec.rb
index e8ef1e7..24ea35b 100644
--- a/spec/l3_agent-redhat_spec.rb
+++ b/spec/l3_agent-redhat_spec.rb
@@ -6,7 +6,7 @@ describe 'openstack-network::l3_agent' do
6 let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 8 let(:chef_run) do
9 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 9 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 stub_command('ovs-vsctl br-exists br-ex').and_return(false) 10 stub_command('ovs-vsctl br-exists br-ex').and_return(false)
11 runner.converge(described_recipe) 11 runner.converge(described_recipe)
12 end 12 end
diff --git a/spec/l3_agent_spec.rb b/spec/l3_agent_spec.rb
index 8bc6672..380f3e0 100644
--- a/spec/l3_agent_spec.rb
+++ b/spec/l3_agent_spec.rb
@@ -6,7 +6,7 @@ describe 'openstack-network::l3_agent' do
6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 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 runner.converge(described_recipe) 10 runner.converge(described_recipe)
11 end 11 end
12 describe 'recipe' do 12 describe 'recipe' do
@@ -43,7 +43,7 @@ describe 'openstack-network::l3_agent' do
43 end 43 end
44 44
45 it 'displays the external_network_bridge l3 attribute' do 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 stub_command('ovs-vsctl br-exists network_l3_external_network_bridge_value').and_return(false) 47 stub_command('ovs-vsctl br-exists network_l3_external_network_bridge_value').and_return(false)
48 expect(chef_run).to render_file(file.name).with_content(/^external_network_bridge = network_l3_external_network_bridge_value$/) 48 expect(chef_run).to render_file(file.name).with_content(/^external_network_bridge = network_l3_external_network_bridge_value$/)
49 end 49 end
diff --git a/spec/lbaas-redhat_spec.rb b/spec/lbaas-redhat_spec.rb
index 3b537e7..103fd0b 100644
--- a/spec/lbaas-redhat_spec.rb
+++ b/spec/lbaas-redhat_spec.rb
@@ -6,8 +6,8 @@ describe 'openstack-network::lbaas' do
6 let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 8 let(:chef_run) do
9 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 9 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 node.set['openstack']['network']['lbaas']['enabled'] = 'True' 10 node.override['openstack']['network']['lbaas']['enabled'] = 'True'
11 runner.converge(described_recipe) 11 runner.converge(described_recipe)
12 end 12 end
13 13
diff --git a/spec/metadata_agent_spec.rb b/spec/metadata_agent_spec.rb
index a953379..80daafa 100644
--- a/spec/metadata_agent_spec.rb
+++ b/spec/metadata_agent_spec.rb
@@ -6,7 +6,7 @@ describe 'openstack-network::metadata_agent' do
6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 8 let(:chef_run) do
9 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 9 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 runner.converge(described_recipe) 10 runner.converge(described_recipe)
11 end 11 end
12 12
diff --git a/spec/ml2_linuxbridge-redhat_spec.rb b/spec/ml2_linuxbridge-redhat_spec.rb
index f6cccc4..28d366e 100644
--- a/spec/ml2_linuxbridge-redhat_spec.rb
+++ b/spec/ml2_linuxbridge-redhat_spec.rb
@@ -16,9 +16,9 @@ describe 'openstack-network::ml2_linuxbridge' do
16 include_context 'neutron-stubs' 16 include_context 'neutron-stubs'
17 17
18 before do 18 before do
19 node.set['openstack']['network']['plugins']['linuxbridge']['path'] = 19 node.override['openstack']['network']['plugins']['linuxbridge']['path'] =
20 '/etc/neutron/plugins/ml2' 20 '/etc/neutron/plugins/ml2'
21 node.set['openstack']['network']['plugins']['linuxbridge']['filename'] = 21 node.override['openstack']['network']['plugins']['linuxbridge']['filename'] =
22 'linuxbridge_agent.ini' 22 'linuxbridge_agent.ini'
23 end 23 end
24 it 'creates the /etc/neutron/plugins/ml2 agent directory' do 24 it 'creates the /etc/neutron/plugins/ml2 agent directory' do
diff --git a/spec/ml2_linuxbridge_spec.rb b/spec/ml2_linuxbridge_spec.rb
index 7e5e4eb..08034d8 100644
--- a/spec/ml2_linuxbridge_spec.rb
+++ b/spec/ml2_linuxbridge_spec.rb
@@ -10,16 +10,16 @@ describe 'openstack-network::ml2_linuxbridge' do
10 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 10 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
11 let(:node) { runner.node } 11 let(:node) { runner.node }
12 let(:chef_run) do 12 let(:chef_run) do
13 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 13 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
14 runner.converge(described_recipe) 14 runner.converge(described_recipe)
15 end 15 end
16 16
17 include_context 'neutron-stubs' 17 include_context 'neutron-stubs'
18 18
19 before do 19 before do
20 node.set['openstack']['network']['plugins']['linuxbridge']['path'] = 20 node.override['openstack']['network']['plugins']['linuxbridge']['path'] =
21 '/etc/neutron/plugins/linuxbridge' 21 '/etc/neutron/plugins/linuxbridge'
22 node.set['openstack']['network']['plugins']['linuxbridge']['filename'] = 22 node.override['openstack']['network']['plugins']['linuxbridge']['filename'] =
23 'linuxbridge_conf.ini' 23 'linuxbridge_conf.ini'
24 end 24 end
25 it 'creates the /etc/neutron/plugins/linuxbridge agent directory' do 25 it 'creates the /etc/neutron/plugins/linuxbridge agent directory' do
diff --git a/spec/openvswitch_agent_spec.rb b/spec/openvswitch_agent_spec.rb
index c8a7c69..857dcb5 100644
--- a/spec/openvswitch_agent_spec.rb
+++ b/spec/openvswitch_agent_spec.rb
@@ -6,7 +6,7 @@ describe 'openstack-network::openvswitch_agent' do
6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 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 runner.converge(described_recipe) 10 runner.converge(described_recipe)
11 end 11 end
12 before do 12 before do
diff --git a/spec/plugin_config_spec.rb b/spec/plugin_config_spec.rb
index 021886a..18e2e6b 100644
--- a/spec/plugin_config_spec.rb
+++ b/spec/plugin_config_spec.rb
@@ -6,14 +6,14 @@ describe 'openstack-network::plugin_config' do
6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 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 ml2['path'] = '/etc/neutron/more_plugins' 10 ml2['path'] = '/etc/neutron/more_plugins'
11 ml2['filename'] = 'ml2_conf.ini' 11 ml2['filename'] = 'ml2_conf.ini'
12 ml2['conf'].tap do |conf| 12 ml2['conf'].tap do |conf|
13 conf['section']['key'] = 'value' 13 conf['section']['key'] = 'value'
14 end 14 end
15 end 15 end
16 node.set['openstack']['network']['plugins']['openvswitch'].tap do |ovs| 16 node.override['openstack']['network']['plugins']['openvswitch'].tap do |ovs|
17 ovs['path'] = '/etc/neutron/plugins/' 17 ovs['path'] = '/etc/neutron/plugins/'
18 ovs['filename'] = 'openvswitch_conf.ini' 18 ovs['filename'] = 'openvswitch_conf.ini'
19 ovs['conf'].tap do |conf| 19 ovs['conf'].tap do |conf|
diff --git a/spec/server-redhat_spec.rb b/spec/server-redhat_spec.rb
index a3da4a7..ac88edf 100644
--- a/spec/server-redhat_spec.rb
+++ b/spec/server-redhat_spec.rb
@@ -6,12 +6,12 @@ describe 'openstack-network::server' do
6 let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 8 let(:chef_run) do
9 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 9 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 runner.converge(described_recipe) 10 runner.converge(described_recipe)
11 end 11 end
12 before do 12 before do
13 node.set['openstack']['network']['plugins']['ml2']['path'] = '/etc/neutron/plugins/ml2' 13 node.override['openstack']['network']['plugins']['ml2']['path'] = '/etc/neutron/plugins/ml2'
14 node.set['openstack']['network']['plugins']['ml2']['filename'] = 'openvswitch_agent.ini' 14 node.override['openstack']['network']['plugins']['ml2']['filename'] = 'openvswitch_agent.ini'
15 end 15 end
16 include_context 'neutron-stubs' 16 include_context 'neutron-stubs'
17 17
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index f5f3351..2d95525 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -56,13 +56,13 @@ shared_context 'neutron-stubs' do
56 end 56 end
57 shared_examples 'custom template banner displayer' do 57 shared_examples 'custom template banner displayer' do
58 it 'shows the custom banner' do 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 expect(chef_run).to render_file(file_name).with_content(/^custom_template_banner_value$/) 60 expect(chef_run).to render_file(file_name).with_content(/^custom_template_banner_value$/)
61 end 61 end
62 end 62 end
63 shared_examples 'common network attributes displayer' do |plugin| 63 shared_examples 'common network attributes displayer' do |plugin|
64 it 'displays the interface_driver common attribute' do 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 expect(chef_run).to render_file(file_name).with_content(/^interface_driver = network_interface_driver_value$/) 66 expect(chef_run).to render_file(file_name).with_content(/^interface_driver = network_interface_driver_value$/)
67 end 67 end
68 end 68 end
@@ -75,7 +75,7 @@ shared_context 'neutron-stubs' do
75 %w(resync_interval ovs_use_veth enable_isolated_metadata 75 %w(resync_interval ovs_use_veth enable_isolated_metadata
76 enable_metadata_network dnsmasq_lease_max dhcp_delete_namespaces).each do |attr| 76 enable_metadata_network dnsmasq_lease_max dhcp_delete_namespaces).each do |attr|
77 it "displays the #{attr} dhcp attribute" do 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 expect(chef_run).to render_file(file_name).with_content(/^#{attr} = network_dhcp_#{attr}_value$/) 79 expect(chef_run).to render_file(file_name).with_content(/^#{attr} = network_dhcp_#{attr}_value$/)
80 end 80 end
81 end 81 end
diff --git a/spec/vpnaas-redhat_spec.rb b/spec/vpnaas-redhat_spec.rb
index 5c712fe..fe59fa3 100644
--- a/spec/vpnaas-redhat_spec.rb
+++ b/spec/vpnaas-redhat_spec.rb
@@ -6,8 +6,8 @@ describe 'openstack-network::vpnaas' do
6 let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 8 let(:chef_run) do
9 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 9 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 node.set['openstack']['network']['enable_vpn'] = true 10 node.override['openstack']['network']['enable_vpn'] = true
11 stub_command('ovs-vsctl br-exists br-ex').and_return(false) 11 stub_command('ovs-vsctl br-exists br-ex').and_return(false)
12 runner.converge(described_recipe) 12 runner.converge(described_recipe)
13 end 13 end
diff --git a/spec/vpnaas_spec.rb b/spec/vpnaas_spec.rb
index 24400cc..d9ec218 100644
--- a/spec/vpnaas_spec.rb
+++ b/spec/vpnaas_spec.rb
@@ -6,7 +6,7 @@ describe 'openstack-network::vpnaas' do
6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) } 6 let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
7 let(:node) { runner.node } 7 let(:node) { runner.node }
8 let(:chef_run) do 8 let(:chef_run) do
9 node.set['openstack']['compute']['network']['service_type'] = 'neutron' 9 node.override['openstack']['compute']['network']['service_type'] = 'neutron'
10 runner.converge(described_recipe) 10 runner.converge(described_recipe)
11 end 11 end
12 12
@@ -59,7 +59,7 @@ describe 'openstack-network::vpnaas' do
59 end 59 end
60 60
61 it 'renders no setted vpn_device_driver entry in vpn_agent.ini, when no vpn_device_driver set' do 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 chef_run.converge(described_recipe) 63 chef_run.converge(described_recipe)
64 expect(chef_run).to render_config_file(file.name).with_section_content('vpnagent', /^vpn_device_driver = $/) 64 expect(chef_run).to render_config_file(file.name).with_section_content('vpnagent', /^vpn_device_driver = $/)
65 end 65 end