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
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
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
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
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
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
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
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
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
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
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
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
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
As announced during the Queens cycle, all ceilometer-collector
related code has been removed.
Change-Id: I03f9a89ae4bc970fbc421dd6964be95cdacfe758
Task: 6293
Story: 2001503
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
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
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
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
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>
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
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
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
Tooz is used to implement distributed locking and prevent multiple
processors working on the same tenant.
Change-Id: I8398ee7d448ab5b4d5c64f6e5f82c5018418849a
Updated with mitaka requirements.
This patch performs a manual update of all requirements from the
openstack global-requirements repo.
Change-Id: Iab34d66b1c12deb53dc5c302db88d8726cabc88c
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
Transitioned from deprecated oslo namespace to newer ones.
Updated requirements.
Updated configuration.
Change-Id: Ic395878a21564ceed6febe85179523efd9956eb9
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