3ab4774f66
This adds a v2 storage interface as well as a gnocchi backend for it to cloudkitty. This new interface will allow us to implement the v2 API, which will be more metric-oriented. This new storage uses the new dataframe format ('desc' is now split up into 'groupby' and 'metadata', following the collect logic); and supports grouping, filters and pagination. Modifications: * The tenant/scope state management isn't handled by the storage backend anymore. A StateManager object has been added. * All internal interactions with the storage backend use the v2 interface. An adapter class has been added to ensure retrocompatibility with the v1 interface. * A base class for functional tests testing the v2 storage interface has been added. It contains generic tests, which should allow easier testing for new v2 backends. * Some developer documentation explaining how to implement a v2 storage backend has been added. User documentation will be updated once the v2 storage backend is considered stable. The v1 is still the default storage version. Note that this new version is considered unstable and should only be used for upstream development. Change-Id: I5e9b95c79292582fab3017289d35ee310e35ffea Story: 2001372 Task: 6585 Task: 14361 Task: 24535
78 lines
2.0 KiB
INI
78 lines
2.0 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
skipsdist = True
|
|
envlist = py35,py27,pep8
|
|
|
|
[testenv]
|
|
whitelist_externals = rm
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONWARNINGS=default::DeprecationWarning
|
|
usedevelop = True
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
commands =
|
|
/usr/bin/find . -type f -name "*.py[co]" -delete
|
|
rm -f .testrepository/times.dbm
|
|
stestr run {posargs}
|
|
|
|
[testenv:debug]
|
|
basepython = python3
|
|
commands = oslo_debug_helper {posargs}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3
|
|
commands =
|
|
flake8 {posargs} cloudkitty
|
|
|
|
[testenv:cover]
|
|
basepython = python3
|
|
setenv =
|
|
VIRTUAL_ENV={envdir}
|
|
PYTHON=coverage run --source $project --parallel-mode
|
|
commands =
|
|
stestr run '{posargs}'
|
|
coverage combine
|
|
coverage html -d cover
|
|
coverage xml -o cover/coverage.xml
|
|
coverage report
|
|
|
|
[testenv:genconfig]
|
|
basepython = python3
|
|
commands =
|
|
oslo-config-generator --config-file etc/oslo-config-generator/cloudkitty.conf
|
|
|
|
[testenv:genpolicy]
|
|
basepython = python3
|
|
commands = oslopolicy-sample-generator --config-file=etc/oslo-policy-generator/cloudkitty.conf
|
|
|
|
[testenv:docs]
|
|
# TODO: switch back to python3 after removing wsme from the api
|
|
basepython = python2
|
|
commands = python setup.py build_sphinx
|
|
|
|
[testenv:venv]
|
|
basepython = python3
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
filename = *.py,app.wsgi
|
|
exclude = .git,.venv,.tox,dist,doc,*egg,build,.ropeproject,releasenotes
|
|
ignore = H105
|
|
|
|
[hacking]
|
|
import_exceptions = cloudkitty.i18n
|
|
local-check-factory = cloudkitty.hacking.checks.factory
|
|
|
|
[testenv:releasenotes]
|
|
basepython = python3
|
|
commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
|
|
|
|
[testenv:functional]
|
|
basepython = python3
|
|
setenv = TEST_FUNCTIONAL = 1
|
|
# Some tests do push and remove data from the storage backend, so this is done
|
|
# in order to keep data consistency
|
|
commands = stestr run --concurrency 1 {posargs}
|