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

View File

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

View File

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