Commit Graph

1455 Commits

Author SHA1 Message Date
Kendall Nelson 353f75eca0 Retire Karbor
As announced on the openstack-discuss ML[1], Karbor is retiring
this cycle (Wallaby).

This commit retires this repository as per the process defined in
the project-guide[2].

Thank you to all the contributors of Karbor for your hard work!

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/018643.html
[2] https://docs.openstack.org/project-team-guide/repository.html#retiring-a-repository

Depends-On: https://review.opendev.org/c/openstack/project-config/+/767030
Change-Id: I972ffb299f93863c4e34b1f504b002095661e6af
2020-12-21 11:51:02 -08:00
Zuul fcca3935af Merge "Switch legacy Zuul jobs to native Zuul v3 jobs" 2020-09-16 03:13:12 +00:00
Zuul 4bbc17595f Merge "Fix 'filter' object has no len ()" 2020-09-16 02:30:26 +00:00
Zuul 3881b44968 Merge "Fix inner has no attribute 'message'" 2020-09-16 02:08:41 +00:00
wangyu 594f4eff8a Switch legacy Zuul jobs to native Zuul v3 jobs
Replace the 'karbor-dsvm-fullstack' legacy Zuul job with
the 'karbor-fullstack' native Zuul v3 job.

See
https://governance.openstack.org/tc/goals/selected/victoria/native-zuulv3-jobs.html
for more details.

Change-Id: I558c8e02011e98950354266254511bd113d5c5ec
2020-09-15 10:09:41 +00:00
wangyu 5d6f5eb7ab Fix 'filter' object has no len ()
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
2020-08-15 11:44:53 +08:00
wangyu e167485dd7 Fix inner has no attribute 'message'
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
2020-08-14 10:28:51 +08:00
Sean McGinnis 3df667582c
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: Ifd0d1b8aa419e39361e76a4f846cb4eeaf0d46ca
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-08-13 08:28:07 -05:00
Andreas Jaeger 0764f5dab1 Update hacking for Python3
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
2020-05-13 19:20:28 +00:00
Andreas Jaeger ee26961cfc Cleanup py27 support
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
2020-04-21 09:44:39 +02:00
Zuul 297700ee2b Merge "Add unit tests for trigger update API" 2020-04-08 00:59:01 +00:00
Zuul 2ccd5da4a8 Merge "Remove password display for rabbitmq on connection log" 2020-04-08 00:57:33 +00:00
Zuul 1b50e6c117 Merge "Preserve request id in Karbor logs" 2020-04-08 00:54:21 +00:00
wangyu a0415ae7f5 Remove password display for rabbitmq on connection log
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
2020-03-26 08:42:38 +08:00
wangyu 435dc3c423 Preserve request id in Karbor logs
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
2020-03-26 08:28:00 +08:00
OpenStack Proposal Bot 9c55d2046e Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I333852356cbe61a4209fde06b10c73def3e5100c
2020-03-20 07:31:07 +00:00
shenxindi 7fc2b10557 Remove unsupported calls
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
2020-03-16 17:30:28 +08:00
Ghanshyam Mann 401c9bca56 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Karbor is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: Id923a1e18a1ba2439eda11a88abab64a3b32cab1
2020-01-23 13:43:50 +00:00
ericxiett 11ece54087 Add unit tests for trigger update API
Change-Id: I7f74c0346eef45ac83207410756e003266989bba
2019-12-13 02:17:32 +00:00
shenxindi 95c1a0e7e2 Fix unit test error
Fix all the order of decorators and parameters in unittest.

Change-Id: Ic055aaf38f1e99d21ca1ada3055048ee72a360d9
2019-11-15 10:52:24 +08:00
minruigao 5cbb6dcbc9 Add unit tests for quota_class_update api
Change-Id: I7a8a374f3978bc08a47c11b657252946339dd6b8
2019-11-14 11:28:03 +00:00
Zuul 848a246036 Merge "Fix get min interval error" 2019-11-14 10:54:06 +00:00
Zuul 02dbd3ba40 Merge "Add verifications api doc" 2019-11-14 10:43:47 +00:00
Zuul 960e737c9e Merge "Use trustee project_name instead of fixed value" 2019-11-14 10:43:43 +00:00
Zuul 5464d7240e Merge "Add unit test for services api" 2019-11-14 10:41:45 +00:00
Zuul 3676e53e1b Merge "Fix bug for running unittest with unittest module" 2019-11-14 10:38:56 +00:00
wangwei1 d56877b3fe Fix bug for running unittest with unittest module
When we run unittest with a way like:
python -m unittest2 <test_file>
then NoSuchOptError exception will raised

