python-cloudkittyclient 5.4.0__tar.gz → 6.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/.zuul.yaml +2 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/AUTHORS +3 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/ChangeLog +18 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/PKG-INFO +15 -6
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/osc.py +1 -1
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/shell.py +3 -3
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v1/test_hashmap.py +49 -2
- python_cloudkittyclient-6.1.0/cloudkittyclient/tests/functional/v1/test_pyscripts.py +104 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/test_hashmap.py +8 -1
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/test_pyscripts.py +2 -1
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/rating/hashmap.py +20 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/rating/hashmap_cli.py +14 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/rating/pyscripts.py +17 -2
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/rating/pyscripts_cli.py +11 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/conf.py +2 -3
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/usage.rst +14 -14
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/python_cloudkittyclient.egg-info/PKG-INFO +15 -6
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/python_cloudkittyclient.egg-info/SOURCES.txt +3 -0
- python_cloudkittyclient-6.1.0/python_cloudkittyclient.egg-info/pbr.json +1 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/python_cloudkittyclient.egg-info/requires.txt +1 -1
- python_cloudkittyclient-6.1.0/releasenotes/notes/change-default-api-version-to-v2-6d4bb5bfa234ed13.yaml +8 -0
- python_cloudkittyclient-6.1.0/releasenotes/notes/remove-py39-8c71acfb47b84070.yaml +5 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/2024.1.rst +1 -1
- python_cloudkittyclient-6.1.0/releasenotes/source/2025.2.rst +6 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/index.rst +1 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/requirements.txt +1 -1
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/setup.cfg +3 -3
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/tox.ini +0 -5
- python_cloudkittyclient-5.4.0/cloudkittyclient/tests/functional/v1/test_pyscripts.py +0 -61
- python_cloudkittyclient-5.4.0/python_cloudkittyclient.egg-info/pbr.json +0 -1
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/.coveragerc +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/.stestr.conf +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/CONTRIBUTING.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/HACKING.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/LICENSE +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/README.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/auth.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/client.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/common/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/common/base.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/common/client.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/exc.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/format.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/base.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v1/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v1/test_collector.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v1/test_info.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v1/test_rating.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v1/test_report.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v1/test_storage.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v2/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v2/test_dataframes.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v2/test_scope.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/functional/v2/test_summary.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/base.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/test_collector.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/test_info.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/test_rating.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/test_report.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/test_report_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v1/test_storage.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v2/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v2/base.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v2/test_dataframes.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v2/test_rating.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v2/test_scope.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/unit/v2/test_summary.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/tests/utils.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/utils.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/client.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/collector.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/collector_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/info.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/info_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/rating/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/report.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/report_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/storage.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v1/storage_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/client.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/dataframes.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/dataframes_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/rating/__init__.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/rating/modules.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/rating/modules_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/reprocessing.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/reprocessing_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/scope.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/scope_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/summary.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/cloudkittyclient/v2/summary_cli.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/requirements.txt +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/index.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v1/collector.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v1/index.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v1/info.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v1/rating.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v1/report.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v1/storage.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v2/dataframes.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v2/index.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v2/scope.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/api_reference/v2/summary.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/cli_reference.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/contributor/contributing.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/index.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/doc/source/install.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/etc/cloudkitty/csv_config.yml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/etc/cloudkitty/legacy_csv_config.yml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/playbooks/cloudkittyclient-devstack-functional/post.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/playbooks/cloudkittyclient-devstack-functional/pre.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/playbooks/cloudkittyclient-devstack-functional/run.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/python_cloudkittyclient.egg-info/dependency_links.txt +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/python_cloudkittyclient.egg-info/entry_points.txt +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/python_cloudkittyclient.egg-info/not-zip-safe +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/python_cloudkittyclient.egg-info/top_level.txt +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/.placeholder +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/adapt-client-to-v2-api-c870d5ca49af6341.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/add-patch-scope-support-04c408f982d7d352.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/add-reprocess-api-support-dafc30d0d08a34fd.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/add-support-v2-dataframes-baa398fe5ea1b891.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/add-support-v2-dataframes-be3a17271f3c7188.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/add-support-v2-summary-7c1ff903f21f057b.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/drop-py27-27ea9fb3e40d4987.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/fix-create_threshold-method-validation-f193e883e82214c9.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/fix-get-quotation-1d2c18a979f85fe6.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/fix-reprocessing-post-request-95512686754ee271.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/fix-zero-cost-mapping-7a4247cf1c6815f8.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/notes/rewrite-client-5e99a6d3c7302630.yaml +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/2023.1.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/2023.2.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/2024.2.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/2025.1.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/_static/.placeholder +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/_templates/.placeholder +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/conf.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/queens.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/rocky.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/stein.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/train.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/unreleased.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/ussuri.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/victoria.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/wallaby.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/xena.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/yoga.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/releasenotes/source/zed.rst +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/setup.py +0 -0
- {python_cloudkittyclient-5.4.0 → python_cloudkittyclient-6.1.0}/test-requirements.txt +0 -0
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
run: playbooks/cloudkittyclient-devstack-functional/run.yaml
|
|
8
8
|
post-run: playbooks/cloudkittyclient-devstack-functional/post.yaml
|
|
9
9
|
required-projects:
|
|
10
|
+
- name: openstack/ceilometer
|
|
10
11
|
- name: openstack/cloudkitty
|
|
11
12
|
- name: openstack/python-cloudkittyclient
|
|
12
13
|
roles:
|
|
@@ -18,6 +19,7 @@
|
|
|
18
19
|
- ^releasenotes/.*$
|
|
19
20
|
vars:
|
|
20
21
|
devstack_plugins:
|
|
22
|
+
ceilometer: https://opendev.org/openstack/ceilometer
|
|
21
23
|
cloudkitty: https://opendev.org/openstack/cloudkitty
|
|
22
24
|
devstack_localrc:
|
|
23
25
|
CLOUDKITTY_FETCHER: keystone
|
|
@@ -16,8 +16,10 @@ Gauvain Pocentek <gauvain.pocentek@objectif-libre.com>
|
|
|
16
16
|
Ghanshyam Mann <gmann@ghanshyammann.com>
|
|
17
17
|
Guillaume Espanel <guillaume.espanel@objectif-libre.com>
|
|
18
18
|
HaiJieZhang <zhanghj@gohighsec.com>
|
|
19
|
+
Jaromir Wysoglad <jwysogla@redhat.com>
|
|
19
20
|
Jeremy Liu <liujiong@gohighsec.com>
|
|
20
21
|
Jeremy Stanley <fungi@yuggoth.org>
|
|
22
|
+
Juan Larriba <jlarriba@redhat.com>
|
|
21
23
|
Justin Ferrieu <jferrieu@objectif-libre.com>
|
|
22
24
|
Kiran_totad <kiran.totad@nectechnologies.in>
|
|
23
25
|
Luka Peschke <luka.peschke@epitech.eu>
|
|
@@ -27,6 +29,7 @@ Matthias Bastian <bastian@strato.de>
|
|
|
27
29
|
Maxime Cottret <maxime.cottret@objectif-libre.com>
|
|
28
30
|
Monty Taylor <mordred@inaugust.com>
|
|
29
31
|
OpenStack Release Bot <infra-root@openstack.org>
|
|
32
|
+
Pedro Henrique <phpm13@gmail.com>
|
|
30
33
|
Pierre Riteau <pierre@stackhpc.com>
|
|
31
34
|
Pierre-Alexandre Bardina <pa.bardina@objectif-libre.com>
|
|
32
35
|
Quentin Anglade <quentin.anglade@objectif-libre.com>
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
6.1.0
|
|
5
|
+
-----
|
|
6
|
+
|
|
7
|
+
* [tox] remove DEVSTACK\_VENV variable
|
|
8
|
+
* Declare Python 3.13 support
|
|
9
|
+
|
|
10
|
+
6.0.0
|
|
11
|
+
-----
|
|
12
|
+
|
|
13
|
+
* Use v2 API by default
|
|
14
|
+
* Fix docs job
|
|
15
|
+
* reno: Update master for unmaintained/2024.1
|
|
16
|
+
* Update supported python versions
|
|
17
|
+
* Update master for stable/2025.2
|
|
18
|
+
* Add support to rating rules with start and end
|
|
19
|
+
* Replace os-client-config
|
|
20
|
+
|
|
4
21
|
5.4.0
|
|
5
22
|
-----
|
|
6
23
|
|
|
@@ -12,6 +29,7 @@ CHANGES
|
|
|
12
29
|
-----
|
|
13
30
|
|
|
14
31
|
* tox: Drop envdir
|
|
32
|
+
* CI: enable ceilometer plugin
|
|
15
33
|
* reno: Update master for unmaintained/2023.1
|
|
16
34
|
|
|
17
35
|
5.3.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-cloudkittyclient
|
|
3
|
-
Version:
|
|
3
|
+
Version: 6.1.0
|
|
4
4
|
Summary: API client of cloudkitty, Rating as a Service project.
|
|
5
5
|
Home-page: https://docs.openstack.org/python-cloudkittyclient/latest/
|
|
6
6
|
Author: OpenStack
|
|
@@ -14,11 +14,11 @@ Classifier: Programming Language :: Python
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
15
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
-
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: pbr>=5.5.1
|
|
24
24
|
Requires-Dist: cliff>=3.5.0
|
|
@@ -27,8 +27,17 @@ Requires-Dist: oslo.utils>=4.7.0
|
|
|
27
27
|
Requires-Dist: oslo.log>=4.4.0
|
|
28
28
|
Requires-Dist: PyYAML>=5.3.1
|
|
29
29
|
Requires-Dist: jsonpath-rw-ext>=1.2.0
|
|
30
|
-
Requires-Dist:
|
|
30
|
+
Requires-Dist: openstacksdk>=0.10.0
|
|
31
31
|
Requires-Dist: osc-lib>=2.3.0
|
|
32
|
+
Dynamic: author
|
|
33
|
+
Dynamic: author-email
|
|
34
|
+
Dynamic: classifier
|
|
35
|
+
Dynamic: description
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
Dynamic: requires-dist
|
|
39
|
+
Dynamic: requires-python
|
|
40
|
+
Dynamic: summary
|
|
32
41
|
|
|
33
42
|
================
|
|
34
43
|
CloudKittyClient
|
|
@@ -18,7 +18,7 @@ from sys import argv
|
|
|
18
18
|
|
|
19
19
|
import cliff.app
|
|
20
20
|
from cliff.commandmanager import CommandManager
|
|
21
|
-
import
|
|
21
|
+
from openstack import config as occ
|
|
22
22
|
from oslo_log import log
|
|
23
23
|
|
|
24
24
|
from cloudkittyclient import client
|
|
@@ -90,7 +90,7 @@ class CloudKittyShell(cliff.app.App):
|
|
|
90
90
|
|
|
91
91
|
def __init__(self, args):
|
|
92
92
|
self._args = args
|
|
93
|
-
self.cloud_config =
|
|
93
|
+
self.cloud_config = occ.OpenStackConfig()
|
|
94
94
|
super(CloudKittyShell, self).__init__(
|
|
95
95
|
description='CloudKitty CLI client',
|
|
96
96
|
version=utils.get_version(),
|
|
@@ -128,7 +128,7 @@ class CloudKittyShell(cliff.app.App):
|
|
|
128
128
|
@property
|
|
129
129
|
def client(self):
|
|
130
130
|
if self._client is None:
|
|
131
|
-
self.cloud = self.cloud_config.
|
|
131
|
+
self.cloud = self.cloud_config.get_one(
|
|
132
132
|
argparse=self.options)
|
|
133
133
|
session = self.cloud.get_session()
|
|
134
134
|
adapter_options = dict(
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
# License for the specific language governing permissions and limitations
|
|
14
14
|
# under the License.
|
|
15
15
|
#
|
|
16
|
+
from datetime import datetime
|
|
17
|
+
from datetime import timedelta
|
|
18
|
+
|
|
16
19
|
from cloudkittyclient.tests.functional import base
|
|
17
20
|
|
|
18
21
|
|
|
@@ -136,13 +139,15 @@ class CkHashmapTest(base.BaseFunctionalTest):
|
|
|
136
139
|
self.assertEqual(len(resp), 0)
|
|
137
140
|
|
|
138
141
|
def test_create_get_update_delete_mapping_service(self):
|
|
142
|
+
future_date = datetime.now() + timedelta(days=1)
|
|
143
|
+
date_iso = future_date.isoformat()
|
|
139
144
|
resp = self.runner('hashmap service create', params='testservice')[0]
|
|
140
145
|
service_id = resp['Service ID']
|
|
141
146
|
self._services.append(service_id)
|
|
142
147
|
|
|
143
148
|
# Create mapping
|
|
144
149
|
resp = self.runner('hashmap mapping create',
|
|
145
|
-
params='-s {} 12'
|
|
150
|
+
params=f'-s {service_id} 12 --start {date_iso}')[0]
|
|
146
151
|
mapping_id = resp['Mapping ID']
|
|
147
152
|
self._mappings.append(mapping_id)
|
|
148
153
|
self.assertEqual(resp['Service ID'], service_id)
|
|
@@ -173,6 +178,8 @@ class CkHashmapTest(base.BaseFunctionalTest):
|
|
|
173
178
|
'hashmap service delete', params=service_id, has_output=False)
|
|
174
179
|
|
|
175
180
|
def test_create_get_update_delete_mapping_field(self):
|
|
181
|
+
future_date = datetime.now() + timedelta(days=1)
|
|
182
|
+
date_iso = future_date.isoformat()
|
|
176
183
|
resp = self.runner('hashmap service create', params='testservice')[0]
|
|
177
184
|
service_id = resp['Service ID']
|
|
178
185
|
self._services.append(service_id)
|
|
@@ -185,7 +192,8 @@ class CkHashmapTest(base.BaseFunctionalTest):
|
|
|
185
192
|
# Create mapping
|
|
186
193
|
resp = self.runner(
|
|
187
194
|
'hashmap mapping create',
|
|
188
|
-
params='--field-id {} 12 --value
|
|
195
|
+
params=f'--field-id {field_id} 12 --value '
|
|
196
|
+
f'testvalue --start {date_iso}')[0]
|
|
189
197
|
mapping_id = resp['Mapping ID']
|
|
190
198
|
self._mappings.append(service_id)
|
|
191
199
|
self.assertEqual(resp['Field ID'], field_id)
|
|
@@ -203,6 +211,45 @@ class CkHashmapTest(base.BaseFunctionalTest):
|
|
|
203
211
|
params='--cost 10 {}'.format(mapping_id))[0]
|
|
204
212
|
self.assertEqual(float(resp['Cost']), float(10))
|
|
205
213
|
|
|
214
|
+
def test_create_get_update_delete_mapping_field_started(self):
|
|
215
|
+
resp = self.runner('hashmap service create',
|
|
216
|
+
params='testservice_date_started')[0]
|
|
217
|
+
service_id = resp['Service ID']
|
|
218
|
+
self._services.append(service_id)
|
|
219
|
+
|
|
220
|
+
resp = self.runner(
|
|
221
|
+
'hashmap field create',
|
|
222
|
+
params='{} testfield_date_started'.format(service_id))[0]
|
|
223
|
+
field_id = resp['Field ID']
|
|
224
|
+
self._fields.append(field_id)
|
|
225
|
+
|
|
226
|
+
# Create mapping
|
|
227
|
+
resp = self.runner(
|
|
228
|
+
'hashmap mapping create',
|
|
229
|
+
params=f'--field-id {field_id} 12 --value '
|
|
230
|
+
f'testvalue')[0]
|
|
231
|
+
mapping_id = resp['Mapping ID']
|
|
232
|
+
self._mappings.append(service_id)
|
|
233
|
+
self.assertEqual(resp['Field ID'], field_id)
|
|
234
|
+
self.assertEqual(float(resp['Cost']), float(12))
|
|
235
|
+
self.assertEqual(resp['Value'], 'testvalue')
|
|
236
|
+
|
|
237
|
+
# Get mapping
|
|
238
|
+
resp = self.runner(
|
|
239
|
+
'hashmap mapping get', params=mapping_id)[0]
|
|
240
|
+
self.assertEqual(resp['Mapping ID'], mapping_id)
|
|
241
|
+
self.assertEqual(float(resp['Cost']), float(12))
|
|
242
|
+
|
|
243
|
+
# Should not be able to update a rule that is running (start < now)
|
|
244
|
+
try:
|
|
245
|
+
self.runner('hashmap mapping update',
|
|
246
|
+
params='--cost 10 {}'.format(mapping_id))[0]
|
|
247
|
+
except RuntimeError as e:
|
|
248
|
+
expected_error = ("You are allowed to update only the attribute "
|
|
249
|
+
"[end] as this rule is already running as it "
|
|
250
|
+
"started on ")
|
|
251
|
+
self.assertIn(expected_error, str(e))
|
|
252
|
+
|
|
206
253
|
def test_group_mappings_get(self):
|
|
207
254
|
# Service and group
|
|
208
255
|
resp = self.runner('hashmap service create', params='testservice')[0]
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Copyright 2018 Objectif Libre
|
|
3
|
+
#
|
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
5
|
+
# not use this file except in compliance with the License. You may obtain
|
|
6
|
+
# a copy of the License at
|
|
7
|
+
#
|
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
#
|
|
10
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
12
|
+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
13
|
+
# License for the specific language governing permissions and limitations
|
|
14
|
+
# under the License.
|
|
15
|
+
#
|
|
16
|
+
from datetime import datetime
|
|
17
|
+
from datetime import timedelta
|
|
18
|
+
|
|
19
|
+
from cloudkittyclient.tests.functional import base
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class CkPyscriptTest(base.BaseFunctionalTest):
|
|
23
|
+
|
|
24
|
+
def __init__(self, *args, **kwargs):
|
|
25
|
+
super(CkPyscriptTest, self).__init__(*args, **kwargs)
|
|
26
|
+
self.runner = self.cloudkitty
|
|
27
|
+
|
|
28
|
+
def test_create_get_update_list_delete(self):
|
|
29
|
+
future_date = datetime.now() + timedelta(days=1)
|
|
30
|
+
date_iso = future_date.isoformat()
|
|
31
|
+
# Create
|
|
32
|
+
resp = self.runner(
|
|
33
|
+
'pyscript create', params=f"testscript "
|
|
34
|
+
f"'return 0' --start {date_iso}")[0]
|
|
35
|
+
script_id = resp['Script ID']
|
|
36
|
+
self.assertEqual(resp['Name'], 'testscript')
|
|
37
|
+
|
|
38
|
+
# Get
|
|
39
|
+
resp = self.runner('pyscript get', params=script_id)[0]
|
|
40
|
+
self.assertEqual(resp['Name'], 'testscript')
|
|
41
|
+
self.assertEqual(resp['Script ID'], script_id)
|
|
42
|
+
|
|
43
|
+
# Update
|
|
44
|
+
resp = self.runner(
|
|
45
|
+
'pyscript update',
|
|
46
|
+
params="-d 'return 1' {} --description "
|
|
47
|
+
"desc".format(script_id))[0]
|
|
48
|
+
self.assertEqual(resp['Script Description'], 'desc')
|
|
49
|
+
self.assertEqual(resp['Script ID'], script_id)
|
|
50
|
+
self.assertEqual(resp['Data'], 'return 1')
|
|
51
|
+
|
|
52
|
+
# List
|
|
53
|
+
resp = self.runner('pyscript list')
|
|
54
|
+
self.assertEqual(len(resp), 1)
|
|
55
|
+
resp = resp[0]
|
|
56
|
+
self.assertEqual(resp['Script Description'], 'desc')
|
|
57
|
+
self.assertEqual(resp['Script ID'], script_id)
|
|
58
|
+
self.assertEqual(resp['Data'], 'return 1')
|
|
59
|
+
|
|
60
|
+
# Delete
|
|
61
|
+
self.runner('pyscript delete', params=script_id, has_output=False)
|
|
62
|
+
|
|
63
|
+
def test_create_get_update_list_delete_started(self):
|
|
64
|
+
# Create
|
|
65
|
+
resp = self.runner(
|
|
66
|
+
'pyscript create', params="testscript_started "
|
|
67
|
+
"'return 0'")[0]
|
|
68
|
+
script_id = resp['Script ID']
|
|
69
|
+
self.assertEqual(resp['Name'], 'testscript_started')
|
|
70
|
+
|
|
71
|
+
# Get
|
|
72
|
+
resp = self.runner('pyscript get', params=script_id)[0]
|
|
73
|
+
self.assertEqual(resp['Name'], 'testscript_started')
|
|
74
|
+
self.assertEqual(resp['Script ID'], script_id)
|
|
75
|
+
|
|
76
|
+
# Should not be able to update a rule that is running (start < now)
|
|
77
|
+
try:
|
|
78
|
+
self.runner(
|
|
79
|
+
'pyscript update',
|
|
80
|
+
params="-d 'return 1' {} --description "
|
|
81
|
+
"desc".format(script_id))[0]
|
|
82
|
+
except RuntimeError as e:
|
|
83
|
+
expected_error = ("You are allowed to update only the attribute "
|
|
84
|
+
"[end] as this rule is already running as it "
|
|
85
|
+
"started on ")
|
|
86
|
+
self.assertIn(expected_error, str(e))
|
|
87
|
+
|
|
88
|
+
# List
|
|
89
|
+
resp = self.runner('pyscript list')
|
|
90
|
+
self.assertEqual(len(resp), 1)
|
|
91
|
+
resp = resp[0]
|
|
92
|
+
self.assertEqual(resp['Script Description'], None)
|
|
93
|
+
self.assertEqual(resp['Script ID'], script_id)
|
|
94
|
+
self.assertEqual(resp['Data'], 'return 0')
|
|
95
|
+
|
|
96
|
+
# Delete
|
|
97
|
+
self.runner('pyscript delete', params=script_id, has_output=False)
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class OSCPyscriptTest(CkPyscriptTest):
|
|
101
|
+
|
|
102
|
+
def __init__(self, *args, **kwargs):
|
|
103
|
+
super(CkPyscriptTest, self).__init__(*args, **kwargs)
|
|
104
|
+
self.runner = self.openstack
|
|
@@ -110,7 +110,10 @@ class TestHashmap(base.BaseAPIEndpointTestCase):
|
|
|
110
110
|
self.assertRaises(exc.ArgumentRequired, self.hashmap.get_mapping)
|
|
111
111
|
|
|
112
112
|
def test_create_mapping(self):
|
|
113
|
-
kwargs = dict(cost=2, value='value', field_id='field_id'
|
|
113
|
+
kwargs = dict(cost=2, value='value', field_id='field_id',
|
|
114
|
+
name='name', start="2024-01-01",
|
|
115
|
+
end="2024-01-01",
|
|
116
|
+
description="description")
|
|
114
117
|
body = dict(
|
|
115
118
|
cost=kwargs.get('cost'),
|
|
116
119
|
value=kwargs.get('value'),
|
|
@@ -119,6 +122,10 @@ class TestHashmap(base.BaseAPIEndpointTestCase):
|
|
|
119
122
|
group_id=kwargs.get('group_id'),
|
|
120
123
|
tenant_id=kwargs.get('tenant_id'),
|
|
121
124
|
type=kwargs.get('type') or 'flat',
|
|
125
|
+
start="2024-01-01",
|
|
126
|
+
end="2024-01-01",
|
|
127
|
+
description="description",
|
|
128
|
+
name='name'
|
|
122
129
|
)
|
|
123
130
|
self.hashmap.create_mapping(**kwargs)
|
|
124
131
|
self.api_client.post.assert_called_once_with(
|
|
@@ -38,7 +38,8 @@ class TestPyscripts(base.BaseAPIEndpointTestCase):
|
|
|
38
38
|
self.assertRaises(exc.ArgumentRequired, self.pyscripts.get_script)
|
|
39
39
|
|
|
40
40
|
def test_create_script(self):
|
|
41
|
-
kwargs = dict(name='name', data='data'
|
|
41
|
+
kwargs = dict(name='name', data='data', start=None,
|
|
42
|
+
end=None, description=None)
|
|
42
43
|
self.pyscripts.create_script(**kwargs)
|
|
43
44
|
self.api_client.post.assert_called_once_with(
|
|
44
45
|
'/v1/rating/module_config/pyscripts/scripts/', json=kwargs)
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
# License for the specific language governing permissions and limitations
|
|
14
14
|
# under the License.
|
|
15
15
|
#
|
|
16
|
+
import uuid
|
|
17
|
+
|
|
16
18
|
from cloudkittyclient.common import base
|
|
17
19
|
from cloudkittyclient import exc
|
|
18
20
|
|
|
@@ -171,6 +173,14 @@ class HashmapManager(base.BaseManager):
|
|
|
171
173
|
:type type: str
|
|
172
174
|
:param value: Value of the mapping
|
|
173
175
|
:type value: str
|
|
176
|
+
:param name: Name of the mapping
|
|
177
|
+
:type name: str
|
|
178
|
+
:param start: Date the mapping starts being valid
|
|
179
|
+
:type start: str
|
|
180
|
+
:param end: Date the mapping stops being valid
|
|
181
|
+
:type end: str
|
|
182
|
+
:param description: Description of the mapping
|
|
183
|
+
:type description: str
|
|
174
184
|
"""
|
|
175
185
|
if kwargs.get('cost') is None:
|
|
176
186
|
raise exc.ArgumentRequired("'cost' argument is required")
|
|
@@ -196,6 +206,16 @@ class HashmapManager(base.BaseManager):
|
|
|
196
206
|
tenant_id=kwargs.get('tenant_id'),
|
|
197
207
|
type=kwargs.get('type') or 'flat',
|
|
198
208
|
)
|
|
209
|
+
if kwargs.get('description'):
|
|
210
|
+
body['description'] = kwargs.get('description')
|
|
211
|
+
if kwargs.get('start'):
|
|
212
|
+
body['start'] = kwargs.get('start')
|
|
213
|
+
if kwargs.get('end'):
|
|
214
|
+
body['end'] = kwargs.get('end')
|
|
215
|
+
if kwargs.get('name'):
|
|
216
|
+
body['name'] = kwargs.get('name')
|
|
217
|
+
else:
|
|
218
|
+
body['name'] = uuid.uuid4().hex[:24]
|
|
199
219
|
url = self.get_url('mappings', kwargs)
|
|
200
220
|
return self.api_client.post(url, json=body).json()
|
|
201
221
|
|
|
@@ -257,6 +257,10 @@ class CliCreateMapping(lister.Lister):
|
|
|
257
257
|
('service_id', 'Service ID'),
|
|
258
258
|
('group_id', 'Group ID'),
|
|
259
259
|
('tenant_id', 'Project ID'),
|
|
260
|
+
('name', 'Mapping Name'),
|
|
261
|
+
('start', 'Mapping Start Date'),
|
|
262
|
+
('end', 'Mapping End Date'),
|
|
263
|
+
('Description', 'Mapping Description')
|
|
260
264
|
]
|
|
261
265
|
|
|
262
266
|
def take_action(self, parsed_args):
|
|
@@ -275,6 +279,11 @@ class CliCreateMapping(lister.Lister):
|
|
|
275
279
|
parser.add_argument('-t', '--type', type=str, help='Mapping type')
|
|
276
280
|
parser.add_argument('--value', type=str, help='Value')
|
|
277
281
|
parser.add_argument('cost', type=float, help='Cost')
|
|
282
|
+
parser.add_argument('--name', type=str, help='Mapping Name')
|
|
283
|
+
parser.add_argument('--start', type=str, help='Mapping Start')
|
|
284
|
+
parser.add_argument('--end', type=str, help='Mapping End')
|
|
285
|
+
parser.add_argument('--description', type=str,
|
|
286
|
+
help='Mapping Description')
|
|
278
287
|
return parser
|
|
279
288
|
|
|
280
289
|
|
|
@@ -321,6 +330,11 @@ class CliUpdateMapping(lister.Lister):
|
|
|
321
330
|
parser.add_argument('--value', type=str, help='Value')
|
|
322
331
|
parser.add_argument('--cost', type=str, help='Cost')
|
|
323
332
|
parser.add_argument('mapping_id', type=str, help='Mapping ID')
|
|
333
|
+
parser.add_argument('--name', type=str, help='Mapping Name')
|
|
334
|
+
parser.add_argument('--start', type=str, help='Mapping Start')
|
|
335
|
+
parser.add_argument('--end', type=str, help='Mapping End')
|
|
336
|
+
parser.add_argument('--description', type=str,
|
|
337
|
+
help='Mapping Description')
|
|
324
338
|
return parser
|
|
325
339
|
|
|
326
340
|
|
|
@@ -50,13 +50,22 @@ class PyscriptManager(base.BaseManager):
|
|
|
50
50
|
:type name: str
|
|
51
51
|
:param data: Content of the script
|
|
52
52
|
:type data: str
|
|
53
|
+
:param start: Date the script starts being valid
|
|
54
|
+
:type start: str
|
|
55
|
+
:param end: Date the script stops being valid
|
|
56
|
+
:type end: str
|
|
57
|
+
:param description: Description of the script
|
|
58
|
+
:type description: str
|
|
53
59
|
"""
|
|
54
60
|
for arg in ('name', 'data'):
|
|
55
61
|
if not kwargs.get(arg):
|
|
56
62
|
raise exc.ArgumentRequired(
|
|
57
63
|
"'Argument {} is required.'".format(arg))
|
|
58
64
|
url = self.get_url('scripts', kwargs)
|
|
59
|
-
body = dict(name=kwargs['name'], data=kwargs['data']
|
|
65
|
+
body = dict(name=kwargs['name'], data=kwargs['data'],
|
|
66
|
+
start=kwargs.get('start'),
|
|
67
|
+
end=kwargs.get('end'),
|
|
68
|
+
description=kwargs.get('description'))
|
|
60
69
|
return self.api_client.post(url, json=body).json()
|
|
61
70
|
|
|
62
71
|
def update_script(self, **kwargs):
|
|
@@ -68,11 +77,17 @@ class PyscriptManager(base.BaseManager):
|
|
|
68
77
|
:type name: str
|
|
69
78
|
:param data: Content of the script
|
|
70
79
|
:type data: str
|
|
80
|
+
:param start: Date the script starts being valid
|
|
81
|
+
:type start: str
|
|
82
|
+
:param end: Date the script stops being valid
|
|
83
|
+
:type end: str
|
|
84
|
+
:param description: Description of the script
|
|
85
|
+
:type description: str
|
|
71
86
|
"""
|
|
72
87
|
if not kwargs.get('script_id'):
|
|
73
88
|
raise exc.ArgumentRequired("Argument 'script_id' is required.")
|
|
74
89
|
script = self.get_script(script_id=kwargs['script_id'])
|
|
75
|
-
for key in ('name', 'data'):
|
|
90
|
+
for key in ('name', 'data', 'start', 'end', 'description'):
|
|
76
91
|
if kwargs.get(key):
|
|
77
92
|
script[key] = kwargs[key]
|
|
78
93
|
script.pop('checksum', None)
|
|
@@ -26,6 +26,9 @@ class BaseScriptCli(lister.Lister):
|
|
|
26
26
|
('script_id', 'Script ID'),
|
|
27
27
|
('checksum', 'Checksum'),
|
|
28
28
|
('data', 'Data'),
|
|
29
|
+
('start', 'Script Start Date'),
|
|
30
|
+
('end', 'Script End Date'),
|
|
31
|
+
('description', 'Script Description')
|
|
29
32
|
]
|
|
30
33
|
|
|
31
34
|
|
|
@@ -82,6 +85,10 @@ class CliCreateScript(BaseScriptCli):
|
|
|
82
85
|
parser = super(CliCreateScript, self).get_parser(prog_name)
|
|
83
86
|
parser.add_argument('name', type=str, help='Script Name')
|
|
84
87
|
parser.add_argument('data', type=str, help='Script Data or data file')
|
|
88
|
+
parser.add_argument('--start', type=str, help='Script Start')
|
|
89
|
+
parser.add_argument('--end', type=str, help='Script End')
|
|
90
|
+
parser.add_argument('--description', type=str,
|
|
91
|
+
help='Script Description')
|
|
85
92
|
return parser
|
|
86
93
|
|
|
87
94
|
|
|
@@ -107,6 +114,10 @@ class CliUpdateScript(BaseScriptCli):
|
|
|
107
114
|
parser.add_argument('-n', '--name', type=str, help='Script Name')
|
|
108
115
|
parser.add_argument('-d', '--data', type=str,
|
|
109
116
|
help='Script Data or data file')
|
|
117
|
+
parser.add_argument('--start', type=str, help='Script Start')
|
|
118
|
+
parser.add_argument('--end', type=str, help='Script End')
|
|
119
|
+
parser.add_argument('--description', type=str,
|
|
120
|
+
help='Script Description')
|
|
110
121
|
return parser
|
|
111
122
|
|
|
112
123
|
|
|
@@ -48,9 +48,8 @@ project = 'python-cloudkittyclient'
|
|
|
48
48
|
copyright = '2017, OpenStack Foundation'
|
|
49
49
|
|
|
50
50
|
# openstackdocstheme options
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
bug_tag = 'python-cloudkittyclient'
|
|
51
|
+
openstackdocs_repo_name = 'openstack/python-cloudkittyclient'
|
|
52
|
+
openstackdocs_use_storyboard = True
|
|
54
53
|
|
|
55
54
|
# If true, '()' will be appended to :func: etc. cross-reference text.
|
|
56
55
|
add_function_parentheses = True
|
|
@@ -42,17 +42,17 @@ Version
|
|
|
42
42
|
-------
|
|
43
43
|
|
|
44
44
|
Two versions of the client exist: v1 and v2. The v2 version adds support for
|
|
45
|
-
v2 API endpoints. The default API version is
|
|
45
|
+
v2 API endpoints. The default API version is 2. You can specify which API
|
|
46
46
|
version you want to use via a CLI option:
|
|
47
47
|
|
|
48
48
|
.. code-block:: shell
|
|
49
49
|
|
|
50
50
|
# EITHER
|
|
51
|
-
cloudkitty --os-rating-api-version
|
|
51
|
+
cloudkitty --os-rating-api-version 1 module list
|
|
52
52
|
|
|
53
53
|
# OR
|
|
54
|
-
export OS_RATING_API_VERSION=
|
|
55
|
-
cloudkitty
|
|
54
|
+
export OS_RATING_API_VERSION=1
|
|
55
|
+
cloudkitty module list
|
|
56
56
|
|
|
57
57
|
Again, the option can also be provided to the OSC plugin, both via the CLI
|
|
58
58
|
flag or the environment variable.
|
|
@@ -68,7 +68,7 @@ to use it without keystone authentication, cloudkittyclient provides the
|
|
|
68
68
|
>>> from cloudkittyclient import auth as ck_auth
|
|
69
69
|
|
|
70
70
|
>>> auth = ck_auth.CloudKittyNoAuthPlugin(endpoint='http://127.0.0.1:8889')
|
|
71
|
-
>>> client = ck_client.Client('
|
|
71
|
+
>>> client = ck_client.Client('2', auth=auth)
|
|
72
72
|
>>> client.report.get_summary()
|
|
73
73
|
{u'summary': [{u'begin': u'2018-03-01T00:00:00',
|
|
74
74
|
u'end': u'2018-04-01T00:00:00',
|
|
@@ -95,7 +95,7 @@ Else, use it the same way as any other OpenStack client::
|
|
|
95
95
|
|
|
96
96
|
>>> ck_session = session.Session(auth=auth)
|
|
97
97
|
|
|
98
|
-
>>> c = ck_client.Client('
|
|
98
|
+
>>> c = ck_client.Client('2', session=ck_session)
|
|
99
99
|
|
|
100
100
|
>>> c.report.get_summary()
|
|
101
101
|
{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::
|
|
|
112
112
|
and ``cacert``::
|
|
113
113
|
|
|
114
114
|
>>> client = ck_client.Client(
|
|
115
|
-
'
|
|
115
|
+
'2', auth=auth, insecure=False, cacert='/path/to/ca')
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
If you want to use the
|
|
118
|
+
If you want to use the v1 API, you have to specify it at client instanciation
|
|
119
119
|
|
|
120
120
|
.. code-block:: python
|
|
121
121
|
|
|
122
|
-
c = ck_client.Client('
|
|
122
|
+
c = ck_client.Client('1', session=session)
|
|
123
123
|
|
|
124
124
|
When using the ``cloudkitty`` CLI client with keystone authentication, the
|
|
125
125
|
auth plugin to use should automagically be detected. If not, you can specify
|
|
126
126
|
the auth plugin to use with ``--os-auth-type/--os-auth-plugin``::
|
|
127
127
|
|
|
128
128
|
$ cloudkitty --debug --os-auth-type cloudkitty-noauth summary get
|
|
129
|
-
|
|
130
|
-
|
|
|
131
|
-
|
|
132
|
-
|
|
|
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
|
+
+---------------------------+---------------------------+------------+-------------------+
|
|
134
134
|
|
|
135
135
|
|
|
136
136
|
CSV report generation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-cloudkittyclient
|
|
3
|
-
Version:
|
|
3
|
+
Version: 6.1.0
|
|
4
4
|
Summary: API client of cloudkitty, Rating as a Service project.
|
|
5
5
|
Home-page: https://docs.openstack.org/python-cloudkittyclient/latest/
|
|
6
6
|
Author: OpenStack
|
|
@@ -14,11 +14,11 @@ Classifier: Programming Language :: Python
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
15
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
16
16
|
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.10
|
|
20
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
-
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Requires-Python: >=3.10
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
Requires-Dist: pbr>=5.5.1
|
|
24
24
|
Requires-Dist: cliff>=3.5.0
|
|
@@ -27,8 +27,17 @@ Requires-Dist: oslo.utils>=4.7.0
|
|
|
27
27
|
Requires-Dist: oslo.log>=4.4.0
|
|
28
28
|
Requires-Dist: PyYAML>=5.3.1
|
|
29
29
|
Requires-Dist: jsonpath-rw-ext>=1.2.0
|
|
30
|
-
Requires-Dist:
|
|
30
|
+
Requires-Dist: openstacksdk>=0.10.0
|
|
31
31
|
Requires-Dist: osc-lib>=2.3.0
|
|
32
|
+
Dynamic: author
|
|
33
|
+
Dynamic: author-email
|
|
34
|
+
Dynamic: classifier
|
|
35
|
+
Dynamic: description
|
|
36
|
+
Dynamic: home-page
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
Dynamic: requires-dist
|
|
39
|
+
Dynamic: requires-python
|
|
40
|
+
Dynamic: summary
|
|
32
41
|
|
|
33
42
|
================
|
|
34
43
|
CloudKittyClient
|