]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix call to Barbican Secrets create()
authorOllie Leahy <oliver.leahy@hpe.com>
Thu, 3 Mar 2016 14:05:14 +0000 (14:05 +0000)
committerOllie Leahy <oliver.leahy@hp.com>
Thu, 3 Mar 2016 14:15:08 +0000 (14:15 +0000)
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

cinder/keymgr/barbican.py
cinder/tests/unit/keymgr/test_barbican.py

index 9f71890b5d25268ba0876c1def3fb509271778e6..ee59cbc5a879e876ddb01a5ccddeba6e885b0d8b 100644 (file)
@@ -197,6 +197,7 @@ class BarbicanKeyManager(key_mgr.KeyManager):
                                                     payload_content_encoding,
                                                     algorithm,
                                                     bit_length,
+                                                    None,
                                                     mode,
                                                     expiration)
             secret_ref = secret.store()
index 77e4ed90343bcc3632cbf8ef5d4edf2afcc3c76b..75dcc1fc2a0c017046cb13bbef4a613344a1a506 100644 (file)
@@ -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()