diff --git a/manifests/wsgi/apache_api.pp b/manifests/wsgi/apache_api.pp index f2e8152a5..e8731c423 100644 --- a/manifests/wsgi/apache_api.pp +++ b/manifests/wsgi/apache_api.pp @@ -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, diff --git a/manifests/wsgi/apache_metadata.pp b/manifests/wsgi/apache_metadata.pp index 906d5c1f1..d05625c6d 100644 --- a/manifests/wsgi/apache_metadata.pp +++ b/manifests/wsgi/apache_metadata.pp @@ -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, diff --git a/releasenotes/notes/fix-inconsistent-wsgi-apache-params-dfc0ecb5cf59efe3.yaml b/releasenotes/notes/fix-inconsistent-wsgi-apache-params-dfc0ecb5cf59efe3.yaml new file mode 100644 index 000000000..80bbe7f8d --- /dev/null +++ b/releasenotes/notes/fix-inconsistent-wsgi-apache-params-dfc0ecb5cf59efe3.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - | + The ``nova::wsgi::apache::api_port`` parameter has been deprecated. + Use the ``port`` parameter instead. diff --git a/spec/classes/nova_wsgi_apache_api_spec.rb b/spec/classes/nova_wsgi_apache_api_spec.rb index 2b7ff922d..eca876591 100644 --- a/spec/classes/nova_wsgi_apache_api_spec.rb +++ b/spec/classes/nova_wsgi_apache_api_spec.rb @@ -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', diff --git a/spec/classes/nova_wsgi_apache_metadata_spec.rb b/spec/classes/nova_wsgi_apache_metadata_spec.rb index 5ef6b144f..dbef07cac 100644 --- a/spec/classes/nova_wsgi_apache_metadata_spec.rb +++ b/spec/classes/nova_wsgi_apache_metadata_spec.rb @@ -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',