- Cookstyle fixes - Refactor Berksfile to use groups so we can exclude integration testing cookbooks - Update documentation - Cleanup line wraps - Enable sensitive resources for the template[/etc/neutron/neutron.conf] and template[/etc/neutron/metadata_agent.ini] to resources improve security. - Update delivery configuration to exclude integration cookbooks - Fix ChefSpec output. - Update lbaas recipe to use v2 agent driver. - Add recommended configuration settings to neutron.conf based in Stein installation docs. - Remove any resources that define the default action. - Switch package installations to send packages as arrays instead of individual package resources. This generally speeds up chef runs. - Manage /etc/neutron/neutron_lbaas.conf so we can set service_provider properly. - Add some missing ChefSpec tests. - Configure neutron_lbaas.conf on Ubuntu in a manner that allows it to properly pull in the configuration via the --config-dir option. This is due to the fact we need to set an additional [service_providers] service_provider line and we can't do that with hashes. - Remove FWaaS as it's unmaintained upstream. Depends-On: https://review.opendev.org/701027 Depends-On: https://review.opendev.org/706151 Change-Id: Id29884766440d37fa18fd62f3f93eecc22224d51
46 lines
1.4 KiB
Ruby
46 lines
1.4 KiB
Ruby
# Encoding: utf-8
|
|
require_relative 'spec_helper'
|
|
|
|
describe 'openstack-network::plugin_config' do
|
|
describe 'ubuntu' do
|
|
let(:runner) { ChefSpec::SoloRunner.new(UBUNTU_OPTS) }
|
|
let(:node) { runner.node }
|
|
cached(:chef_run) do
|
|
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.override['openstack']['network']['plugins']['openvswitch'].tap do |ovs|
|
|
ovs['path'] = '/etc/neutron/plugins/'
|
|
ovs['filename'] = 'openvswitch_conf.ini'
|
|
ovs['conf'].tap do |conf|
|
|
conf['section']['key'] = 'value'
|
|
end
|
|
end
|
|
runner.converge(described_recipe)
|
|
end
|
|
|
|
%w(/etc/neutron/more_plugins /etc/neutron/plugins/).each do |dir|
|
|
it do
|
|
expect(chef_run).to create_directory(dir)
|
|
.with(
|
|
recursive: true,
|
|
owner: 'neutron',
|
|
group: 'neutron',
|
|
mode: '700'
|
|
)
|
|
end
|
|
|
|
%w(ml2_conf.ini openvswitch_conf.ini).each do |conf|
|
|
let(:file) { chef_run.template(File.join(dir, conf)) }
|
|
it do
|
|
expect(chef_run).to render_config_file(file.name).with_section_content('section', 'key = value')
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|