By default not even an admin can use the get_summary endpoint with
all_tenants=True or using a tenant_id parameter. This commit fixes that.
This rule is now the same as how cinder defines admin_or_owner.
Change-Id: I3e34927e8ab88f25d2975b4dbac89b52a7d94c98
(cherry picked from commit 2a985c94ee)
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
Class docstrings were being pulled in to multiple locations, causing
sphinx errors due to the duplicate references. This fixes it by adding
the :noindex: option to those references.
Also temporarily disabling the PDF build as that is failing with another
issue that should be fixed in a follow up.
Change-Id: I6de2948ff49e1bb0b6a8b9a3a90f9f2ebbb8b7bb
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
The collector is configurable via the CLOUDKITTY_COLLECTOR variable, no
CLOUDKITTY_GNOCCHI is available.
Change-Id: If433bb26e64747e887af3b191cfae36f31390809
Signed-off-by: Abraham Arce <abraham.arce.moreno@intel.com>
This extends the possibilities for manipulating data with the Prometheus
collector without using custom scripts.
Work items:
* Implemented the range_function field in the Prometheus collector.
* Documented the range_function field.
* Updated the tests on the Prometheus collector to include the
range_function field.
Change-Id: I1a147be155b12175d7f031c14d0e90ab13aec700
Story: 2006427
Task: 36328
This extends the possibilities for manipulating data with the Prometheus
collector without using custom scripts.
Work items:
* Implemented the query_function field in the Prometheus collector.
* Documented the query_function field.
* Updated the tests on the Prometheus collector to include the
query_function field.
Change-Id: If6c2242d876eb40fb9a86a776258d50e7a2a441f
Story: 2006427
Task: 37688
This changes the way oslo.policy and oslo.context are used. This aims at
delegating as much work as possible to these libraries in order to ease
maintainability.
Work items:
* Use oslo_context.RequestContext's from_environ() method instead of building
the context manually.
* Replace "tenant_id" with "project_id" in policy rule definition/enforcement.
* Introduce a cloudkitty.context module allowing to easily tweak request
context creation.
Change-Id: I91f38b9aded2dc6453507edaa55cfd9ddf7e995b
This introduces a new option to the gnocchi collector: "re_aggregation_method".
It allows to specify an aggregation method that's different from the
retrieved aggregate type for dynamic aggregation.
Work items:
* Added a "re_aggregation_method" to the gnocchi collector
* Updated the documentation
* Added some unit tests
Change-Id: Id176c99a8cfc7761ba2a67c89a5521d23505ecb5
This fixes all build warnings in the docs, and makes them build
with -W (consider warnings as errors).
Work items:
* Remove the useless "METRICS_CONF" global variable in the monasca collector.
It was causing the "load_conf()" function to fail, as the
/etc/cloudkitty/metrics.yml file couldn't be found.
* Change the docstring indentation in
cloudkitty/rating/hash/controllers/mapping.py. This was the cause for the
"doc/source/api-reference/v1/rating/hashmap.rst:12: WARNING: Field list ends
without a blank line; unexpected unindent." message.
* Added a cloudkitty.conf sample to the admin documentation.
* Deleted unused files.
* Fixed the policy.yaml sample include path.
* Sorted the v2 API parameters alphabetically.
* Ignored the "wsmeext.sphinxext: directive 'autoattribute' is
already registered" warning
* Added :noindex: directives to functions documented twice.
* Made sphinx always build with -W.
Change-Id: I5f1ab04e18920f3352c2807878cad327692a225f
This adds two functions to the BaseResource class of the v2 API: "load"
and "reload". Since flask_restful resources are instantiated on each request,
this allows to load drivers only once.
Story: 2006654
Task 36900
Change-Id: I8fcc3115aae5c33a815980f6946da224000d541a
Work items:
* Updated Elasticsearch and InfluxDB v2 storage backends in order to support
grouping on time.
* Added a "dt_from_ts()" function to "cloudkitty.tzutils", along with unit
tests. This function converts an epoch timestamp to a timezone-aware datetime
object.
* Added unit tests for GET /v2/summary to validate grouping by time works as
expected.
* Updated the API documentation.
Change-Id: Ia01fced0bdb3a9b389a89d56f02029b9456781c2
Story: 2006730
Task: 37153
This adds an API migration table to the roadmap. Patches porting v1 API
endpoints to v2 must update this table.
Change-Id: Ia3e74b4377639ce505b1dfc06aff7faab40c86c8
Story: 2006578
Task: 36690
This adds support for pdf documentation generation. Work items:
* Provide a distinct index for pdf doc. This is required as the toctree in a
tab fails to render as a pdf document.
* Remove the v2 API reference from the pdf documentation. "rest_expand_all",
"rest_method" and "rest_parameters" are not supported.
* Add a pdf-docs tox env
* Update conf.py
Story: 2006075
Task: 34808
Change-Id: I848d59b551fe6d5077960dc45554c7281c2372a7
A new endpoint has been made available to admin users or
scope owners on ``GET /v2/dataframes``. This will allow
end users to retrieve DataFrames in the form of JSON objects
from the CloudKitty storage backend.
Documentation and unit tests are included in this commit.
Change-Id: I784da5565d040f565945fa93d86dcef11faa72f9
This adds an option allowing to force the granularity to use when doing metric
aggregations. If not specified or set to 0, the lowest available aggregation
method will be used.
Change-Id: I1ad36c3ac4125b4af285fddc3a4a649d5dc3b395
Since data frames are now handled as objects, transformers are no longer
required. This simplifies the global codebase.
Story: 2005890
Task: 36075
Change-Id: I76d9117bd95d80e51ca95804c999f145e65c3a2d
This adds a roadmap with different objectives and planned changes, along with
their current state and assignees.
Change-Id: I9d9e7c65186813cd5fce5e7783828dbde664fed8
A new endpoint has been made available to admin users on
``POST /v2/dataframes``. This will allow end users to push
DataFrames in the form of JSON objects into the CloudKitty
storage.
Documentation and unit tests are included in this commit.
Depends-On: https://review.opendev.org/#/c/668669/
Change-Id: I42641462ecbac89f400a257805fc99f4027903b3
Story: 2005890
Task: 35953
This adds a "validation_utils" module to cloudkitty, which aims at
centralizing common voluptuous helpers.
Work items:
* Create the validation_utils module, and move the "get_string_type" helper
function to it. API-specific helpers have not been moved.
* Update the module of the "get_string_type" helper function in the
documentation.
* Add two validators to the "validation_utils" module, allowing to check
the types of a dict's values and keys.
Change-Id: I938f78b9987fcc4752b84cff8881ceecb5e20caf
Story: 2005890
Task: 35657
Work items:
- "code-block" is now used instead of "code"
- "raw" has been replaced by "console" for code highlighting
- A typo has been fixed in doc/source/user/rating/pyscripts.rst
Change-Id: I065dfd91992520ecc41c2f8fe45026482eddbbfa
This updates some parameters in the API reference of the PUT /v2/scope
endpoint: Some parameters were marked as being expected in the query, but
were actually expected in the body.
Change-Id: Id42c4c26d68fb391be38a9cb7b9ae9a1dba3c254
A new endpoint is available to admin users on ``PUT /v2/scope``
with relatively similar parameters that are to be found on the
``GET /v2/scope`` endpoint regarding filtering. This allows
end users to reset the scope state of several scopes at once
if they are willing to.
Story: 2005395
Task: 30790
Change-Id: I28ccd24c65163b3e1b59e478653b01b84f2bb1b0
In case metrics are not available from within the project cloudkitty is
identified in, the project to fetch a specific metric can now be
specified in the metric's extra_args.
Change-Id: I722377a0df5586977184518733fe1cff341ad68f
This adds an endpoint on /v2/summary, as a replacement for /v1/summary.
It allows to retrieve a summary from the cloudkitty, which can be grouped on
custom attributes and filters.
Change-Id: I99bff44b24d3dcec2da97281f0b491ac333ed395
Story: 2005664
Task: 30961
This replaces the out-of-date "admin/configuration" section of the
documentation with a step-by-step configuration guide.
Change-Id: I2268ead54d0c0651c364bf790f1f17a16f28ab39
Story: 2004179
Task: 29063
This updates the "architecture" section of the documentation. Architecture
schemas have been added and information about the different parts
has been updated and extended.
Story: 2004179
Task: 28515
Change-Id: Ib20409079a1b5aadabeac28a12ec2baa7009ddf6
This adds a v2 API endpoint allowing to retrieve the state of several
scopes. It supports pagination and various filter.
Depends-On: https://review.opendev.org/#/c/658072
Change-Id: I3cb7f0554f7794eaaf2e7c35db6c36254bff96db
Story: 2005395
Task: 30789
Add a Fetcher documentation section in admin/configuration/
with details about configuration of all currently available fetchers.
This patch covers options of the new Prometheus fetcher too.
Change-Id: Id1dae663aeddbd0564ea798654ce339ef4a3c9f9
Story: 2005427
Task: 30460
This adds a base resource for all v2 API endpoints. For now, this
base resource returns a 403 Forbidden HTTP error in case a user
tries to execute a forbidden action, but it may be extended in the
future.
Change-Id: I7814c0432e8da591b1f971091619a257c4184191
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 updates various parts of the devstack plugin:
* The fetcher is now configurable via the "CLOUDKITTY_FETCHER" variable and
defaults to gnocchi (this allows the user to have immediate results).
* The "CLOUDKITTY_SERVICES" variable was removed as it is not used anymore.
* The storage backend does now default to "influxdb". If this storage backend is
selected, influxdb is installed. This can be done on fedora and ubuntu. The
storage backend to use in devstack can be configured through the
``CLOUDKITTY_STORAGE_BACKEND`` and ``CLOUDKITTY_STORAGE_VERSION`` variables.
* Some details about available variables have been added to the devstack
documentation. Since the "admin/quick_deployment" section did only contain
the devstack documentation, it has been removed for now.
* Given that the "ceilometer-low" archive-policy (default in devstack) only
provides the "mean" aggregation method, it is now the aggregation method
used in the default metrics.yml file.
Change-Id: I37452772de163b5fafc502917af870c86a3d38b2
This updates the following parts of the hashmap module documentation:
* A few typos have been fixed and some weird sentences have been rephrased.
* Some config examples have been added.
* Obsolete information has been removed.
* Details about how hashmap services should be called have been added.
Change-Id: I66df3e180851e08e8c6acb1907028883b547d963
Story: 2004179
Task: 28719
Rating module introduction has been moved to respective index.
Some rewriting has been made in order to achieve a clearer and
more concise user documentation.
Change-Id: Ied923a0e6eb5259a5910e104a46a64c16ecbfdd3
This adds some documentation about collectors and metric collection.
Work items:
* Detail common and collector-specific options in cloudkitty.conf
* Detail common and collector-specific options in metrics.yml
* Explain how data is collected
Change-Id: I9fa330524160d8bc4ab33047c360ce8120ee3a3d
Story: 2004179
Task: 29064
This adds an entry about collectors to the developer documentation.
Some information about collectors has been moved from the admin to the
developer documentation.
Change-Id: I2423761b9f7a672fe837d5d5954473301d936ba3
Story: 2004179
Task: 28514
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 is part of a global effort to clean up CloudKitty's
unmaintained codebase.
This storage backend was only present for development purposes,
and not production ready. A second v2 backend will be implemented
in the future, with support for HA/clustering.
Change-Id: Iab9d152d2851ca385e607d338c0a09b74ba7e3b3
Story: 2004400
Task: 28568
This adds a global introduction to the documentation, explaining what
CloudKitty is and does.
Change-Id: I4aa65d63970e4a031bf662f42e2fffedf1627f41
Story: 2004179
Task: 28153
Since InfluxDB v2 storage backend has been merged, the warning
when using a v2 storage backend has been changed.
Change-Id: Ie636decdcf2ab6b12196b15eced9985d8a02aa50