From: Ollie Leahy Date: Thu, 3 Mar 2016 14:05:14 +0000 (+0000) Subject: Fix call to Barbican Secrets create() X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=6474164fd5b8474fcce7c83a6d574c4a975d3dd1;p=openstack-build%2Fcinder-build.git Fix call to Barbican Secrets create() Calls to backup encrypted volumes fail because the cinder barbican keymanager passes incorrect positional parameters to barbican Secrets.create(). Change-Id: I7b0c2bafce12964ffcfe1066953c2c93ca460e92 Closes-bug: 1552684 --- diff --git a/cinder/keymgr/barbican.py b/cinder/keymgr/barbican.py index 9f71890b5..ee59cbc5a 100644 --- a/cinder/keymgr/barbican.py +++ b/cinder/keymgr/barbican.py @@ -197,6 +197,7 @@ class BarbicanKeyManager(key_mgr.KeyManager): payload_content_encoding, algorithm, bit_length, + None, mode, expiration) secret_ref = secret.store() diff --git a/cinder/tests/unit/keymgr/test_barbican.py b/cinder/tests/unit/keymgr/test_barbican.py index 77e4ed903..75dcc1fc2 100644 --- a/cinder/tests/unit/keymgr/test_barbican.py +++ b/cinder/tests/unit/keymgr/test_barbican.py @@ -127,6 +127,7 @@ class BarbicanKeyManagerTestCase(test_key_mgr.KeyManagerTestCase): 'base64', original_secret_metadata.algorithm, original_secret_metadata.bit_length, + None, original_secret_metadata.mode, original_secret_metadata.expiration) self.create.return_value.store.assert_called_once_with() @@ -209,7 +210,7 @@ class BarbicanKeyManagerTestCase(test_key_mgr.KeyManagerTestCase): b'AQKgsw==', 'application/octet-stream', 'base64', - 'AES', 32, 'CBC', + 'AES', 32, None, 'CBC', None) self.assertEqual(self.key_id, returned_uuid) @@ -226,7 +227,7 @@ class BarbicanKeyManagerTestCase(test_key_mgr.KeyManagerTestCase): secret_key_text, 'text/plain', None, - 'AES', 256, 'CBC', + 'AES', 256, None, 'CBC', None) self.create.return_value.store.assert_called_once_with()