From b92dd00535ea78b31e85059c1e0232772de24b30 Mon Sep 17 00:00:00 2001 From: yenai Date: Fri, 18 Jan 2019 18:15:15 +0800 Subject: [PATCH] Add missing params in NoOpEncryptor Change-Id: Id8b6c3d0ef7f4c8d37232a81cab1e50458d32709 Closes-Bug: #1812790 --- os_brick/encryptors/nop.py | 4 ++-- os_brick/tests/encryptors/test_nop.py | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/os_brick/encryptors/nop.py b/os_brick/encryptors/nop.py index 02754a915..16c48a507 100644 --- a/os_brick/encryptors/nop.py +++ b/os_brick/encryptors/nop.py @@ -36,8 +36,8 @@ class NoOpEncryptor(base.VolumeEncryptor): execute=execute, *args, **kwargs) - def attach_volume(self, context): + def attach_volume(self, context, **kwargs): pass - def detach_volume(self): + def detach_volume(self, **kwargs): pass diff --git a/os_brick/tests/encryptors/test_nop.py b/os_brick/tests/encryptors/test_nop.py index 3d4613211..2282f7a78 100644 --- a/os_brick/tests/encryptors/test_nop.py +++ b/os_brick/tests/encryptors/test_nop.py @@ -24,7 +24,15 @@ class NoOpEncryptorTestCase(test_base.VolumeEncryptorTestCase): keymgr=self.keymgr) def test_attach_volume(self): - self.encryptor.attach_volume(None) + test_args = { + 'control_location': 'front-end', + 'provider': 'NoOpEncryptor', + } + self.encryptor.attach_volume(None, **test_args) def test_detach_volume(self): - self.encryptor.detach_volume() + test_args = { + 'control_location': 'front-end', + 'provider': 'NoOpEncryptor', + } + self.encryptor.detach_volume(**test_args)