Merge "encryptors: Delay removal of legacy provider names"
This commit is contained in:
commit
4e6a4a3ce7
@ -62,13 +62,13 @@ def get_volume_encryptor(root_helper,
|
|||||||
if location and location.lower() == 'front-end': # case insensitive
|
if location and location.lower() == 'front-end': # case insensitive
|
||||||
provider = kwargs.get('provider')
|
provider = kwargs.get('provider')
|
||||||
|
|
||||||
# TODO(lyarwood): Remove the following in Pike and raise an
|
# TODO(lyarwood): Remove the following in Queens and raise an
|
||||||
# ERROR if provider is not a key in SUPPORTED_ENCRYPTION_PROVIDERS.
|
# ERROR if provider is not a key in SUPPORTED_ENCRYPTION_PROVIDERS.
|
||||||
# Until then continue to allow both the class name and path to be used.
|
# Until then continue to allow both the class name and path to be used.
|
||||||
if provider in LEGACY_PROVIDER_CLASS_TO_FORMAT_MAP:
|
if provider in LEGACY_PROVIDER_CLASS_TO_FORMAT_MAP:
|
||||||
LOG.warning("Use of the in tree encryptor class %(provider)s"
|
LOG.warning("Use of the in tree encryptor class %(provider)s"
|
||||||
" by directly referencing the implementation class"
|
" by directly referencing the implementation class"
|
||||||
" will be blocked in the Pike release of"
|
" will be blocked in the Queens release of"
|
||||||
" os-brick.", {'provider': provider})
|
" os-brick.", {'provider': provider})
|
||||||
provider = LEGACY_PROVIDER_CLASS_TO_FORMAT_MAP[provider]
|
provider = LEGACY_PROVIDER_CLASS_TO_FORMAT_MAP[provider]
|
||||||
|
|
||||||
@ -78,7 +78,7 @@ def get_volume_encryptor(root_helper,
|
|||||||
provider = "os_brick.encryptors.nop.NoOpEncryptor"
|
provider = "os_brick.encryptors.nop.NoOpEncryptor"
|
||||||
else:
|
else:
|
||||||
LOG.warning("Use of the out of tree encryptor class "
|
LOG.warning("Use of the out of tree encryptor class "
|
||||||
"%(provider)s will be blocked with the Pike "
|
"%(provider)s will be blocked with the Queens "
|
||||||
"release of os-brick.", {'provider': provider})
|
"release of os-brick.", {'provider': provider})
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -132,7 +132,7 @@ class BaseEncryptorTestCase(VolumeEncryptorTestCase):
|
|||||||
log.warning.assert_called_once_with("Use of the out of tree "
|
log.warning.assert_called_once_with("Use of the out of tree "
|
||||||
"encryptor class %(provider)s "
|
"encryptor class %(provider)s "
|
||||||
"will be blocked with the "
|
"will be blocked with the "
|
||||||
"Pike release of os-brick.",
|
"Queens release of os-brick.",
|
||||||
{'provider': provider})
|
{'provider': provider})
|
||||||
|
|
||||||
@mock.patch('os_brick.encryptors.LOG')
|
@mock.patch('os_brick.encryptors.LOG')
|
||||||
@ -164,15 +164,15 @@ class BaseEncryptorTestCase(VolumeEncryptorTestCase):
|
|||||||
log.warning.assert_has_calls([
|
log.warning.assert_has_calls([
|
||||||
mock.call("Use of the in tree encryptor class %(provider)s by "
|
mock.call("Use of the in tree encryptor class %(provider)s by "
|
||||||
"directly referencing the implementation class will be "
|
"directly referencing the implementation class will be "
|
||||||
"blocked in the Pike release of os-brick.",
|
"blocked in the Queens release of os-brick.",
|
||||||
{'provider': 'LuksEncryptor'}),
|
{'provider': 'LuksEncryptor'}),
|
||||||
mock.call("Use of the in tree encryptor class %(provider)s by "
|
mock.call("Use of the in tree encryptor class %(provider)s by "
|
||||||
"directly referencing the implementation class will be "
|
"directly referencing the implementation class will be "
|
||||||
"blocked in the Pike release of os-brick.",
|
"blocked in the Queens release of os-brick.",
|
||||||
{'provider':
|
{'provider':
|
||||||
'os_brick.encryptors.luks.LuksEncryptor'}),
|
'os_brick.encryptors.luks.LuksEncryptor'}),
|
||||||
mock.call("Use of the in tree encryptor class %(provider)s by "
|
mock.call("Use of the in tree encryptor class %(provider)s by "
|
||||||
"directly referencing the implementation class will be "
|
"directly referencing the implementation class will be "
|
||||||
"blocked in the Pike release of os-brick.",
|
"blocked in the Queens release of os-brick.",
|
||||||
{'provider':
|
{'provider':
|
||||||
'nova.volume.encryptors.luks.LuksEncryptor'})])
|
'nova.volume.encryptors.luks.LuksEncryptor'})])
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The direct use of the encryption provider classes such as
|
||||||
|
os_brick.encryptors.luks.LuksEncryptor continues to be deprecated and will
|
||||||
|
now be blocked in the Queens release of os-brick. The use of out of tree
|
||||||
|
encryption provider classes also continues to be deprecated and will also
|
||||||
|
be blocked in the Queens release of os-brick.
|
Loading…
x
Reference in New Issue
Block a user