Merge "Fix inconsistent port parameter name"

This commit is contained in:
Zuul 2022-08-29 17:00:57 +00:00 committed by Gerrit Code Review
commit ba9fd876cb
3 changed files with 24 additions and 7 deletions

View File

@ -18,8 +18,8 @@
# (Optional) The host/ip address Apache will listen on.
# Defaults to undef (listen on all ip addresses)
#
# [*api_port*]
# (Optional) The keystone API port.
# [*port*]
# (Optional) The keystone Port.
# Defaults to 5000
#
# [*path*]
@ -137,10 +137,16 @@
# (Optional) apache::vhost wsgi_chunked_request parameter.
# Defaults to undef
#
# DEPRECATED PARAMETERS
#
# [*api_port*]
# (Optional) The keystone API port.
# Defaults to 5000
#
class keystone::wsgi::apache (
$servername = $::fqdn,
$bind_host = undef,
$api_port = 5000,
$port = 5000,
$path = '/',
$ssl = false,
$workers = $::os_workers_keystone,
@ -168,6 +174,8 @@ class keystone::wsgi::apache (
$request_headers = undef,
$vhost_custom_fragment = undef,
$custom_wsgi_process_options = {},
# DEPRECATED PARAMETERS
$api_port = undef,
) {
include keystone::deps
@ -175,10 +183,14 @@ class keystone::wsgi::apache (
Anchor['keystone::install::end'] -> Class['apache']
if $api_port {
warning('The api_port parameter is deprecated. Use the port parameter')
}
::openstacklib::wsgi::apache { 'keystone_wsgi':
servername => $servername,
bind_host => $bind_host,
bind_port => $api_port,
bind_port => pick($api_port, $port),
group => $::keystone::params::group,
path => $path,
workers => $workers,

View File

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

View File

@ -51,7 +51,7 @@ describe 'keystone::wsgi::apache' do
{
:servername => 'dummy.host',
:bind_host => '127.0.0.1',
:api_port => 1234,
:port => 1234,
:path => '/keystone',
:ssl => true,
:workers => 10,
@ -78,7 +78,7 @@ describe 'keystone::wsgi::apache' do
it { should contain_openstacklib__wsgi__apache('keystone_wsgi').with(
:servername => params[:servername],
:bind_host => params[:bind_host],
:bind_port => params[:api_port],
:bind_port => params[:port],
:path => params[:path],
:workers => params[:workers],
:threads => params[:threads],
@ -105,7 +105,7 @@ describe 'keystone::wsgi::apache' do
context 'with backward compatible ports' do
let :params do
{
:api_port => [35357, 5000],
:port => [35357, 5000],
}
end