Karbor has a python3 compatibility issue where it will fail with:
TypeError: object of type 'filter' has no len(). 'filter' is a list
in python.
Change-Id: I6505e454e2073c1611cbe5c4887241253051b1f1
Closes-Bug: #1891732
When DBDeadlock in karbor-api service, it get the following error:
AttributeError: 'DBDeadlock' object has no attribute 'message'.
This patch corrects that problem.
Change-Id: I1b268f5cca2c4efdcfb055d2fd8dfe522e6daf9d
Closes-Bug: #1891571
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: Ifd0d1b8aa419e39361e76a4f846cb4eeaf0d46ca
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The repo is Python 3 now, so update hacking to version 3.0.1 which
supports Python 3.
Fix problems found.
Remove hacking and friends from lower-constraints, they are not needed
for installation.
Change-Id: I6691687f0cd2fe4c9e7f2a76d333ca9eacb0cbf3
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
know about the requirement
- Remove obsolete sections from setup.cfg
- Update classifiers
- Switch to using sphinx-build
- Cleanup doc/source/conf.py to remove now obsolete content.
- Use newer openstackdocstheme version
- Move constraints into deps
- Increase warlock dependency, glanceclient blocks version 1.3.0
Change-Id: I8feb2e86281f2250bdc379b7868c5e738c1a19e6
When start karbor-protection and karbor-operationengine service,
Karbor will log rabbitmq password if debug is enabled. In a
production environment, this is pretty bad. This patch will fix it.
Change-Id: I11bd6db001739869fc6cddd005c9990d2943b809
Closes-Bug: #1859540
When the admin context is retrieved the user context and its request
ID is lost and all subsequent log entries have different request IDs.
The fix is to pass the overwrite parameter in Karbor's RequestContext
__init__ method to the parent oslo class.
Change-Id: I1091ddc8a36244132883932a3a21dea5274eb34a
Closes-Bug: #1859433
Because kubernetes 11.0.0 deleted the function of
'kubernetes.client.api_client.ApiClient.__del__',
which caused an ut error and deleted the relevant mock call.
Change-Id: I1ecade75227b3dc37c8fcdf775b7823583faea43
When we run unittest with a way like:
python -m unittest2 <test_file>
then NoSuchOptError exception will raised
Change-Id: Ib0f9276c1b86ff7f2d1e401ddfae2bf4e920fa78
Fix the order of decorators and parameters for
karbor.protection.manager.ProtectionServiceTest in unittest.
Change-Id: I9d58c33787e0b2039a046ea30c7238485a76af2d
When we use get_min_interval method, the exit condition is
the execution time is bigger than the rate time. But default
minutes rate is 2, this may leads errors when the interval
is bigger than 2 minutes, it always return None. So we can
not use min interval to judge if the interval is smaller than
that we configured in the configuration file. This should be
fixed.
Story: 2006848
Task: 37436
Change-Id: I268051f05f9b89e1b6013cfc8cecf90e9dc78581
Currently, when the default project name for openstack
services is not "service", it will fail when listing
protectable resources. This patch using trustee.project_name
to replace it.
Story: 2006797
Task: 37343
Change-Id: I8be62bb00e70dacd174e7fa3bd65489fb63488ab
List operation of verifications will never raise VerificationNotFound
exception in _get_all method, we should remove it to normalize the
error code.
Change-Id: Ia1a6345b1e38b9ccc4246d2d39d11cc8e537cb4e
For protect operation and retention operation, lacks some
key operation log print, so we add it.
Change-Id: Ife73b29511de3eea5094732fcfc82ff5e9783bc2
Signed-off-by: guolei <guolei@cmss.chinamobile.com>