Remove Neutron FWaaS
Neutron FWaaS is no longer supported since Wallaby[1], because
the project it self has been retired.
[1] 80f2b44bcb
Change-Id: Ib8a0b89f11dd1c456b08eb51e4c4d38fb1a2e715
This commit is contained in:
parent
32d05ebb36
commit
41efa1c308
@ -1,16 +0,0 @@
|
|||||||
# DEPRECATED!
|
|
||||||
Puppet::Type.type(:neutron_fwaas_service_config).provide(
|
|
||||||
:ini_setting,
|
|
||||||
:parent => Puppet::Type.type(:openstack_config).provider(:ini_setting)
|
|
||||||
) do
|
|
||||||
|
|
||||||
def self.file_path
|
|
||||||
'/etc/neutron/fwaas_driver.ini'
|
|
||||||
end
|
|
||||||
|
|
||||||
# added for backwards compatibility with older versions of inifile
|
|
||||||
def file_path
|
|
||||||
self.class.file_path
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
@ -1,29 +0,0 @@
|
|||||||
# DEPRECATED!
|
|
||||||
Puppet::Type.newtype(:neutron_fwaas_service_config) do
|
|
||||||
|
|
||||||
ensurable
|
|
||||||
|
|
||||||
newparam(:name, :namevar => true) do
|
|
||||||
desc 'Section/setting name to manage from fwaas_driver.ini'
|
|
||||||
newvalues(/\S+\/\S+/)
|
|
||||||
end
|
|
||||||
|
|
||||||
newproperty(:value) do
|
|
||||||
desc 'The value of the setting to be defined.'
|
|
||||||
munge do |value|
|
|
||||||
value = value.to_s.strip
|
|
||||||
value.capitalize! if value =~ /^(true|false)$/i
|
|
||||||
value
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
newparam(:ensure_absent_val) do
|
|
||||||
desc 'A value that is specified as the value property will behave as if ensure => absent was specified'
|
|
||||||
defaultto('<SERVICE DEFAULT>')
|
|
||||||
end
|
|
||||||
|
|
||||||
autorequire(:anchor) do
|
|
||||||
['neutron::install::end']
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
@ -43,7 +43,6 @@ class neutron::deps {
|
|||||||
Anchor['neutron::config::begin'] -> Neutron_sfc_service_config<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_sfc_service_config<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_config<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_config<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_dhcp_agent_config<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_dhcp_agent_config<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_fwaas_service_config<||> ~> Anchor['neutron::config::end']
|
|
||||||
Anchor['neutron::config::begin'] -> Neutron_l2gw_agent_config<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_l2gw_agent_config<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_l3_agent_config<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_l3_agent_config<||> ~> Anchor['neutron::config::end']
|
||||||
Anchor['neutron::config::begin'] -> Neutron_metadata_agent_config<||> ~> Anchor['neutron::config::end']
|
Anchor['neutron::config::begin'] -> Neutron_metadata_agent_config<||> ~> Anchor['neutron::config::end']
|
||||||
|
@ -71,7 +71,6 @@ class neutron::params {
|
|||||||
$libreswan_package = 'libreswan'
|
$libreswan_package = 'libreswan'
|
||||||
$metadata_agent_package = false
|
$metadata_agent_package = false
|
||||||
$l3_agent_package = false
|
$l3_agent_package = false
|
||||||
$fwaas_package = 'openstack-neutron-fwaas'
|
|
||||||
$neutron_wsgi_script_path = '/var/www/cgi-bin/neutron'
|
$neutron_wsgi_script_path = '/var/www/cgi-bin/neutron'
|
||||||
$neutron_wsgi_script_source = '/usr/bin/neutron-api'
|
$neutron_wsgi_script_source = '/usr/bin/neutron-api'
|
||||||
$networking_baremetal_package = 'python3-networking-baremetal'
|
$networking_baremetal_package = 'python3-networking-baremetal'
|
||||||
@ -119,7 +118,6 @@ class neutron::params {
|
|||||||
$libreswan_package = false
|
$libreswan_package = false
|
||||||
$metadata_agent_package = 'neutron-metadata-agent'
|
$metadata_agent_package = 'neutron-metadata-agent'
|
||||||
$l3_agent_package = 'neutron-l3-agent'
|
$l3_agent_package = 'neutron-l3-agent'
|
||||||
$fwaas_package = 'python3-neutron-fwaas'
|
|
||||||
$l2gw_agent_package = 'neutron-l2gateway-agent'
|
$l2gw_agent_package = 'neutron-l2gateway-agent'
|
||||||
$l2gw_package = 'python3-networking-l2gw'
|
$l2gw_package = 'python3-networking-l2gw'
|
||||||
$neutron_wsgi_script_path = '/usr/lib/cgi-bin/neutron'
|
$neutron_wsgi_script_path = '/usr/lib/cgi-bin/neutron'
|
||||||
|
@ -225,13 +225,6 @@
|
|||||||
# mechanism driver for Neutron.
|
# mechanism driver for Neutron.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
#
|
#
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
#
|
|
||||||
# [*ensure_fwaas_package*]
|
|
||||||
# (Optional) Ensures installation of FWaaS package before starting API service.
|
|
||||||
# Set to true to ensure installation of the package that is required to start neutron service if service_plugin is enabled.
|
|
||||||
# Defaults to undef.
|
|
||||||
#
|
|
||||||
class neutron::server (
|
class neutron::server (
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
@ -270,8 +263,6 @@ class neutron::server (
|
|||||||
$max_request_body_size = $::os_service_default,
|
$max_request_body_size = $::os_service_default,
|
||||||
$ovs_integration_bridge = $::os_service_default,
|
$ovs_integration_bridge = $::os_service_default,
|
||||||
$igmp_snooping_enable = $::os_service_default,
|
$igmp_snooping_enable = $::os_service_default,
|
||||||
# DEPRECATED PARAMETERS
|
|
||||||
$ensure_fwaas_package = undef,
|
|
||||||
) inherits neutron::params {
|
) inherits neutron::params {
|
||||||
|
|
||||||
include neutron::deps
|
include neutron::deps
|
||||||
@ -291,34 +282,6 @@ class neutron::server (
|
|||||||
validate_legacy(Array, 'validate_array', $service_providers)
|
validate_legacy(Array, 'validate_array', $service_providers)
|
||||||
}
|
}
|
||||||
|
|
||||||
if $ensure_fwaas_package {
|
|
||||||
warning('neutron::server::ensure_fwaas_package is deprecated and will be removed in a future release')
|
|
||||||
|
|
||||||
if ($::osfamily == 'Debian') {
|
|
||||||
# Debian platforms
|
|
||||||
if $vpnaas_agent_package {
|
|
||||||
ensure_resource( 'package', $::neutron::params::vpnaas_agent_package, {
|
|
||||||
'ensure' => $neutron::package_ensure,
|
|
||||||
'tag' => ['openstack', 'neutron-package'],
|
|
||||||
})
|
|
||||||
Package[$::neutron::params::vpnaas_agent_package] -> Neutron_fwaas_service_config<||>
|
|
||||||
} else {
|
|
||||||
ensure_resource( 'package', 'neutron-fwaas' , {
|
|
||||||
'name' => $::neutron::params::fwaas_package,
|
|
||||||
'ensure' => $neutron::package_ensure,
|
|
||||||
'tag' => ['openstack', 'neutron-package'],
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} elsif($::osfamily == 'Redhat') {
|
|
||||||
# RH platforms
|
|
||||||
ensure_resource( 'package', 'neutron-fwaas', {
|
|
||||||
'name' => $::neutron::params::fwaas_package,
|
|
||||||
'ensure' => $neutron::package_ensure,
|
|
||||||
'tag' => ['openstack', 'neutron-package'],
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if $ensure_vpnaas_package {
|
if $ensure_vpnaas_package {
|
||||||
ensure_resource( 'package', 'neutron-vpnaas-agent', {
|
ensure_resource( 'package', 'neutron-vpnaas-agent', {
|
||||||
'ensure' => $package_ensure,
|
'ensure' => $package_ensure,
|
||||||
|
@ -1,104 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
|
|
||||||
#
|
|
||||||
# Author: Emilien Macchi <emilien.macchi@enovance.com>
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# DEPRECATED!!!
|
|
||||||
#
|
|
||||||
# == Class: neutron::services::fwaas
|
|
||||||
#
|
|
||||||
# Configure the Firewall as a Service Neutron Plugin
|
|
||||||
#
|
|
||||||
# === Parameters:
|
|
||||||
#
|
|
||||||
# [*enabled*]
|
|
||||||
# (optional) Whether or not to enable the FWaaS neutron plugin Service
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*driver*]
|
|
||||||
# (optional) FWaaS Driver to use
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*agent_version*]
|
|
||||||
# (optional) Version of FWaaS API.
|
|
||||||
# Defaults to $::os_service_default
|
|
||||||
#
|
|
||||||
# [*vpnaas_agent_package*]
|
|
||||||
# (optional) Use VPNaaS agent package instead of L3 agent package on debian platforms
|
|
||||||
# RedHat platforms won't take care of this parameter
|
|
||||||
# true/false
|
|
||||||
# Defaults to false
|
|
||||||
#
|
|
||||||
# [*purge_config*]
|
|
||||||
# (optional) Whether to set only the specified config options
|
|
||||||
# in the fwaas config.
|
|
||||||
# Defaults to false.
|
|
||||||
#
|
|
||||||
|
|
||||||
class neutron::services::fwaas (
|
|
||||||
$enabled = $::os_service_default,
|
|
||||||
$driver = $::os_service_default,
|
|
||||||
$agent_version = $::os_service_default,
|
|
||||||
$vpnaas_agent_package = false,
|
|
||||||
$purge_config = false,
|
|
||||||
) {
|
|
||||||
|
|
||||||
include neutron::deps
|
|
||||||
include neutron::params
|
|
||||||
|
|
||||||
warning('neutron::services:fwaas is deprecated and will be removed in a future release.')
|
|
||||||
|
|
||||||
if ($::osfamily == 'Debian') {
|
|
||||||
# Debian platforms
|
|
||||||
if $vpnaas_agent_package {
|
|
||||||
ensure_resource( 'package', 'neutron-vpn-agent', {
|
|
||||||
'name' => $::neutron::params::vpnaas_agent_package,
|
|
||||||
'ensure' => $neutron::package_ensure,
|
|
||||||
'tag' => ['openstack', 'neutron-package'],
|
|
||||||
})
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
ensure_resource( 'package', 'neutron-fwaas' , {
|
|
||||||
'name' => $::neutron::params::fwaas_package,
|
|
||||||
'ensure' => $neutron::package_ensure,
|
|
||||||
'tag' => ['openstack', 'neutron-package'],
|
|
||||||
})
|
|
||||||
}
|
|
||||||
} elsif($::osfamily == 'Redhat') {
|
|
||||||
# RH platforms
|
|
||||||
ensure_resource( 'package', 'neutron-fwaas', {
|
|
||||||
'name' => $::neutron::params::fwaas_package,
|
|
||||||
'ensure' => $neutron::package_ensure,
|
|
||||||
'tag' => ['openstack', 'neutron-package'],
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
resources { 'neutron_fwaas_service_config':
|
|
||||||
purge => $purge_config,
|
|
||||||
}
|
|
||||||
|
|
||||||
neutron_config {
|
|
||||||
'fwaas/enabled': value => $enabled;
|
|
||||||
'fwaas/driver': value => $driver;
|
|
||||||
'fwaas/agent_version': value => $agent_version;
|
|
||||||
}
|
|
||||||
|
|
||||||
neutron_fwaas_service_config {
|
|
||||||
'fwaas/enabled': value => $enabled;
|
|
||||||
'fwaas/driver': value => $driver;
|
|
||||||
'fwaas/agent_version': value => $agent_version;
|
|
||||||
}
|
|
||||||
}
|
|
8
releasenotes/notes/remove-fwaas-53bc0bba767b7cae.yaml
Normal file
8
releasenotes/notes/remove-fwaas-53bc0bba767b7cae.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
upgrades:
|
||||||
|
- |
|
||||||
|
The ``neutron::server::ensure_fwaas_package`` parameter has been removed
|
||||||
|
- |
|
||||||
|
The ``neutron::services::fwaas`` class has been removed.
|
||||||
|
- |
|
||||||
|
The ``neutron_fwaas_service_config`` resource has been removed.
|
@ -5,7 +5,6 @@ describe 'basic neutron_config resource' do
|
|||||||
neutron_files = [ '/etc/neutron/api-paste.ini',
|
neutron_files = [ '/etc/neutron/api-paste.ini',
|
||||||
'/etc/neutron/neutron.conf',
|
'/etc/neutron/neutron.conf',
|
||||||
'/etc/neutron/dhcp_agent.ini',
|
'/etc/neutron/dhcp_agent.ini',
|
||||||
'/etc/neutron/fwaas_driver.ini',
|
|
||||||
'/etc/neutron/l3_agent.ini',
|
'/etc/neutron/l3_agent.ini',
|
||||||
'/etc/neutron/metadata_agent.ini',
|
'/etc/neutron/metadata_agent.ini',
|
||||||
'/etc/neutron/metering_agent.ini',
|
'/etc/neutron/metering_agent.ini',
|
||||||
@ -32,7 +31,6 @@ describe 'basic neutron_config resource' do
|
|||||||
File <||> -> Neutron_config <||>
|
File <||> -> Neutron_config <||>
|
||||||
File <||> -> Neutron_api_paste_ini <||>
|
File <||> -> Neutron_api_paste_ini <||>
|
||||||
File <||> -> Neutron_dhcp_agent_config <||>
|
File <||> -> Neutron_dhcp_agent_config <||>
|
||||||
File <||> -> Neutron_fwaas_service_config <||>
|
|
||||||
File <||> -> Neutron_l3_agent_config <||>
|
File <||> -> Neutron_l3_agent_config <||>
|
||||||
File <||> -> Neutron_metadata_agent_config <||>
|
File <||> -> Neutron_metadata_agent_config <||>
|
||||||
File <||> -> Neutron_metering_agent_config <||>
|
File <||> -> Neutron_metering_agent_config <||>
|
||||||
@ -69,7 +67,6 @@ describe 'basic neutron_config resource' do
|
|||||||
$neutron_files = [ '/etc/neutron/api-paste.ini',
|
$neutron_files = [ '/etc/neutron/api-paste.ini',
|
||||||
'/etc/neutron/neutron.conf',
|
'/etc/neutron/neutron.conf',
|
||||||
'/etc/neutron/dhcp_agent.ini',
|
'/etc/neutron/dhcp_agent.ini',
|
||||||
'/etc/neutron/fwaas_driver.ini',
|
|
||||||
'/etc/neutron/l3_agent.ini',
|
'/etc/neutron/l3_agent.ini',
|
||||||
'/etc/neutron/metadata_agent.ini',
|
'/etc/neutron/metadata_agent.ini',
|
||||||
'/etc/neutron/metering_agent.ini',
|
'/etc/neutron/metering_agent.ini',
|
||||||
@ -151,24 +148,6 @@ describe 'basic neutron_config resource' do
|
|||||||
ensure_absent_val => 'toto',
|
ensure_absent_val => 'toto',
|
||||||
}
|
}
|
||||||
|
|
||||||
neutron_fwaas_service_config { 'DEFAULT/thisshouldexist' :
|
|
||||||
value => 'foo',
|
|
||||||
}
|
|
||||||
|
|
||||||
neutron_fwaas_service_config { 'DEFAULT/thisshouldnotexist' :
|
|
||||||
value => '<SERVICE DEFAULT>',
|
|
||||||
}
|
|
||||||
|
|
||||||
neutron_fwaas_service_config { 'DEFAULT/thisshouldexist2' :
|
|
||||||
value => '<SERVICE DEFAULT>',
|
|
||||||
ensure_absent_val => 'toto',
|
|
||||||
}
|
|
||||||
|
|
||||||
neutron_fwaas_service_config { 'DEFAULT/thisshouldnotexist2' :
|
|
||||||
value => 'toto',
|
|
||||||
ensure_absent_val => 'toto',
|
|
||||||
}
|
|
||||||
|
|
||||||
neutron_l3_agent_config { 'DEFAULT/thisshouldexist' :
|
neutron_l3_agent_config { 'DEFAULT/thisshouldexist' :
|
||||||
value => 'foo',
|
value => 'foo',
|
||||||
}
|
}
|
||||||
@ -552,7 +531,6 @@ describe 'basic neutron_config resource' do
|
|||||||
resource_names = ['neutron_api_paste_ini',
|
resource_names = ['neutron_api_paste_ini',
|
||||||
'neutron_config',
|
'neutron_config',
|
||||||
'neutron_dhcp_agent_config',
|
'neutron_dhcp_agent_config',
|
||||||
'neutron_fwaas_service_config',
|
|
||||||
'neutron_l3_agent_config',
|
'neutron_l3_agent_config',
|
||||||
'neutron_metadata_agent_config',
|
'neutron_metadata_agent_config',
|
||||||
'neutron_plugin_cisco',
|
'neutron_plugin_cisco',
|
||||||
|
@ -274,16 +274,14 @@ describe 'neutron::server' do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
shared_examples 'VPNaaS and FWaaS package installation' do
|
shared_examples 'VPNaaS package installation' do
|
||||||
before do
|
before do
|
||||||
params.merge!(
|
params.merge!(
|
||||||
:ensure_vpnaas_package => true,
|
:ensure_vpnaas_package => true,
|
||||||
:ensure_fwaas_package => true,
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should install *aaS packages' do
|
it 'should install *aaS packages' do
|
||||||
should contain_package('neutron-fwaas')
|
|
||||||
should contain_package('neutron-vpnaas-agent')
|
should contain_package('neutron-vpnaas-agent')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,145 +0,0 @@
|
|||||||
#
|
|
||||||
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
|
|
||||||
#
|
|
||||||
# Author: Emilien Macchi <emilien.macchi@enovance.com>
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
||||||
# not use this file except in compliance with the License. You may obtain
|
|
||||||
# a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
||||||
# License for the specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
#
|
|
||||||
# Unit tests for neutron::services::fwaas class
|
|
||||||
#
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'neutron::services::fwaas' do
|
|
||||||
let :pre_condition do
|
|
||||||
"class { 'neutron': }
|
|
||||||
include neutron::agents::l3"
|
|
||||||
end
|
|
||||||
|
|
||||||
let :params do
|
|
||||||
{}
|
|
||||||
end
|
|
||||||
|
|
||||||
let :default_params do
|
|
||||||
{
|
|
||||||
:vpnaas_agent_package => false,
|
|
||||||
:purge_config => false,
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'neutron fwaas service plugin' do
|
|
||||||
let :params_hash do
|
|
||||||
default_params.merge(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'passes purge to resource' do
|
|
||||||
should contain_resources('neutron_fwaas_service_config').with({
|
|
||||||
:purge => false
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures driver in fwaas_driver.ini' do
|
|
||||||
should contain_neutron_fwaas_service_config('fwaas/driver').with_value('<SERVICE DEFAULT>')
|
|
||||||
should contain_neutron_fwaas_service_config('fwaas/enabled').with_value('<SERVICE DEFAULT>')
|
|
||||||
should contain_neutron_fwaas_service_config('fwaas/agent_version').with_value('<SERVICE DEFAULT>')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configures driver in neutron.conf' do
|
|
||||||
should contain_neutron_config('fwaas/driver').with_value('<SERVICE DEFAULT>')
|
|
||||||
should contain_neutron_config('fwaas/enabled').with_value('<SERVICE DEFAULT>')
|
|
||||||
should contain_neutron_config('fwaas/agent_version').with_value('<SERVICE DEFAULT>')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'neutron::services::fwaas on Ubuntu' do
|
|
||||||
it 'installs neutron fwaas package' do
|
|
||||||
should contain_package('neutron-fwaas').with(
|
|
||||||
:ensure => 'present',
|
|
||||||
:tag => ['openstack', 'neutron-package'],
|
|
||||||
:name => platform_params[:fwaas_package_name],
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'neutron::services::fwaas on Debian' do
|
|
||||||
context 'without VPNaaS package' do
|
|
||||||
it 'installs neutron fwaas package' do
|
|
||||||
should contain_package('neutron-fwaas').with(
|
|
||||||
:ensure => 'present',
|
|
||||||
:tag => ['openstack', 'neutron-package'],
|
|
||||||
:name => platform_params[:fwaas_package_name],
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with VPNaaS package' do
|
|
||||||
before do
|
|
||||||
params.merge!( :vpnaas_agent_package => true )
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'installs neutron vpnaas agent package' do
|
|
||||||
should contain_package('neutron-vpn-agent').with(
|
|
||||||
:ensure => 'present',
|
|
||||||
:name => platform_params[:vpnaas_package_name],
|
|
||||||
:tag => ['openstack', 'neutron-package'],
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
shared_examples 'neutron::services::fwaas on RedHat' do
|
|
||||||
it 'installs neutron fwaas service package' do
|
|
||||||
should contain_package('neutron-fwaas').with(
|
|
||||||
:ensure => 'present',
|
|
||||||
:name => platform_params[:fwaas_package_name],
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os({
|
|
||||||
:supported_os => OSDefaults.get_supported_os
|
|
||||||
}).each do |os,facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let (:facts) do
|
|
||||||
facts.merge!(OSDefaults.get_facts())
|
|
||||||
end
|
|
||||||
|
|
||||||
let (:platform_params) do
|
|
||||||
case facts[:osfamily]
|
|
||||||
when 'Debian'
|
|
||||||
{
|
|
||||||
:fwaas_package_name => 'python3-neutron-fwaas',
|
|
||||||
:vpnaas_package_name => 'python3-neutron-vpnaas'
|
|
||||||
}
|
|
||||||
when 'RedHat'
|
|
||||||
{
|
|
||||||
:fwaas_package_name => 'openstack-neutron-fwaas'
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like 'neutron fwaas service plugin'
|
|
||||||
|
|
||||||
case facts[:operatingsystem]
|
|
||||||
when 'Debian'
|
|
||||||
it_behaves_like 'neutron::services::fwaas on Debian'
|
|
||||||
when 'Ubuntu'
|
|
||||||
it_behaves_like 'neutron::services::fwaas on Ubuntu'
|
|
||||||
end
|
|
||||||
|
|
||||||
if facts[:osfamily] == 'RedHat'
|
|
||||||
it_behaves_like 'neutron::services::fwaas on RedHat'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
@ -1,74 +0,0 @@
|
|||||||
$LOAD_PATH.push(
|
|
||||||
File.join(
|
|
||||||
File.dirname(__FILE__),
|
|
||||||
'..',
|
|
||||||
'..',
|
|
||||||
'..',
|
|
||||||
'fixtures',
|
|
||||||
'modules',
|
|
||||||
'inifile',
|
|
||||||
'lib')
|
|
||||||
)
|
|
||||||
$LOAD_PATH.push(
|
|
||||||
File.join(
|
|
||||||
File.dirname(__FILE__),
|
|
||||||
'..',
|
|
||||||
'..',
|
|
||||||
'..',
|
|
||||||
'fixtures',
|
|
||||||
'modules',
|
|
||||||
'openstacklib',
|
|
||||||
'lib')
|
|
||||||
)
|
|
||||||
|
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
provider_class = Puppet::Type.type(:neutron_fwaas_service_config).provider(:ini_setting)
|
|
||||||
|
|
||||||
describe provider_class do
|
|
||||||
|
|
||||||
it 'should default to the default setting when no other one is specified' do
|
|
||||||
resource = Puppet::Type::Neutron_fwaas_service_config.new(
|
|
||||||
{
|
|
||||||
:name => 'DEFAULT/foo',
|
|
||||||
:value => 'bar'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
provider = provider_class.new(resource)
|
|
||||||
expect(provider.section).to eq('DEFAULT')
|
|
||||||
expect(provider.setting).to eq('foo')
|
|
||||||
expect(provider.file_path).to eq('/etc/neutron/fwaas_driver.ini')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should allow setting to be set explicitly' do
|
|
||||||
resource = Puppet::Type::Neutron_fwaas_service_config.new(
|
|
||||||
{
|
|
||||||
:name => 'dude/foo',
|
|
||||||
:value => 'bar'
|
|
||||||
}
|
|
||||||
)
|
|
||||||
provider = provider_class.new(resource)
|
|
||||||
expect(provider.section).to eq('dude')
|
|
||||||
expect(provider.setting).to eq('foo')
|
|
||||||
expect(provider.file_path).to eq('/etc/neutron/fwaas_driver.ini')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should ensure absent when <SERVICE DEFAULT> is specified as a value' do
|
|
||||||
resource = Puppet::Type::Neutron_fwaas_service_config.new(
|
|
||||||
{:name => 'dude/foo', :value => '<SERVICE DEFAULT>'}
|
|
||||||
)
|
|
||||||
provider = provider_class.new(resource)
|
|
||||||
provider.exists?
|
|
||||||
expect(resource[:ensure]).to eq :absent
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should ensure absent when value matches ensure_absent_val' do
|
|
||||||
resource = Puppet::Type::Neutron_fwaas_service_config.new(
|
|
||||||
{:name => 'dude/foo', :value => 'foo', :ensure_absent_val => 'foo' }
|
|
||||||
)
|
|
||||||
provider = provider_class.new(resource)
|
|
||||||
provider.exists?
|
|
||||||
expect(resource[:ensure]).to eq :absent
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
@ -1,20 +0,0 @@
|
|||||||
require 'puppet'
|
|
||||||
require 'puppet/type/neutron_fwaas_service_config'
|
|
||||||
|
|
||||||
describe 'Puppet::Type.type(:neutron_fwaas_service_config)' do
|
|
||||||
|
|
||||||
before :each do
|
|
||||||
@neutron_fwaas_service_config = Puppet::Type.type(:neutron_fwaas_service_config).new(:name => 'DEFAULT/foo', :value => 'bar')
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'should autorequire the package that install the file' do
|
|
||||||
catalog = Puppet::Resource::Catalog.new
|
|
||||||
anchor = Puppet::Type.type(:anchor).new(:name => 'neutron::install::end')
|
|
||||||
catalog.add_resource anchor, @neutron_fwaas_service_config
|
|
||||||
dependency = @neutron_fwaas_service_config.autorequire
|
|
||||||
expect(dependency.size).to eq(1)
|
|
||||||
expect(dependency[0].target).to eq(@neutron_fwaas_service_config)
|
|
||||||
expect(dependency[0].source).to eq(anchor)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user