From 0ff2c0086ca115560405285368e0bd8b34ce1c88 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Mon, 8 May 2017 14:12:47 -0400 Subject: [PATCH] encryptors: Delay removal of legacy provider names Initially Ic155bd29d46059832cce970bf60375e7e472eca6 had aimed to remove these legacy provider names during the Pike cycle. While removing references to these names in Tempest via Id221414d74af8413084c7935b762f93b7ce43c42 it was highlighted that this wouldn't be possible until Queens and the eventual EOL of Newton. This change simply updates the logged deprecation warnings and adds a new releasenote highlighting that these legancy provider names will remain until Queens. Change-Id: Ib8ca7ecb5494cd4fcae0657525d4c17bfc4ae37e --- os_brick/encryptors/__init__.py | 6 +++--- os_brick/tests/encryptors/test_base.py | 8 ++++---- ...yption-provider-name-deprecation-c0d07be3f0d92afd.yaml | 8 ++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 releasenotes/notes/delay-legacy-encryption-provider-name-deprecation-c0d07be3f0d92afd.yaml diff --git a/os_brick/encryptors/__init__.py b/os_brick/encryptors/__init__.py index 914bccc1a..20304be7d 100644 --- a/os_brick/encryptors/__init__.py +++ b/os_brick/encryptors/__init__.py @@ -62,13 +62,13 @@ def get_volume_encryptor(root_helper, if location and location.lower() == 'front-end': # case insensitive 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. # Until then continue to allow both the class name and path to be used. if provider in LEGACY_PROVIDER_CLASS_TO_FORMAT_MAP: LOG.warning("Use of the in tree encryptor class %(provider)s" " 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}) provider = LEGACY_PROVIDER_CLASS_TO_FORMAT_MAP[provider] @@ -78,7 +78,7 @@ def get_volume_encryptor(root_helper, provider = "os_brick.encryptors.nop.NoOpEncryptor" else: 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}) try: diff --git a/os_brick/tests/encryptors/test_base.py b/os_brick/tests/encryptors/test_base.py index 28f832c17..5596d1337 100644 --- a/os_brick/tests/encryptors/test_base.py +++ b/os_brick/tests/encryptors/test_base.py @@ -132,7 +132,7 @@ class BaseEncryptorTestCase(VolumeEncryptorTestCase): log.warning.assert_called_once_with("Use of the out of tree " "encryptor class %(provider)s " "will be blocked with the " - "Pike release of os-brick.", + "Queens release of os-brick.", {'provider': provider}) @mock.patch('os_brick.encryptors.LOG') @@ -164,15 +164,15 @@ class BaseEncryptorTestCase(VolumeEncryptorTestCase): log.warning.assert_has_calls([ mock.call("Use of the in tree encryptor class %(provider)s by " "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'}), mock.call("Use of the in tree encryptor class %(provider)s by " "directly referencing the implementation class will be " - "blocked in the Pike release of os-brick.", + "blocked in the Queens release of os-brick.", {'provider': 'os_brick.encryptors.luks.LuksEncryptor'}), mock.call("Use of the in tree encryptor class %(provider)s by " "directly referencing the implementation class will be " - "blocked in the Pike release of os-brick.", + "blocked in the Queens release of os-brick.", {'provider': 'nova.volume.encryptors.luks.LuksEncryptor'})]) diff --git a/releasenotes/notes/delay-legacy-encryption-provider-name-deprecation-c0d07be3f0d92afd.yaml b/releasenotes/notes/delay-legacy-encryption-provider-name-deprecation-c0d07be3f0d92afd.yaml new file mode 100644 index 000000000..e3a63cc53 --- /dev/null +++ b/releasenotes/notes/delay-legacy-encryption-provider-name-deprecation-c0d07be3f0d92afd.yaml @@ -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.