Commit Graph

7 Commits

Author SHA1 Message Date
Hervé Beraud f1f4979844 Use unittest.mock instead of mock
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.

Change-Id: Ib3ca91e93db260e081c43d236d5d6fae5a2adfd7
2020-06-09 20:57:54 +02:00
Sean McGinnis 45fd25c572 Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I6245a207ec65df0ef11a798b4cffe3157abccb73
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Co-Authored-By: Spyros Trigazis <spyridon.trigazis@cern.ch>
2020-04-29 17:10:23 +03:00
Ricardo Rocha 54cd3caf10 Use barbicanclient.v1 instead of barbicanclient
Direct import of barbicanclient is being deprecated, we should use
barbicanclient.v1 as per the warning message.

Closes-Bug: #1737145

Change-Id: I59d9ecfefd6a432cb8004da0d3676c576e53c5f0
2018-01-11 14:48:31 +00:00
Samantha Blanco a58d1b7d83 Replace naked exceptions in barbican_cert_manager
Change-Id: I701f920b0d3dab4da4458e41479e5aeeb58f3c35
Closes-Bug: #1492536
2016-10-17 15:35:15 -04:00
Madhuri Kumari e31ef64e6e Delete certs when deleting bay
Currently Magnum fails to delete certificates when barbican
cert manager is used. The code was copied from neutron-lbaas and
they have different usecase. In our case, certificate is managed by
Magnum not users, so we should delete certificates when deleting bay.
So this patch deletes all the certs related to a bay.

Change-Id: I5aab01641b9447153911680c5f68e5fe2c5a1409
Closes-bug: #1587033
2016-06-30 12:40:16 +05:30
lei-zhang-99cloud cb46cfafa8 Fix order of arguments in assertEqual
Some tests used incorrect order assertEqual(observed, expected).
The correct order expected by testtools is
assertEqual(expected, observed).
This patch fix the issue in the module magnum/tests/unit/common/.

Change-Id: Ib92006145171d265b836e0fc9951583414d83952
Partial-Bug: #1259292
2015-10-10 18:11:18 +08:00
OTSUKA, Yuanying 1727c1728f Add CertManager to store CA and client certificate
To implement TLS support, we should store CA and client cert for each
bay. This patch adds common library to store cert to Barbican.
Magnum uses service admin privilege to store the cert, this means that
end user can't retrieve CA cert and private key from Barbican
directly.

This patch is copied from neutron-lbaas project.
*  I435189b2637e32803a13ebd4951e61fac4ab234d

Change-Id: I519228d9749ad610db3e0c698caa1144813f9d52
Partial-Implements: blueprint magnum-as-a-ca
2015-09-05 16:25:57 +09:00