Merge "Fix parsing of protocol access mapping options"

This commit is contained in:
Zuul 2023-10-17 23:01:21 +00:00 committed by Gerrit Code Review
commit 162ee35ff9
3 changed files with 14 additions and 2 deletions

View File

@ -20,6 +20,7 @@ import os
import shutil
from oslo_config import cfg
from oslo_config import types
from oslo_log import log
from oslo_service import periodic_task
from oslo_utils import excutils
@ -67,8 +68,9 @@ backup_opts = [
default=['lost+found'],
help="List of files and folders to be ignored when backing up "
"shares. Items should be names (not including any path)."),
cfg.DictOpt(
cfg.Opt(
'backup_protocol_access_mapping',
type=types.Dict(types.List(types.String(), bounds=True)),
default={'ip': ['nfs']},
help="Protocol access mapping for backup. Should be a "
"dictionary comprised of "

View File

@ -21,6 +21,7 @@ Drivers for shares.
import time
from oslo_config import cfg
from oslo_config import types
from oslo_log import log
from manila.common import constants
@ -109,8 +110,9 @@ share_opts = [
"specify the executable with all necessary parameters for the "
"protocol supported. 'path' template element is required. It is "
"advisable to separate different commands per backend."),
cfg.DictOpt(
cfg.Opt(
'protocol_access_mapping',
type=types.Dict(types.List(types.String(), bounds=True)),
default={
'ip': ['nfs'],
'user': ['cifs'],

View File

@ -0,0 +1,8 @@
---
fixes:
- |
`bug 2038607 <https://bugs.launchpad.net/manila/+bug/2038607>`_: Fixed
parse of the protcol_access_mapping option and
the backup_protocol_access_mapping option. This change requires that
the values used for these options should be formatted like
`key0=[value00, value01],key1=[value10]`.