Deprecate support for backend options in [DEFAULT] section

Recent manila requires these options configured in each backend section
to support multiple backends. The current implementation does not allow
users to use multiple types of backends (eg generic + netapp) and is
not aligned with the multi backend capability of Manila.

What is worse, the ::generic class now can't be used with the core
share class because of some core share options are defined in both.

Deprecate these classes to manage [DEFAULT] section to avoid further
confusion.

Change-Id: Iaef31b91b0f4d5724726ded177e2e107f40adf30
This commit is contained in:
Takashi Kajinami 2024-10-17 18:23:02 +09:00
parent 0433ff3886
commit 585dfd182e
5 changed files with 23 additions and 0 deletions

View File

@ -1,5 +1,7 @@
# ==define manila::backend::generic
#
# Configures Manila to use the generic share driver
#
# ===Parameters
#
# [*driver_handles_share_servers*]

View File

@ -1,5 +1,6 @@
# == Class: manila::share::generic
#
# DEPRECATED !!
# Configures Manila to use the generic share driver
#
# ===Parameters
@ -84,6 +85,9 @@ class manila::share::generic (
$automatic_share_server_cleanup = 'True',
) {
warning("The manila::share::generic class is deprecated. \
Use the manila::backend::generic defined resource type.")
manila::backend::generic { 'DEFAULT':
driver_handles_share_servers => $driver_handles_share_servers,
smb_template_config_path => $smb_template_config_path,

View File

@ -1,5 +1,6 @@
# == Class: manila::share::hitachi_hnas
#
# DEPRECATED !!
# Configures Manila to use the HITACHI NAS platform share driver
#
# === Parameters
@ -52,6 +53,9 @@ class manila::share::hitachi_hnas (
$driver_handles_share_servers = false,
) {
warning("The manila::share::hitachi_hnas class is deprecated. \
Use the manila::backend::hitachi_hnas defined resource type.")
manila::backend::hitachi_hnas { 'DEFAULT':
driver_handles_share_servers => $driver_handles_share_servers,
hitachi_hnas_user => $hitachi_hnas_user,

View File

@ -1,5 +1,6 @@
# == Class: manila::share::netapp
#
# DEPRECATED !!
# Configures Manila to use the NetApp share driver
#
# === Parameters
@ -108,6 +109,9 @@ class manila::share::netapp (
$netapp_trace_flags = undef,
) {
warning("The manila::share::netapp class is deprecated. \
Use the manila::backend::netapp defined resource type.")
manila::backend::netapp { 'DEFAULT':
driver_handles_share_servers => $driver_handles_share_servers,
netapp_login => $netapp_login,

View File

@ -0,0 +1,9 @@
---
deprecations:
- |
The following classes were formally deprecated. Use
the ``manila::backend::*`` defined resource types instead.
- ``manila::share::generic``
- ``manila::share::hitachi_hnas``
- ``manila::share::netapp``