Commit Graph

58 Commits

Author SHA1 Message Date
Zuul 3e35eb05ed Merge "Add requests to requirements" 2024-02-19 16:03:51 +00:00
Zuul 85ad6904fd Merge "Add support to InfluxDB v2 as storage backend" 2024-02-19 16:03:46 +00:00
Pedro Henrique 101a410739 Add support to InfluxDB v2 as storage backend
This patch allows CloudKitty to use InfluxDB v2 with Flux queries. This
type of query uses less CPU and RAM to be processed in the InfluxDB
backend.

Change-Id: I8ee3c92776aa69afbede353981a5fcd65dd7d099
Depends-On: https://review.opendev.org/c/openstack/requirements/+/895629
Story: 2010863
Task: 48539
2024-02-19 15:30:37 +01:00
Pierre Riteau 9797989e88 Add requests to requirements
We use requests in several places in cloudkitty code, so we need to
depend on it directly instead of installing it through dependencies.

Change-Id: Ibedb9ddba61b39c80b1e1b3910a90468bdfc76ae
2024-02-19 09:32:01 +01:00
Rafael Weingärtner b46dcd8983 Removal of Monasca fetcher and collector
Change-Id: I314c751f2b2dea693bea66d7d9b06679a06b0b6b
2024-02-14 08:59:28 -03:00
Tobias Urdin 9756793988 Use new get_rpc_client API from oslo.messaging
Use the new API that is consistent with
the existing API instead of instantiating the client
class directly.

This was introduced in release 14.1.0 here [1] and
added into oslo.messaging here [2]

[1] https://review.opendev.org/c/openstack/requirements/+/869340
[2] https://review.opendev.org/c/openstack/oslo.messaging/+/862419

Change-Id: Ia95d2c85cded3be8944c0cc5fafc30d37df9ce82
2023-01-19 20:52:14 +00:00
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
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
Andreas Jaeger 56609c46f9 [ussuri][goal] Cleanup drop python 2.7 support
OpenStack is dropping the py2.7 support in ussuri cycle.

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

this removes some cruft that can be removed now:
* cruft in setup.cfg and setup.py
* tox.ini: Add ignore_basepython_conflict and increase minversion
  for that
* Python 2/3 specific requirements, the repo is Python 3 only.

Change-Id: Iae68e58c82a180eb771bef00a3f44fd28abe5fae
2020-02-24 20:16:56 +01: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 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 394177fb74 Fix requirements.txt
This updates the influxdb requirement to match OpenStack global requirements.

Change-Id: I3f9e2d458faa48f1215664a92779933e843931c2
2019-04-15 12:02:51 +02: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
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
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
Luka Peschke 059a940392 Improve metrics configuration
This patch provides a refactoring of the metric
configuration model (and file description) to
improve genericity, maintainability and usage for
non-openstack deployment.

The new metric yaml format is defined in the
attached story task and is validated on load with
voluptuous.

Now, a processor is dedicated to one collector and
one storage backend. Thus, collector and storage
configuration go back to the cloudkitty oslo conf.

Collectors have been refactored to have a code as similar as possible,
in order to ease comprehension for new contributors.

Story: 2001883
Task: 14354
Task: 14355
Task: 14431

Change-Id: I948dd9cd5c113bdaa4e49c532354938ffb45f0e7
2018-06-28 11:19:51 +00:00
Luka Peschke dd64aaa3d5 Remove Ceilometer collector and transformer
As announced during the Queens cycle, all ceilometer-collector
related code has been removed.

Change-Id: I03f9a89ae4bc970fbc421dd6964be95cdacfe758
Task: 6293
Story: 2001503
2018-03-07 09:14:02 +00:00
Jeremy Liu 2a2967d2f4 Update default configuration for cors
oslo.middleware supports `set_defaults` for cors since 3.10.0 [1].

[1] https://github.com/openstack/oslo.middleware/blob/3.10.0/oslo_middleware/cors.py

