Commit Graph

21 Commits

Author SHA1 Message Date
Ghanshyam Mann 937a03b171 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I775420251d6e47f60c4a266b4013be84a52378da
2022-06-01 07:34:18 +00:00
Rafael Weingärtner 65af204a1c Introduce reprocessing API
Depends-on: https://review.opendev.org/c/openstack/cloudkitty/+/777442
Depends-on: https://review.opendev.org/c/openstack/requirements/+/799315

Implements: https://review.opendev.org/c/openstack/cloudkitty-specs/+/791245

Change-Id: Idb0032eba17d83409344ab58153097ac70814e86
2022-02-25 14:49:49 +01:00
Rafael Weingärtner 885c9f077f Fix tests cases broken by flask >=2.0.1
Flask has been updated in the requirements projects from OpenStack [1].
This has broken some test cases that were mocking the root object
"flask.request".

Instead of mocking the root object, we address the issue by mocking only
the needed methods and attributes. This facilitates the understanding of
the unit test, and also helps people to pin-point problems right away.

[1] https://review.opendev.org/c/openstack/requirements/+/793023

Change-Id: I8703c7d3e69f35ef3e85234c27b4743242111f3d
2021-06-07 18:19:32 +02:00
Zuul 208e78aaa8 Merge "Remove six" 2021-02-22 15:54:20 +00:00
xuanyandong 335aa966f3 Remove six
Replace the following items with Python 3 style code.

- six.moves
- six.add_metaclass
- six.PY3
- six.text_type
- six.string_type
- six.string_types
- six.iteritems
- six.integer_types

Implements: blueprint six-removal
Change-Id: Ifdb5ffad4203f14c58959b87338d0de34af76674
2021-01-12 09:02:22 +08:00
Ghanshyam Mann c8370c2ab2 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I608d3f55dfa9b6052f92c4fd13f2aae6d714e287
2020-12-22 18:49:31 -06:00
Andreas Jaeger 11ff7365a3 Update lower-constraints
This repo has not been testing lower-constraints at all due to
broken install_command. If you look at any lower-constraints run and
compare the install python packages with lower-constraints, you see
that those are completely different.

This change removes install_command and updates deps in tox.ini to
follow best practices (moving constraints into deps).
It also updates lower-constraints to newer versions.

Remove broken hacking test.

Co-Authored-By: Justin Ferrieu <jferrieu@objectif-libre.com>
Change-Id: I13daab9e53617266beff7053e50779d1f281802c
2020-12-14 18:03:59 -03:00
Andreas Jaeger cbcdacac61 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I6be1174686cb1d8f11e8cb4be58c0e739bf0f931
2020-09-07 18:47:30 +02:00
Rafael Weingärtner b7abb9bb69 Replace tz.UTC with dateutil.tz.tzutc()
As discussed in https://review.opendev.org/#/c/742477/, this patch
replaces the use of `tz.UTC` with `dateutil.tz.tzutc()`

Also add python-dateutil to requirements.txt, using the same minimum
version as several other OpenStack projects, including nova.

Change-Id: I4da9e8854a571058e48c2f51c1d340bc135cfe2b
2020-08-21 15:58:38 +02:00
Sean McGinnis 18a47cb24a Use unittest.mock instead of third party mock
We can now use the standard library mock library instead of the third
party one previously needed for py27 compatibility.

Change-Id: Ia8e87cd6a25621a97c876de5422d0c9d0c8dd751
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-08-13 09:43:50 +00:00
caoyuan 05eb7b9a58 tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: Ic3a57b513d3646b6931edc6163c2702805d29d57
2019-12-19 15:21:01 +08:00
Luka Peschke b16da527a9 Replace eventlet with futurist
This replaces the "eventlet" library with "futurist". Futurist does not
require monkey-patching of the standard library, is an openstack project
and is simply an overlay to the python STL in python3, rather than a
partial replacement.

