File: stats.inc

package info (click to toggle)
magnum 21.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,976 kB
  • sloc: python: 33,785; sh: 16,800; makefile: 75
file content (82 lines) | stat: -rw-r--r-- 1,268 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.. -*- rst -*-

=================
 Magnum Stats API
=================

An admin user can get stats for the given tenant and also overall system stats.
A non-admin user can get self stats.

Show stats for a tenant
=======================

.. rest_method:: GET /v1/stats?project_id=<project_id>

Get stats based on project id.

Response Codes
--------------

.. rest_status_code:: success status.yaml

   - 200

.. rest_status_code:: error status.yaml

   - 401
   - 403

Request
-------

.. rest_parameters:: parameters.yaml

  - project_id: project_id

Response
--------

.. rest_parameters:: parameters.yaml

  - clusters: clusters
  - nodes: nodes

Response Example
----------------

.. literalinclude:: samples/stats-get-resp.json
   :language: javascript

Show overall stats
==================

.. rest_method:: GET /v1/stats

Show overall Magnum system stats.
If the requester is non-admin user show self stats.

Response Codes
--------------

.. rest_status_code:: success status.yaml

   - 200

.. rest_status_code:: error status.yaml

   - 401
   - 403

Response
--------

.. rest_parameters:: parameters.yaml

  - clusters: clusters
  - nodes: nodes

Response Example
----------------

.. literalinclude:: samples/stats-get-resp.json
   :language: javascript