diff --git a/manifests/api.pp b/manifests/api.pp index 0eff8702..9224afe0 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -10,14 +10,6 @@ # (optional) Whether the service should be managed by Puppet. # Defaults to true. # -# [*host*] -# (optional) The aodh api bind address. -# Defaults to 0.0.0.0 -# -# [*port*] -# (optional) The aodh api port. -# Defaults to 8042 -# # [*package_ensure*] # (optional) ensure state for package. # Defaults to 'present' @@ -52,18 +44,29 @@ # (optional) Gnocchi external project owner (usually Ceilometer project name) # Defaults to 'services' # +# DEPRECATED PARAMETERS +# +# [*host*] +# (optional) The aodh api bind address. +# Defaults to undef +# +# [*port*] +# (optional) The aodh api port. +# Defaults to undef +# class aodh::api ( $manage_service = true, $enabled = true, $package_ensure = 'present', - $host = '0.0.0.0', - $port = '8042', $service_name = $::aodh::params::api_service_name, $sync_db = false, $auth_strategy = 'keystone', $enable_proxy_headers_parsing = $::os_service_default, $paste_config = $::os_service_default, $gnocchi_external_project_owner = 'services', + # DEPRECATED PARAMETERS + $host = undef, + $port = undef, ) inherits aodh::params { @@ -75,6 +78,15 @@ class aodh::api ( include ::aodh::keystone::authtoken } + if $host { + warning('host has no effect as of Newton and will be removed in a future \ +release. aodh::wsgi::apache supports setting a host via bind_host.') + } + if $port { + warning('port has no effect as of Newton and will be removed in a future \ +release. aodh::wsgi::apache supports setting a port.') + } + package { 'aodh-api': ensure => $package_ensure, name => $::aodh::params::api_package_name, @@ -120,8 +132,6 @@ as a standalone service, or httpd for being run by a httpd server") aodh_config { 'api/gnocchi_external_project_owner': value => $gnocchi_external_project_owner; - 'api/host': value => $host; - 'api/port': value => $port; 'api/paste_config': value => $paste_config; } diff --git a/releasenotes/notes/deprecate-host-and-port-parameters-7aa4609a9a7d2104.yaml b/releasenotes/notes/deprecate-host-and-port-parameters-7aa4609a9a7d2104.yaml new file mode 100644 index 00000000..dc430afa --- /dev/null +++ b/releasenotes/notes/deprecate-host-and-port-parameters-7aa4609a9a7d2104.yaml @@ -0,0 +1,6 @@ +--- +deprecations: + - aodh::api::host and aodh::api::port are deprecated and will be removed in a + future release. aodh-api itself is for testing only and does not use these + parameters. The production-ready alternative aodh::wsgi::apache supports + setting host and port via the bind_host and port parameters. diff --git a/spec/classes/aodh_api_spec.rb b/spec/classes/aodh_api_spec.rb index d7649734..1e3783e0 100644 --- a/spec/classes/aodh_api_spec.rb +++ b/spec/classes/aodh_api_spec.rb @@ -14,8 +14,6 @@ describe 'aodh::api' do { :enabled => true, :manage_service => true, :package_ensure => 'latest', - :port => '8042', - :host => '0.0.0.0', } end @@ -34,8 +32,6 @@ describe 'aodh::api' do end it 'configures api' do - is_expected.to contain_aodh_config('api/host').with_value( params[:host] ) - is_expected.to contain_aodh_config('api/port').with_value( params[:port] ) is_expected.to contain_aodh_config('api/gnocchi_external_project_owner').with_value( 'services' ) is_expected.to contain_aodh_config('api/paste_config').with_value('') is_expected.to contain_oslo__middleware('aodh_config').with(