Change-Id: Ib4f3a59377144e1d37028dfc3df77180d79e0c46
2019-09-12 14:08:28 +00:00
Luka Peschke 54c1b98b12 Update bandit version
This fixes the minimal bandit version to 1.6.0 and updates the
format of the -x option.

Change-Id: Ib0691b53669b6f4f7824bd4385640c5a805a1e2a
2019-08-26 12:17:41 +00:00
pengyuesheng 22e8c9337e Bump openstackdocstheme to 1.30.0
...to pick up many improvements, including the return of table borders.

Change-Id: Icfa6f07857d8afba91a2825c051b1d4b3449040e
2019-06-27 09:53:47 +08:00
Luka Peschke 1e60561ad7 Make cloudkitty-processor run several workers
This makes the processor run several workers in separate processes by
default, leading to a big performance increase. The maximal number of workers
can be configured. Work items:

* Use cotyledon to spawn several workers.

* Remove eventlet monkey patching and use the "threading" executor for
  messaging in order to avoid conflict with cotyledon internal threads.

Story: 2005423
Task: 30447
Change-Id: I7e2a77cb7d68afb87274fb44fb208306c3b32473
2019-04-15 12:45:38 +00:00
Luka Peschke dc2509ba65 Bootstrap the v2 API
This adds a v2 API root to CloudKitty. An example endpoint along with some
developer documentation has been added. The API root is now served with Flask
instead of pecan.

Change-Id: I4ede52dae531631f7fe708400def01bc08a64dec
Story: 2004208
Task: 27717
Task: 27718
Task: 27719
2019-04-01 13:52:04 +02:00
Hervé Beraud 60740282c9 Add bandit for security static analysis and fix potential security issues
This change adds a basic bandit config for cloudkitty. It can be invoked
by running the tox environment for bandit;
    tox -e bandit

These changes also fix potential security issues find during bandit checks.
- binding to all interface: remove useless host_ip option to avoid issue
- hash function issue: switch from sha1 to sha512
- use of exec: can't be removed for moment so using #nosec comment

Change-Id: Iae7d7604457345fe6d482cf48311c9b75fdde947
2019-03-25 16:26:05 +00:00
Luka Peschke b0487b6390 Support upgrade checks
This adds the ``cloudkitty-status upgrade check`` command to CloudKitty.
For now, this tool checks the storage version and raises a warning in case
v1 is used.

Depends-On: https://review.openstack.org/#/c/615928/
Change-Id: I39dc98fb716392a22765f169e2da0d389b33b941
Story: 2003657
Task: 26124
2019-02-04 08:42:21 +00:00
Luka Peschke c4758e78b4 Adding an InfluxDB storage backend
This adds an InfluxDB backend to v2 storage. It is much more performant than the
gnocchi backend, and adds support for grafana.

In order to avoid making this patch too big, the documentation will be updated
in another patch.

Support for InfluxDB installation in the devstack plugin will also be added in
another patch.

Change-Id: Icaa23acb1a4791aac0dd8afb122d561065193eea
Story: 2001372
Task: 24536
2018-12-11 14:32:55 +01:00
Dao Cong Tien b3ae81dc92 Adds doc8 check to pep8
This patch adds doc8 check for .rst files to pep8.
Files that fail doc8 check are also fixed.

Change-Id: Ib8556b6eac0fb5a9bd3b7f8dcf000ab1b23e23bc
2018-10-22 11:14:57 +02:00
Luka Peschke c417e5f6cb Use global-requirements for requirements
This updates cloudkitty's requirement and setup files in order to use
openstack/requirements for constraints. This will help to avoid dependency
conflicts when cloudkitty is deployed in an openstack context.

Work items:

* Updated requirements.txt, test-requirements.txt and setup.py with the
  `update-requirements` tool provided by openstack/requirements.

* Added a lower-constraints.txt file.

* Added the "check-requirements" zuul job template to the CI.

Change-Id: I5aab02374523be83a65c8b7f47f1df5e93b5a3d2
2018-10-17 07:29:48 +00:00