When using 0 as the cost, the `create_threshold` method
throws an exception. That happens because 0 (zero) is evaluated
to False. Therefore, we need to change the validation method to
check if the values are None.
Change-Id: Iedd541c0ad16db0d11d6e6de332eddf880af1698
This adds a v2 client class allowing to add support for upcoming
v2 API endpoints. The v2 client class implements all v1 endpoints.
The cloudkitty API version can be specified with the
"--os-rating-api-version" option or the "OS_RATING_API_VERSION"
environment variable.
Change-Id: If38730da3baed59c93543a08f8a4989f919611db
This updates cloudkittyclient's requirement files in order to use
openstack/requirements for constraints. This will help to avoid dependency
conflicts when cloudkittyclient is deployed in an openstack context.
Work items:
* Updated requirements.txt, test-requirements.txt and doc/requirements.txt
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: I12a882ce4d24ade153a64b75852396377ac42ca6
The client has been completely rewritten in order to use cliff. The code
should be easier to maintain: authentication is now entirely handled by
keystoneauth, CloudKitty's client and CK's OSC plugin use the exact same
classes (no code duplication).
New features for users:
* Client-side CSV report generation: It is possible for users to generate
CSV reports with the new client. There is a default format, but reports
may also be configured through a yaml config file. (see documentation)
* The documentation has been improved. (A few examples on how to use the
python library + complete API bindings and CLI reference).
* It is now possible to use the client without Keystone authentication (this
requires that CK's API is configured to use the noauth auth strategy).
* Various features are brought by cliff: completion, command output formatting
(table, shell, yaml, json...).
New features for developpers:
* Python 2.7/3.5 compatible 'python-cloudkittyclient' module.
* Integration tests (for 'openstack rating' and 'cloudkitty') have been
added. These allow to create gate jobs running against a CK devstack
* Tests are now ran with stestr instead of testr, which allows a better
control over execution.
* The dependency list has been reduced and upper constraints have been set.
Change-Id: I7c6afa46138d499b37b8be3d049b23ab5302a928
Task: 6589
Story: 2001614
Use the new theme for the docs.
This needs an update of requirements, I synced all requirements with
global requirements list.
Change-Id: I50c451501a8c428a174f477b89a2986f93adfcb1
Cloudkittyclient now provides a plugin for the Openstack client.
setup.cfg was modified to provide entrypoints for the Openstack client. These
entrypoints can be found in the different shell_cli.py files.
Python-openstackclient was added to the requirements.
Implements: blueprint openstackclient-support
Change-Id: If0bbd919b1552b82cd77a52ded4f4ec32e6e14d8
- Dynamic import of cloudkitty modules
- Support the new cloudkitty-api
- Support the new hashmap API
Change-Id: I8e3067d3144ed9f78ffd6a89c97a2435939f0590
Co-Authored-By: Stéphane Albert <stephane.albert@objectif-libre.com>