designate: Deprecate the project_id parameter

The project_name parameter is commonly used in Puppet OpenStack,
because its value is predictable, and there are only a few modules
which support the project_id parameter.

This deprecates the project_id parameter in neutron::designate, so that
we use project_name more widely.

Change-Id: I6f2833dc4dea7dad497c7802dc2c0cbd26bb6a2c
This commit is contained in:
Takashi Kajinami 2022-01-17 20:03:53 +09:00
parent b2f39ce9cc
commit a321b3ffa1
2 changed files with 20 additions and 6 deletions

View File

@ -19,10 +19,6 @@
# (optional) Username for connection to designate in admin context
# Defaults to 'neutron'
#
# [*project_id*]
# (optional) The UUID of the admin designate project. If provided this takes
# precedence over project_name.
#
# [*project_name*]
# (optional) The name of the admin project
# Defaults to 'services'
@ -53,12 +49,18 @@
# [*ptr_zone_email*]
# (optional) The email address to be used when creating PTR zones.
#
# DEPRECATED PARAMETERS
#
# [*project_id*]
# (optional) The UUID of the admin designate project. If provided this takes
# precedence over project_name.
# defaults to undef
#
class neutron::designate (
$password,
$url,
$auth_type = 'password',
$username = 'neutron',
$project_id = $::os_service_default,
$project_name = 'services',
$project_domain_name = 'Default',
$user_domain_name = 'Default',
@ -67,17 +69,23 @@ class neutron::designate (
$ipv4_ptr_zone_prefix_size = $::os_service_default,
$ipv6_ptr_zone_prefix_size = $::os_service_default,
$ptr_zone_email = $::os_service_default,
# DEPRECATED PARAMETERS
$project_id = undef,
) {
include neutron::deps
include neutron::params
if $project_id != undef {
warning('The neutron::designate::project_id parmaeter is deprecated. Use the project_name parameter.')
}
neutron_config {
'DEFAULT/external_dns_driver': value => 'designate';
'designate/password': value => $password, secret => true;
'designate/url': value => $url;
'designate/auth_type': value => $auth_type;
'designate/username': value => $username;
'designate/project_id': value => $project_id;
'designate/project_id': value => pick($project_id, $::os_service_default);
'designate/project_name': value => $project_name;
'designate/project_domain_name': value => $project_domain_name;
'designate/user_domain_name': value => $user_domain_name;

View File

@ -0,0 +1,6 @@
---
deprecations:
- |
The ``neutron::designate::project_id`` parameter has been deprecated and
will be removed in a future release. Use the ``project_name`` parameter
instead.