@@ -42,17 +42,17 @@ Version
4242-------
4343
4444Two versions of the client exist: v1 and v2. The v2 version adds support for
45- v2 API endpoints. The default API version is 1 . You can specify which API
45+ v2 API endpoints. The default API version is 2 . You can specify which API
4646version you want to use via a CLI option:
4747
4848.. code-block :: shell
4949
5050 # EITHER
51- cloudkitty --os-rating-api-version 2 summary get
51+ cloudkitty --os-rating-api-version 1 module list
5252
5353 # OR
54- export OS_RATING_API_VERSION=2
55- cloudkitty summary get
54+ export OS_RATING_API_VERSION=1
55+ cloudkitty module list
5656
5757 Again, the option can also be provided to the OSC plugin, both via the CLI
5858flag or the environment variable.
@@ -68,7 +68,7 @@ to use it without keystone authentication, cloudkittyclient provides the
6868 >>> from cloudkittyclient import auth as ck_auth
6969
7070 >>> auth = ck_auth.CloudKittyNoAuthPlugin(endpoint='http://127.0.0.1:8889')
71- >>> client = ck_client.Client('1 ', auth=auth)
71+ >>> client = ck_client.Client('2 ', auth=auth)
7272 >>> client.report.get_summary()
7373 {u'summary': [{u'begin': u'2018-03-01T00:00:00',
7474 u'end': u'2018-04-01T00:00:00',
@@ -95,7 +95,7 @@ Else, use it the same way as any other OpenStack client::
9595
9696 >>> ck_session = session.Session(auth=auth)
9797
98- >>> c = ck_client.Client('1 ', session=ck_session)
98+ >>> c = ck_client.Client('2 ', session=ck_session)
9999
100100 >>> c.report.get_summary()
101101 {u'summary': [{u'begin': u'2018-03-01T00:00:00',
@@ -112,25 +112,25 @@ Else, use it the same way as any other OpenStack client::
112112 and ``cacert ``::
113113
114114 >>> client = ck_client.Client(
115- '1 ', auth=auth, insecure=False, cacert='/path/to/ca')
115+ '2 ', auth=auth, insecure=False, cacert='/path/to/ca')
116116
117117
118- If you want to use the v2 API, you have to specify it at client instanciation
118+ If you want to use the v1 API, you have to specify it at client instanciation
119119
120120.. code-block :: python
121121
122- c = ck_client.Client(' 2 ' , session = session)
122+ c = ck_client.Client(' 1 ' , session = session)
123123
124124 When using the ``cloudkitty `` CLI client with keystone authentication, the
125125auth plugin to use should automagically be detected. If not, you can specify
126126the auth plugin to use with ``--os-auth-type/--os-auth-plugin ``::
127127
128128 $ cloudkitty --debug --os-auth-type cloudkitty-noauth summary get
129- +------------+ ---------------+------------+ ---------------------+-- -------------------+
130- | Project ID | Resource Type | Rate | Begin Time | End Time |
131- +------------+ ---------------+------------+ ---------------------+-- -------------------+
132- | ALL | ALL | 1676.95499 | 2018-03 -01T00:00:00 | 2018-04 -01T00:00:00 |
133- +------------+ ---------------+------------+ ---------------------+-- -------------------+
129+ +---------------------------+---------------------------+ ------------+ -------------------+
130+ | Begin | End | Qty | Rate |
131+ +---------------------------+---------------------------+ ------------+ -------------------+
132+ | 2025-12 -01T00:00:00+01:00 | 2026-01 -01T00:00:00+01:00 | 21662194.0 | 3618130.211340219 |
133+ +---------------------------+---------------------------+ ------------+ -------------------+
134134
135135
136136CSV report generation
0 commit comments