Require placmenet::api in wsgi+apache deployment

This change drops the redundant implementation left to keep backword
compatibility during refactoring of placement::api[1] during V-cycle.

[1] 425180f5b8

Change-Id: I3e989c3c7b37741904dcb51b0f950ced33d11a2b
This commit is contained in:
Takashi Kajinami 2021-07-19 18:29:11 +09:00
parent 4550eac119
commit 20a4abee20
3 changed files with 21 additions and 25 deletions

View File

@ -58,10 +58,6 @@
# (Optional) Name of the WSGI process display-name.
# Defaults to undef
#
# [*ensure_package*]
# (Optional) Control the ensure parameter for the Placement API package ressource.
# Defaults to 'present'
#
# [*ssl_cert*]
# [*ssl_key*]
# [*ssl_chain*]
@ -89,6 +85,12 @@
# directives to be placed at the end of the vhost configuration.
# Defaults to undef.
#
# DEPRECATED PARAMETERS
#
# [*ensure_package*]
# (Optional) Control the ensure parameter for the Placement API package ressource.
# Defaults to undef
#
# == Examples
#
# include apache
@ -105,7 +107,6 @@ class placement::wsgi::apache (
$priority = '10',
$threads = 1,
$wsgi_process_display_name = undef,
$ensure_package = 'present',
$ssl_cert = undef,
$ssl_key = undef,
$ssl_chain = undef,
@ -117,6 +118,8 @@ class placement::wsgi::apache (
$access_log_format = false,
$error_log_file = undef,
$vhost_custom_fragment = undef,
# DEPRECATED PARAMETERS
$ensure_package = undef,
) {
if $api_port == 80 {
@ -134,13 +137,8 @@ class placement::wsgi::apache (
include apache::mod::ssl
}
if ! defined(Class['placement::api']) {
warning('placement::api class will be required in a future release')
placement::generic_service { 'api':
service_name => false,
package_name => $::placement::params::package_name,
ensure_package => $ensure_package,
}
if $ensure_package != undef {
warning('The placement::wsgi::apache::ensure_package parameter is deprecated and has no effect')
}
file { $::placement::params::httpd_config_file:

View File

@ -0,0 +1,11 @@
---
upgrade:
- |
The ``placement::wsgi::apache`` class no longer manages services and
packages. The ``placmenet::api`` class should be included to manage
these resources.
deprecations:
- |
The ``placement::wsgi::apache::ensure_package`` parameter has been
deprecated and has no effect now.

View File

@ -10,12 +10,6 @@ describe 'placement::wsgi::apache' do
should contain_class('apache::mod::ssl')
}
it { should contain_placement__generic_service('api').with(
:service_name => false,
:package_name => platform_params[:package_name],
:ensure_package => 'present',
)}
it { should contain_file(platform_params[:httpd_config_file]).with_ensure('present') }
it { should contain_openstacklib__wsgi__apache('placement_wsgi').with(
@ -68,7 +62,6 @@ describe 'placement::wsgi::apache' do
:wsgi_process_display_name => 'custom',
:threads => 5,
:priority => '25',
:ensure_package => 'absent',
:access_log_file => '/var/log/httpd/access_log',
:access_log_format => 'some format',
:error_log_file => '/var/log/httpd/error_log',
@ -82,12 +75,6 @@ describe 'placement::wsgi::apache' do
should_not contain_class('apache::mod::ssl')
}
it { should contain_placement__generic_service('api').with(
:service_name => false,
:package_name => platform_params[:package_name],
:ensure_package => params[:ensure_package],
)}
it { should contain_file(platform_params[:httpd_config_file]).with_ensure('present') }
it { should contain_openstacklib__wsgi__apache('placement_wsgi').with(