Merge "Fix inconsistent parameter name of wsgi::apache"

This commit is contained in:
Zuul 2023-01-25 05:08:51 +00:00 committed by Gerrit Code Review
commit 8768951c3c
5 changed files with 37 additions and 8 deletions

View File

@ -28,7 +28,7 @@
# (Optional) The servername for the virtualhost.
# Defaults to $::fqdn
#
# [*api_port*]
# [*port*]
# (Optional) The port for Nova API service.
# Defaults to 8774
#
@ -121,6 +121,12 @@
# directives to be placed at the end of the vhost configuration.
# Defaults to undef.
#
# DEPRECATED PARAMETERS
#
# [*api_port*]
# (Optional) The port for Nova API service.
# Defaults to 8774
#
# == Dependencies
#
# requires Class['apache'] & Class['nova'] & Class['nova::api']
@ -133,7 +139,7 @@
#
class nova::wsgi::apache_api (
$servername = $::fqdn,
$api_port = 8774,
$port = 8774,
$bind_host = undef,
$path = '/',
$ssl = false,
@ -159,6 +165,8 @@ class nova::wsgi::apache_api (
$headers = undef,
$request_headers = undef,
$vhost_custom_fragment = undef,
# DEPRECATED PARAMETERS
$api_port = undef,
) {
include nova::params
@ -167,9 +175,13 @@ class nova::wsgi::apache_api (
fail('::nova::api class must be declared in composition layer.')
}
if $api_port {
warning('The api_port parameter is deprecated. Use the port parameter')
}
::openstacklib::wsgi::apache { 'nova_api_wsgi':
bind_host => $bind_host,
bind_port => $api_port,
bind_port => pick($api_port, $port),
group => $::nova::params::group,
path => $path,
priority => $priority,

View File

@ -32,7 +32,7 @@
# resource.
# Defaults to 'present'
#
# [*api_port*]
# [*port*]
# (Optional) The port for Nova API service.
# Defaults to 8775
#
@ -125,6 +125,12 @@
# directives to be placed at the end of the vhost configuration.
# Defaults to undef.
#
# DEPRECATED PARAMETERS
#
# [*api_port*]
# (Optional) The port for Nova API service.
# Defaults to 8775
#
# == Dependencies
#
# requires Class['apache'] & Class['nova'] & Class['nova::metadata']
@ -137,7 +143,7 @@
#
class nova::wsgi::apache_metadata (
$servername = $::fqdn,
$api_port = 8775,
$port = 8775,
$bind_host = undef,
$path = '/',
$ssl = false,
@ -164,6 +170,8 @@ class nova::wsgi::apache_metadata (
$headers = undef,
$request_headers = undef,
$vhost_custom_fragment = undef,
# DEPRECATED PARAMETERS
$api_port = undef,
) {
include nova::params
@ -180,9 +188,13 @@ class nova::wsgi::apache_metadata (
Service <| title == 'httpd' |> { tag +> 'nova-service' }
if $api_port {
warning('The api_port parameter is deprecated. Use the port parameter')
}
::openstacklib::wsgi::apache { 'nova_metadata_wsgi':
bind_host => $bind_host,
bind_port => $api_port,
bind_port => pick($api_port, $port),
group => $::nova::params::group,
path => $path,
priority => $priority,

View File

@ -0,0 +1,5 @@
---
deprecations:
- |
The ``nova::wsgi::apache::api_port`` parameter has been deprecated.
Use the ``port`` parameter instead.

View File

@ -57,7 +57,7 @@ describe 'nova::wsgi::apache_api' do
{
:servername => 'dummy.host',
:bind_host => '10.42.51.1',
:api_port => 12345,
:port => 12345,
:ssl => true,
:vhost_custom_fragment => 'Timeout 99',
:wsgi_process_display_name => 'nova-api',

View File

@ -53,7 +53,7 @@ describe 'nova::wsgi::apache_metadata' do
{
:servername => 'dummy.host',
:bind_host => '10.42.51.1',
:api_port => 12345,
:port => 12345,
:ssl => true,
:vhost_custom_fragment => 'Timeout 99',
:wsgi_process_display_name => 'nova-metadata',