Change-Id: Ib0f9276c1b86ff7f2d1e401ddfae2bf4e920fa78
2019-11-14 17:02:49 +08:00
shenxindi d1052b68eb Fix unit test error
Fix the order of decorators and parameters for
karbor.protection.manager.ProtectionServiceTest in unittest.

Change-Id: I9d58c33787e0b2039a046ea30c7238485a76af2d
2019-11-14 16:58:24 +08:00
helei e482ebe18c Add unit test for services api
Change-Id: I0a4cec43c76d64191c5e962674ba31b5d6a834a3
Signed-off-by: helei <helei@cmss.chinamobile.com>
2019-11-14 15:30:41 +08:00
jiaopengju 66d007e501 Fix get min interval error
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
2019-11-14 06:28:22 +00:00
jiaopengju 82f07c14b6 Use trustee project_name instead of fixed value
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
2019-11-14 14:24:29 +08:00
jiaopengju 6093b5b11e Modify the time interval configurations in devstack
Story: 2006848
Task: 37436

Change-Id: I9ae08550f74347fc8f8436eca3cf4320ec97dd1f
2019-11-14 10:49:52 +08:00
jiaopengju 0970daeb5d Add verifications api doc
Change-Id: Id84f40f5786d96438fc7fb84dafc96372a28d634
Story: 2006807
Task: 37357
2019-11-13 10:49:26 +08:00
jiaopengju 28fabef6ec Remove invalid exception catching
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
2019-11-12 16:04:12 +08:00
Zuul c5c16090a6 Merge "Add services api doc" 2019-11-12 07:20:26 +00:00
jiaopengju e75309d792 Add services api doc
Change-Id: I769134524cb47ada83649121e231d337a2dc0db0
Story: 2006807
Task: 37357
2019-11-12 13:37:44 +08:00
Zuul b3e8078b89 Merge "Add some operation log" 2019-11-11 07:20:31 +00:00
guolei 11ce26e484 Add some operation log
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>
2019-11-11 11:32:39 +08:00
Zuul 41f77bcd2f Merge "Update contributor doc" 2019-11-09 08:42:06 +00:00
jiaopengju 14c723aa8d Update contributor doc
Change-Id: I54497c76c3fc7f6624d4b8ac48601b46569a0d9d
Story: 2006807
Task: 37357
2019-11-09 07:30:12 +00:00
liushuai 3ce0a84c36 Add unit test for triggers
Change-Id: I55995462f46d4cd7a135602bde92174edaf6b5a8
2019-11-07 23:24:45 +08:00
Zuul 8edf64fc0b Merge "Imported Translations from Zanata" 2019-11-06 04:59:31 +00:00
Zuul dabd25fc36 Merge "Correct spelling errors in test_quota_classes" 2019-11-06 04:54:39 +00:00
OpenStack Proposal Bot d8749ff640 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I63ef76eaa7bc22c62bc99bd0fcc9a3e2adec0f51
2019-11-05 09:07:34 +00:00
Zuul 26a0136c04 Merge "Add unit test for quota api" 2019-11-04 10:31:46 +00:00
Zuul 643ce090d9 Merge "Update api ref of checkpoint reset" 2019-11-04 10:27:18 +00:00
jiaopengju 2aac31c11f Update api ref of checkpoint reset
Change-Id: If9dbc815c94f348e31cfa6c9fed303f16a630f64
Story: 2006807
Task: 37357
2019-11-04 17:11:58 +08:00
Zuul 9073c8990f Merge "Add checkpoint reset state command in doc" 2019-11-04 02:42:58 +00:00
jiaopengju 9863640d45 Add checkpoint reset state command in doc
Change-Id: Ib561f1e1ca1e347e8a52e143af0a836311e69990
Story: 2006807
Task: 37357
2019-11-04 09:43:19 +08:00
jiaopengju 63fff4d679 Added examples and verify options in install guide
Change-Id: Idaa14d90c853a3455f35f7f6fd9e00d0f40844b7
Story: 2006807
Task: 37357
2019-11-03 20:58:01 +08:00