Remove the deprecate neutron::services::vpnass class
... because it was deprecated a long ago[1].
[1] f77ef0ec65
Change-Id: I2a29b3088649cb6b818942a2dae9c1d2c0ee925c
This commit is contained in:
parent
c87498ac3b
commit
b9404c6c94
@ -1,65 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2015 Kylinos Inc.
|
||||
#
|
||||
# Author: nanhai liao <nanhai.liao@kylin-cloud.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
|
||||
# This class has been deprecated in favor of using the parameter in
|
||||
# neutron::server::service_provider
|
||||
#
|
||||
# == Class: neutron::services::vpnaas
|
||||
#
|
||||
# Configure the VPN as a Service Neutron Plugin
|
||||
#
|
||||
# === Parameters:
|
||||
#
|
||||
# [*package_ensure*]
|
||||
# (required) Whether or not to install the VPNaas Neutron plugin package
|
||||
# Defaults to present
|
||||
#
|
||||
# [*service_providers*]
|
||||
# (optional) Array of allowed service types or '<SERVICE DEFAULT>'.
|
||||
# Note: The default upstream value is empty.
|
||||
# If you plan to activate VPNaaS service, you'll need to set this
|
||||
# parameter otherwise neutron-server won't start correctly.
|
||||
# See https://bugs.launchpad.net/puppet-neutron/+bug/1538971
|
||||
# Must be in form <service_type>:<name>:<driver>[:default].
|
||||
# Defaults to $::os_service_default
|
||||
#
|
||||
class neutron::services::vpnaas (
|
||||
$package_ensure = 'present',
|
||||
$service_providers = $::os_service_default,
|
||||
) {
|
||||
|
||||
include neutron::params
|
||||
if !is_service_default($service_providers) {
|
||||
warning("service_providers in neutron::services::vpnaas is deprecated in newton release, \
|
||||
please use service provider in neutron::server class")
|
||||
}
|
||||
|
||||
# agent package contains both agent and service resources
|
||||
ensure_resource( 'package', 'neutron-vpnaas-agent', {
|
||||
ensure => $package_ensure,
|
||||
name => $::neutron::params::vpnaas_agent_package,
|
||||
tag => ['openstack', 'neutron-package'],
|
||||
})
|
||||
|
||||
if !is_service_default($service_providers) {
|
||||
# default value is uncommented setting, so we should not touch it at all
|
||||
neutron_vpnaas_service_config { 'service_providers/service_provider':
|
||||
value => $service_providers,
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
---
|
||||
upgrade:
|
||||
- |
|
||||
The deprecated ``neutron::services::vpnaas`` class has been removed.
|
@ -1,82 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2014 Red Hat Inc.
|
||||
#
|
||||
# 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::vpnaas class
|
||||
#
|
||||
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'neutron::services::vpnaas' do
|
||||
let :default_params do
|
||||
{
|
||||
:package_ensure => 'present',
|
||||
:service_providers => '<SERVICE DEFAULT>'
|
||||
}
|
||||
end
|
||||
|
||||
shared_examples 'neutron vpnaas service plugin' do
|
||||
context 'with default params' do
|
||||
let :params do
|
||||
default_params
|
||||
end
|
||||
|
||||
it 'installs vpnaas package' do
|
||||
should contain_package('neutron-vpnaas-agent').with(
|
||||
:ensure => params[:package_ensure],
|
||||
:name => platform_params[:vpnaas_package_name],
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
context 'with multiple service providers' do
|
||||
let :params do
|
||||
default_params.merge(
|
||||
{ :service_providers => ['provider1', 'provider2'] }
|
||||
)
|
||||
end
|
||||
|
||||
it 'configures neutron_vpnaas.conf' do
|
||||
should contain_neutron_vpnaas_service_config(
|
||||
'service_providers/service_provider'
|
||||
).with_value(['provider1', 'provider2'])
|
||||
end
|
||||
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'
|
||||
{
|
||||
:vpnaas_package_name => 'python3-neutron-vpnaas'
|
||||
}
|
||||
when 'RedHat'
|
||||
{
|
||||
:vpnaas_package_name => 'openstack-neutron-vpnaas'
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
it_behaves_like 'neutron vpnaas service plugin'
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user