Change-Id: I9ec3a3c55db1fd7584d3f6dac561f1c2159a89bc
2018-01-31 11:20:47 +00:00
ritesh.arya 66784899d6 Remove deprecated oslo_messaging.get_transport
DeprecationWarning:
Using function/method 'oslo_messaging.transport.get_transport()'
is deprecated: use get_rpc_transport or get_notification_transport.
Replace get_transport with get_rpc_transport.

Change-Id: Iea7ed92aa481b5d1c016693a12b623887c4e86bb
2017-12-06 08:58:37 +00:00
Luka Peschke 8876785d18 Add a collector for Monasca
This adds a collector for Monasca. For now, only ceilometer metrics
published by ceilosca (https://github.com/openstack/monasca-ceilometer)
are collected, but this should be extended in the future.

Change-Id: If4553dd1ab1a45846699735979b54426e121a0b1
Task: 5717
Story: 2001211
2017-10-27 14:53:01 +02:00
shubhendu 32e768c766 Set access_policy for messaging's dispatcher
oslo.messaging allow dispatcher to restrict endpoint methods
since 5.11.0 in d3a8f280ebd6fd12865fd20c4d772774e39aefa2, set with
DefaultRPCAccessPolicy to fix FutureWarning like:

FutureWarning: The access_policy argument is changing its default
value to <class 'oslo_messaging.rpc.dispatcher.DefaultRPCAccessPolicy'>
in version '?', please update the code to explicitly set None as the
value: access_policy defaults to LegacyRPCAccessPolicy which exposes
private methods. Explicitly set access_policy to DefaultRPCAccessPolicy
or ExplicitRPCAccessPolicy.

Change-Id: I4ef639d3f93bc56884e92ce17ced091dcebb4170
2017-05-29 10:05:06 +05:30
Aaron-DH 2ba69c4a0b Modify policy of get total/summary
Update policy of get_total/summary, admin user can
get rate info of all tenants and non-admin user can
get rate info of itself.

For example, get total api change as follows:
    cloudkitty total-get
        -- get total of current tenant(get tenant from context)
    cloudkitty total-get -t tenant_id
        -- get total of specified tenant if allowed(admin or owner)
    cloudkitty total-get --all-tenants
        -- get total of all tenants if allowed(admin)

Change-Id: I47dd5f310f18b7e5211165069692827047cdccd6
closes-bug:#1644399
2017-01-26 13:52:09 +01:00
zhangguoqing babfc9287c Upgrade oslo.messaging to 5.2.0
Avoid the jenkins error: 'ImportError: No module named vine.five'

Change-Id: I5f9fcbdd42a2b147825172a02bfd4c5ecd39f187
2016-11-04 15:34:12 +08:00
Jenkins 7f608c264e Merge "Added native gnocchi storage driver" 2016-09-15 20:08:33 +00:00
scolinas 49e8417f13 Added native gnocchi storage driver
This storage driver adds full native support for gnocchi, improving the
performance compared with the hybrid solution and taking advantage of
gnocchi capabilities.

Change-Id: I65293ead2696967b028f8f9f11ecb84fb93380ff
Co-Authored-By: Stéphane Albert <stephane.albert@objectif-libre.com>
2016-09-15 21:48:08 +02:00
Jenkins ab30cdec84 Merge "Define context.roles with base class" 2016-06-29 13:04:08 +00:00
Stéphane Albert 6cb5a2c383 Fix missing requirement alembic
Change-Id: Iec9dc8857a366bc9bf4122bd7494065416fe1f40
2016-05-18 17:38:21 +02:00
Ronald Bradford 4f8dd44b1e Define context.roles with base class
In f383bd2973c58c5272504603e4f9dddd55c5bb68, oslo.context (2.2.0)
added roles support in the context itself. This passes roles to
super()__init__.

requirements.txt updated to match global requirements. There is no
Proposal Bot request for this.

Change-Id: I1e00d8b2cf48403a7e2e4387431a835ecc69d86a
2016-04-06 13:08:06 -04:00
Stéphane Albert f7641aaa9f Added gnocchi collector
CloudKitty now supports gnocchi data collection.
Support is still experimental as it's lacking some data.
Some fetched data might be inaccurate as it highly depend on your
archive policies.

Change-Id: I7e6668c766b7bd4641cccc2bd841a7aed1d2e2d5
2016-03-25 18:10:12 +01:00
Chaozhe.Chen 9fe4552a00 Migrate from keystoneclient to keystoneauth
keystoneauth was split out last cycle as a library specifically to deal
with doing auth functions so that people who do not need to do keystone
CRUD operations can just consume only the auth session parts.
Migrated piece of code using keystoneclient auth sessions to
keystoneauth.

bp: keystoneclient-to-keystoneauth

Change-Id: I99f99bae8cfb7462e5a9a10f2a559bdff7219634
2016-03-25 15:33:13 +01:00
Stéphane Albert 72a5364afb Added distributed lock fixing horizontal scaling
Tooz is used to implement distributed locking and prevent multiple
processors working on the same tenant.

Change-Id: I8398ee7d448ab5b4d5c64f6e5f82c5018418849a
2016-03-25 10:01:09 +01:00
Michael Krotscheck d71f167796 Updated from global requirements
Updated with mitaka requirements.
This patch performs a manual update of all requirements from the
openstack global-requirements repo.

Change-Id: Iab34d66b1c12deb53dc5c302db88d8726cabc88c
2016-03-25 01:14:12 +01:00
Claudiu Belu 9d367d402f Removes unused posix_ipc requirement
posix_ipc is not used anywhere in the project.

Change-Id: I2eee33d9b5340e50ebd0c732903c17e132cca008
2016-02-11 08:44:54 -08:00
Bertrand Lallau 50199eb15a Remove iso8601 dependency
CloudKitty does not import and use this module directly,
no need to list it in the requirements.
This dependency was required before oslo_utils.

Change-Id: Ie323185b6006af306b09f814ac92c19049d94d5a
2015-12-13 09:43:05 +01:00
Stéphane Albert 1039e44ee6 Moving to Liberty cycle (0.5)
Transitioned from deprecated oslo namespace to newer ones.
Updated requirements.
Updated configuration.

Change-Id: Ic395878a21564ceed6febe85179523efd9956eb9
2015-08-28 16:51:03 +02:00
Stéphane Albert 34390d5308 Updated requirements to stable/kilo
Change-Id: I96114c8a9b2fb684be82d5edd6427c53e7ca9921
2015-06-09 16:53:10 +02:00
Stéphane Albert 2bc63b90ff Bumped version of WSME
Fixed problems with documentation generation.

Change-Id: Ie10820d525dfbce21119b377aa5c93b6a9ab65cf
2015-06-09 14:20:32 +02:00
Endre Karlson f7852039e7 Sync oslo modules
Change-Id: I722705913ba528e41b2fea33e2eb05850db8c087
2015-06-09 08:52:06 +02:00
Gauvain Pocentek 1960a4c114 Add ACL support on the API
Right now every authenticated user can perform administration actions on
CloudKitty's API. This patch uses oslo.context and oslo.policy to enable
a policy engine.

Enforcement of the policy will be added in another patchset.

Change-Id: Ia88a37b259f12aee00f65876686d12411297b8fb
2015-05-05 11:36:01 +02:00
Gauvain Pocentek b6aa5b9a02 Remove explicit oslo.messaging version requirement
This will help us support both the current (kilo) trunk and previous
releases.

Change-Id: I4f6d814df50668fb3009ef5fa5c271f02dc51b8c
2015-04-17 16:23:41 +02:00
Gauvain Pocentek 4bf7a888ae Use keystone middleware for authentication
Implementation of permissions will come in another patch.

Change-Id: Ie048a9f917436d87634e7c667918f897384e49d7
2015-03-06 17:56:45 +01:00
Stéphane Albert 1f67217cde Added multi-tenancy support
Change-Id: I89e75d4dd36410ab7e24f81261ad8703dab11297
2015-02-10 12:01:47 +01:00
Stéphane Albert de644c15d9 Pinned oslo.messaging version
We're not using oslo_messaging namespace.
We need to fix this before moving to >=1.6.0.

Change-Id: Ib72c5be10a2e4e4ac2e6dc4076bf4ccdb92a59a0
2015-02-03 18:16:45 +01:00