starting rocky development patch
Change-Id: I4d16b90987e8fb6569ff8775694868e2ad91eeef
This commit is contained in:
parent
3d096b57fd
commit
22d034d20a
|
@ -1,3 +1,5 @@
|
|||
inherit_from: .rubocop_todo.yml
|
||||
|
||||
AllCops:
|
||||
Include:
|
||||
- metadata.rb
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config`
|
||||
# on 2018-08-03 05:26:05 -0700 using RuboCop version 0.55.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 5
|
||||
# Cop supports --auto-correct.
|
||||
Style/IfUnlessModifier:
|
||||
Exclude:
|
||||
- 'attributes/neutron_conf.rb'
|
||||
- 'recipes/default.rb'
|
||||
- 'recipes/l3_agent.rb'
|
||||
|
||||
# Offense count: 135
|
||||
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Metrics/LineLength:
|
||||
Max: 202
|
|
@ -9,6 +9,6 @@ source 'https://supermarket.chef.io'
|
|||
end
|
||||
|
||||
cookbook 'openstackclient',
|
||||
github: 'cloudbau/cookbook-openstackclient'
|
||||
git: 'https://git.openstack.org/openstack/cookbook-openstackclient'
|
||||
|
||||
metadata
|
||||
|
|
|
@ -4,14 +4,14 @@ maintainer_email 'openstack-dev@lists.openstack.org'
|
|||
license 'Apache-2.0'
|
||||
description 'Installs and configures the OpenStack Network API Service and various agents and plugins'
|
||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||
version '17.0.0'
|
||||
version '18.0.0'
|
||||
|
||||
%w(ubuntu redhat centos).each do |os|
|
||||
supports os
|
||||
end
|
||||
|
||||
depends 'openstack-common', '>= 17.0.0'
|
||||
depends 'openstack-identity', '>= 17.0.0'
|
||||
depends 'openstack-common', '>= 18.0.0'
|
||||
depends 'openstack-identity', '>= 18.0.0'
|
||||
depends 'openstackclient'
|
||||
|
||||
issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'openstack-network::db_migration' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
|
@ -18,7 +18,7 @@ describe 'openstack-network::db_migration' do
|
|||
end
|
||||
|
||||
it 'uses db upgrade head with timeout override for neutron-server' do
|
||||
node.set['openstack']['network']['dbsync_timeout'] = 1234
|
||||
node.override['openstack']['network']['dbsync_timeout'] = 1234
|
||||
expect(chef_run).to run_bash('migrate network database').with(
|
||||
code: /upgrade head/,
|
||||
timeout: 1234
|
||||
|
@ -26,10 +26,10 @@ describe 'openstack-network::db_migration' do
|
|||
end
|
||||
describe 'run db-migration when services are enabled' do
|
||||
before do
|
||||
node.set['openstack']['network_vpnaas']['enabled'] = true
|
||||
node.set['openstack']['network_fwaas']['enabled'] = true
|
||||
node.set['openstack']['network_lbaas']['enabled'] = true
|
||||
node.set['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
|
||||
node.override['openstack']['network_vpnaas']['enabled'] = true
|
||||
node.override['openstack']['network_fwaas']['enabled'] = true
|
||||
node.override['openstack']['network_lbaas']['enabled'] = true
|
||||
node.override['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
|
||||
end
|
||||
it 'uses db upgrade head when vpnaas is enabled' do
|
||||
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
|
|||
end
|
||||
describe 'run db-migration when services are enabled' do
|
||||
before do
|
||||
node.set['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
|
||||
node.override['openstack']['network']['core_plugin_config_file'] = '/etc/neutron/plugins/ml2/ml2_conf.ini'
|
||||
end
|
||||
|
||||
it 'does not use db upgrade head when vpnaas is not enabled' do
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'openstack-network::dhcp_agent' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(CENTOS_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
cached(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'openstack-network::dhcp_agent' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
include_context 'neutron-stubs'
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'openstack-network::identity_registration' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'openstack-network::l3_agent' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
stub_command('ovs-vsctl br-exists br-ex').and_return(false)
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'openstack-network::l3_agent' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['network_l3']['external_network_bridge_interface'] = 'enp0s8'
|
||||
node.override['openstack']['network_l3']['external_network_bridge_interface'] = 'enp0s8'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
describe 'recipe' do
|
||||
|
@ -43,7 +43,7 @@ describe 'openstack-network::l3_agent' do
|
|||
end
|
||||
|
||||
it 'displays the external_network_bridge l3 attribute' do
|
||||
node.set['openstack']['network_l3']['conf']['DEFAULT']['external_network_bridge'] = 'network_l3_external_network_bridge_value'
|
||||
node.override['openstack']['network_l3']['conf']['DEFAULT']['external_network_bridge'] = 'network_l3_external_network_bridge_value'
|
||||
stub_command('ovs-vsctl br-exists network_l3_external_network_bridge_value').and_return(false)
|
||||
expect(chef_run).to render_file(file.name).with_content(/^external_network_bridge = network_l3_external_network_bridge_value$/)
|
||||
end
|
||||
|
|
|
@ -6,8 +6,8 @@ describe 'openstack-network::lbaas' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.set['openstack']['network']['lbaas']['enabled'] = 'True'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['network']['lbaas']['enabled'] = 'True'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'openstack-network::metadata_agent' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ describe 'openstack-network::ml2_linuxbridge' do
|
|||
include_context 'neutron-stubs'
|
||||
|
||||
before do
|
||||
node.set['openstack']['network']['plugins']['linuxbridge']['path'] =
|
||||
node.override['openstack']['network']['plugins']['linuxbridge']['path'] =
|
||||
'/etc/neutron/plugins/ml2'
|
||||
node.set['openstack']['network']['plugins']['linuxbridge']['filename'] =
|
||||
node.override['openstack']['network']['plugins']['linuxbridge']['filename'] =
|
||||
'linuxbridge_agent.ini'
|
||||
end
|
||||
it 'creates the /etc/neutron/plugins/ml2 agent directory' do
|
||||
|
|
|
@ -10,16 +10,16 @@ describe 'openstack-network::ml2_linuxbridge' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
include_context 'neutron-stubs'
|
||||
|
||||
before do
|
||||
node.set['openstack']['network']['plugins']['linuxbridge']['path'] =
|
||||
node.override['openstack']['network']['plugins']['linuxbridge']['path'] =
|
||||
'/etc/neutron/plugins/linuxbridge'
|
||||
node.set['openstack']['network']['plugins']['linuxbridge']['filename'] =
|
||||
node.override['openstack']['network']['plugins']['linuxbridge']['filename'] =
|
||||
'linuxbridge_conf.ini'
|
||||
end
|
||||
it 'creates the /etc/neutron/plugins/linuxbridge agent directory' do
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'openstack-network::openvswitch_agent' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['network']['openvswitch']['integration_bridge'] = 'br-int'
|
||||
node.override['openstack']['network']['openvswitch']['integration_bridge'] = 'br-int'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
before do
|
||||
|
|
|
@ -6,14 +6,14 @@ describe 'openstack-network::plugin_config' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['network']['plugins']['ml2'].tap do |ml2|
|
||||
node.override['openstack']['network']['plugins']['ml2'].tap do |ml2|
|
||||
ml2['path'] = '/etc/neutron/more_plugins'
|
||||
ml2['filename'] = 'ml2_conf.ini'
|
||||
ml2['conf'].tap do |conf|
|
||||
conf['section']['key'] = 'value'
|
||||
end
|
||||
end
|
||||
node.set['openstack']['network']['plugins']['openvswitch'].tap do |ovs|
|
||||
node.override['openstack']['network']['plugins']['openvswitch'].tap do |ovs|
|
||||
ovs['path'] = '/etc/neutron/plugins/'
|
||||
ovs['filename'] = 'openvswitch_conf.ini'
|
||||
ovs['conf'].tap do |conf|
|
||||
|
|
|
@ -6,12 +6,12 @@ describe 'openstack-network::server' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
before do
|
||||
node.set['openstack']['network']['plugins']['ml2']['path'] = '/etc/neutron/plugins/ml2'
|
||||
node.set['openstack']['network']['plugins']['ml2']['filename'] = 'openvswitch_agent.ini'
|
||||
node.override['openstack']['network']['plugins']['ml2']['path'] = '/etc/neutron/plugins/ml2'
|
||||
node.override['openstack']['network']['plugins']['ml2']['filename'] = 'openvswitch_agent.ini'
|
||||
end
|
||||
include_context 'neutron-stubs'
|
||||
|
||||
|
|
|
@ -56,13 +56,13 @@ shared_context 'neutron-stubs' do
|
|||
end
|
||||
shared_examples 'custom template banner displayer' do
|
||||
it 'shows the custom banner' do
|
||||
node.set['openstack']['network']['custom_template_banner'] = 'custom_template_banner_value'
|
||||
node.override['openstack']['network']['custom_template_banner'] = 'custom_template_banner_value'
|
||||
expect(chef_run).to render_file(file_name).with_content(/^custom_template_banner_value$/)
|
||||
end
|
||||
end
|
||||
shared_examples 'common network attributes displayer' do |plugin|
|
||||
it 'displays the interface_driver common attribute' do
|
||||
node.set['openstack']["network_#{plugin}"]['conf']['DEFAULT']['interface_driver'] = 'network_interface_driver_value'
|
||||
node.override['openstack']["network_#{plugin}"]['conf']['DEFAULT']['interface_driver'] = 'network_interface_driver_value'
|
||||
expect(chef_run).to render_file(file_name).with_content(/^interface_driver = network_interface_driver_value$/)
|
||||
end
|
||||
end
|
||||
|
@ -75,7 +75,7 @@ shared_context 'neutron-stubs' do
|
|||
%w(resync_interval ovs_use_veth enable_isolated_metadata
|
||||
enable_metadata_network dnsmasq_lease_max dhcp_delete_namespaces).each do |attr|
|
||||
it "displays the #{attr} dhcp attribute" do
|
||||
node.set['openstack']['network_dhcp']['conf']['DEFAULT'][attr] = "network_dhcp_#{attr}_value"
|
||||
node.override['openstack']['network_dhcp']['conf']['DEFAULT'][attr] = "network_dhcp_#{attr}_value"
|
||||
expect(chef_run).to render_file(file_name).with_content(/^#{attr} = network_dhcp_#{attr}_value$/)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,8 +6,8 @@ describe 'openstack-network::vpnaas' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(REDHAT_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.set['openstack']['network']['enable_vpn'] = true
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['network']['enable_vpn'] = true
|
||||
stub_command('ovs-vsctl br-exists br-ex').and_return(false)
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ describe 'openstack-network::vpnaas' do
|
|||
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
||||
let(:node) { runner.node }
|
||||
let(:chef_run) do
|
||||
node.set['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
node.override['openstack']['compute']['network']['service_type'] = 'neutron'
|
||||
runner.converge(described_recipe)
|
||||
end
|
||||
|
||||
|
@ -59,7 +59,7 @@ describe 'openstack-network::vpnaas' do
|
|||
end
|
||||
|
||||
it 'renders no setted vpn_device_driver entry in vpn_agent.ini, when no vpn_device_driver set' do
|
||||
chef_run.node.set['openstack']['network_vpnaas']['conf']['vpnagent']['vpn_device_driver'] = ''
|
||||
chef_run.node.override['openstack']['network_vpnaas']['conf']['vpnagent']['vpn_device_driver'] = ''
|
||||
chef_run.converge(described_recipe)
|
||||
expect(chef_run).to render_config_file(file.name).with_section_content('vpnagent', /^vpn_device_driver = $/)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue