Remove deprecated parameters of neutron::server::notifications

This change removes the parameters which were deprecated during
the Victoria cycle in favor of the independent nova class[1].

[1] 4638137d44

Depends-on: https://review.opendev.org/819436
Change-Id: I33f6c131d6b68a45fcef88faa8e343f09a4d472e
This commit is contained in:
Takashi Kajinami 2021-11-26 21:10:13 +09:00
parent 47ee099587
commit d8a630877b
3 changed files with 31 additions and 104 deletions

View File

@ -25,79 +25,13 @@
# (optional) Number of novaclient/ironicclient retries on failed http calls.
# Defaults to $::os_service_default
#
# DEPRECATED PARAMETERS
#
# [*password*]
# (optional) Password for connection to nova in admin context.
#
# [*notify_nova_on_port_status_changes*]
# (optional) Send notification to nova when port status is active.
# Defaults to undef
#
# [*notify_nova_on_port_data_changes*]
# (optional) Send notifications to nova when port data (fixed_ips/floatingips)
# change so nova can update its cache.
# Defaults to undef
#
# [*auth_type*]
# (optional) An authentication type to use with an OpenStack Identity server.
# The value should contain auth plugin name
# Defaults to undef
#
# [*username*]
# (optional) Username for connection to nova in admin context
# Defaults to undef
#
# [*project_domain_name*]
# (Optional) Name of domain for $project_name
# Defaults to undef
#
# [*project_name*]
# (optional) Nova project's name
# Defaults to undef
#
# [*user_domain_name*]
# (Optional) Name of domain for $username
# Defaults to undef
#
# [*auth_url*]
# (optional) Authorization URL for connection to nova in admin context.
# If version independent identity plugin is used available versions will be
# determined using auth_url
# Defaults to undef
#
# [*region_name*]
# (optional) Name of nova region to use. Useful if keystone manages more than
# one region.
# Defaults to undef
#
# [*endpoint_type*]
# (optional) The type of nova endpoint to use when looking up in
# the keystone catalog.
# Defaults to undef
#
class neutron::server::notifications (
$send_events_interval = $::os_service_default,
$http_retries = $::os_service_default,
# DEPRECATED PARAMETERS
$password = undef,
$notify_nova_on_port_status_changes = undef,
$notify_nova_on_port_data_changes = undef,
$auth_type = undef,
$username = undef,
$project_domain_name = undef,
$project_name = undef,
$user_domain_name = undef,
$auth_url = undef,
$region_name = undef,
$endpoint_type = undef,
) {
include neutron::deps
# TODO(tkajinam): Remove this when we cleanup deprecated parameters
include neutron::server::notifications::nova
neutron_config {
'DEFAULT/send_events_interval': value => $send_events_interval;
'DEFAULT/http_retries': value => $http_retries;

View File

@ -66,7 +66,7 @@
# Defaults to $::os_service_default
#
class neutron::server::notifications::nova (
$password = undef,
$password,
$notify_nova_on_port_status_changes = $::os_service_default,
$notify_nova_on_port_data_changes = $::os_service_default,
$auth_type = 'password',
@ -81,45 +81,20 @@ class neutron::server::notifications::nova (
include neutron::deps
$password_real = pick($::neutron::server::notifications::password, $password)
if $password_real == undef {
fail('password should be set')
neutron_config {
'nova/auth_url': value => $auth_url;
'nova/username': value => $username;
'nova/password': value => $password, secret => true;
'nova/project_domain_name': value => $project_domain_name;
'nova/project_name': value => $project_name;
'nova/user_domain_name': value => $user_domain_name;
'nova/region_name': value => $region_name;
'nova/endpoint_type': value => $endpoint_type;
'nova/auth_type': value => $auth_type;
}
$auth_type_real = pick($::neutron::server::notifications::auth_type, $auth_type)
$username_real = pick($::neutron::server::notifications::username, $username)
$project_name_real = pick($::neutron::server::notifications::project_name, $project_name)
$user_domain_name_real = pick(
$::neutron::server::notifications::user_domain_name,
$user_domain_name)
$project_domain_name_real = pick(
$::neutron::server::notifications::project_domain_name,
$project_domain_name)
$auth_url_real = pick($::neutron::server::notifications::auth_url, $auth_url)
$region_name_real = pick($::neutron::server::notifications::region_name, $region_name)
$endpoint_type_real = pick($::neutron::server::notifications::endpoint_type, $endpoint_type)
neutron_config {
'nova/auth_url': value => $auth_url_real;
'nova/username': value => $username_real;
'nova/password': value => $password_real, secret => true;
'nova/project_domain_name': value => $project_domain_name_real;
'nova/project_name': value => $project_name_real;
'nova/user_domain_name': value => $user_domain_name_real;
'nova/region_name': value => $region_name_real;
'nova/endpoint_type': value => $endpoint_type_real;
'nova/auth_type': value => $auth_type_real;
}
$notify_nova_on_port_status_changes_real = pick(
$::neutron::server::notifications::notify_nova_on_port_status_changes,
$notify_nova_on_port_status_changes)
$notify_nova_on_port_data_changes_real = pick(
$::neutron::server::notifications::notify_nova_on_port_data_changes,
$notify_nova_on_port_data_changes)
neutron_config {
'DEFAULT/notify_nova_on_port_status_changes': value => $notify_nova_on_port_status_changes_real;
'DEFAULT/notify_nova_on_port_data_changes': value => $notify_nova_on_port_data_changes_real;
'DEFAULT/notify_nova_on_port_status_changes': value => $notify_nova_on_port_status_changes;
'DEFAULT/notify_nova_on_port_data_changes': value => $notify_nova_on_port_data_changes;
}
}

View File

@ -0,0 +1,18 @@
---
upgrade:
- |
The following parameters of the ``neutron::server::notifications`` class
has been removed.
- ``password``
- ``auth_type``
- ``username``
- ``project_name``
- ``user_domain_name``
- ``project_domain_name``
- ``auth_url``
- ``region_name``
- ``endpoint_type``
- ``notify_nova_on_port_status_changes``
- ``notify_nova_on_port_data_changes``