Merge "Deprecate service-to-driver mapping for backups"

This commit is contained in:
Jenkins 2017-09-09 03:16:37 +00:00 committed by Gerrit Code Review
commit f67e4ffe7c
2 changed files with 14 additions and 0 deletions

View File

@ -34,6 +34,7 @@ Volume backups can be created, restored, deleted and listed.
import os import os
from oslo_config import cfg from oslo_config import cfg
from oslo_log import log as logging from oslo_log import log as logging
from oslo_log import versionutils
import oslo_messaging as messaging import oslo_messaging as messaging
from oslo_service import loopingcall from oslo_service import loopingcall
from oslo_service import periodic_task from oslo_service import periodic_task
@ -106,6 +107,11 @@ class BackupManager(manager.ThreadPoolManager):
"""Maps services to drivers.""" """Maps services to drivers."""
if service in mapper: if service in mapper:
msg = ("Using legacy backup service configuration like "
"cinder.backup.services.* is deprecated and "
"will be removed in the 'R' release. Please use "
"the cinder.backup.drivers.* method instead.")
versionutils.report_deprecated_feature(LOG, msg)
return mapper[service] return mapper[service]
return service return service

View File

@ -0,0 +1,8 @@
---
deprecations:
- |
Backup service to driver mapping is deprecated. If you use old values
like 'cinder.backup.services.swift' or 'cinder.backup.services.ceph'
it should be changed to 'cinder.backup.drivers.swift' or
'cinder.backup.drivers.ceph' accordingly to get your backup service
working in the 'R' release.