python-swiftclient
Advanced tools
| --- | ||
| features: | ||
| - | | ||
| Now tested under Python 3.14. | ||
| upgrade: | ||
| - | | ||
| Removed support for the provider-specific SERVICENET. Explicitly override | ||
| your storage URLs if you were previously using this feature. | ||
| fixes: | ||
| - | | ||
| The "v1password" plugin for keystoneauth now returns v3-compatible service | ||
| catalogs, fixing some issues seen when using v1 auth with openstackclient. | ||
| - | | ||
| Various other minor improvements. |
| # Copyright (c) 2025 NVIDIA | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
| # implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| import os | ||
| import subprocess | ||
| import unittest | ||
| from . import TEST_CONFIG | ||
| class TestOpenStackClient(unittest.TestCase): | ||
| @classmethod | ||
| def setUpClass(cls): | ||
| # NB: Only runs for v1 auth, to exercise our keystoneauth plugin | ||
| cls.skip_tests = (TEST_CONFIG is None or | ||
| TEST_CONFIG['auth_version'] != '1') | ||
| cls.env = { | ||
| 'OS_AUTH_TYPE': 'v1password', | ||
| 'OS_AUTH_URL': TEST_CONFIG['auth_url'] or '', | ||
| 'OS_USERNAME': TEST_CONFIG['account_username'] or '', | ||
| 'OS_PASSWORD': TEST_CONFIG['password'] or '', | ||
| 'OS_CACERT': TEST_CONFIG['cacert'] or '', | ||
| } | ||
| if 'PATH' in os.environ: | ||
| cls.env['PATH'] = os.environ['PATH'] | ||
| def setUp(self): | ||
| if self.skip_tests: | ||
| raise unittest.SkipTest('SKIPPING V1-AUTH TESTS') | ||
| def _run(self, *args): | ||
| subprocess.run(args, env=self.env, check=True) | ||
| def test_token_issue(self): | ||
| self._run('openstack', 'token', 'issue') | ||
| def test_catalog_list(self): | ||
| self._run('openstack', 'catalog', 'list') | ||
| def test_catalog_show(self): | ||
| self._run('openstack', 'catalog', 'show', 'swift') | ||
| self._run('openstack', 'catalog', 'show', 'object-store') | ||
| self._run('openstack', 'catalog', 'show', 'auth') | ||
| def test_account_show(self): | ||
| self._run('openstack', 'object', 'store', 'account', 'show') | ||
| # If account show works and the openstacksdk tests work, presumably | ||
| # container/object commands work, too | ||
| # service list? endpoint list? |
+4
-2
@@ -59,3 +59,4 @@ - job: | ||
| irrelevant-files: *functest-irrelevant-files | ||
| - openstack-tox-py313: | ||
| - openstack-tox-py313 | ||
| - openstack-tox-py314: | ||
| voting: true | ||
@@ -66,3 +67,4 @@ gate: | ||
| - swiftclient-functional | ||
| - openstack-tox-py313: | ||
| - openstack-tox-py313 | ||
| - openstack-tox-py314: | ||
| voting: true | ||
@@ -69,0 +71,0 @@ post: |
+2
-0
@@ -13,2 +13,3 @@ Aarni Koskela (akx@iki.fi) | ||
| Anne Gentle (anne@openstack.org) | ||
| Anthony Roussel (anthony@roussel.dev) | ||
| Ben McCann (ben@benmccann.com) | ||
@@ -63,2 +64,3 @@ Cedric Brandily (zzelle@gmail.com) | ||
| Ian Cordasco (ian.cordasco@rackspace.com) | ||
| Ivan Anfimov (lazekteam@gmail.com) | ||
| Ivan Kolodyazhny (e0ne@e0ne.info) | ||
@@ -65,0 +67,0 @@ jacky06 (zhang.min@99cloud.net) |
@@ -23,3 +23,3 @@ ==== | ||
| Usage: swift [--version] [--help] [--os-help] [--snet] [--verbose] | ||
| Usage: swift [--version] [--help] [--os-help] [--verbose] | ||
| [--debug] [--info] [--quiet] [--auth <auth_url>] | ||
@@ -99,5 +99,2 @@ [--auth-version <auth_version> | | ||
| ``-s, --snet`` | ||
| Use SERVICENET internal network. | ||
| ``-v, --verbose`` | ||
@@ -104,0 +101,0 @@ Print more info. |
+16
-2
@@ -1,4 +0,4 @@ | ||
| Metadata-Version: 2.1 | ||
| Metadata-Version: 2.4 | ||
| Name: python-swiftclient | ||
| Version: 4.9.0 | ||
| Version: 4.10.0 | ||
| Summary: OpenStack Object Storage API Client Library | ||
@@ -28,2 +28,3 @@ Home-page: https://docs.openstack.org/python-swiftclient/latest/ | ||
| Classifier: Programming Language :: Python :: 3.13 | ||
| Classifier: Programming Language :: Python :: 3.14 | ||
| Classifier: Programming Language :: Python :: 3 :: Only | ||
@@ -44,2 +45,15 @@ Requires-Python: >=3.7 | ||
| Requires-Dist: openstacksdk>=0.11.0; extra == "test" | ||
| Requires-Dist: python-openstackclient>=3.12.0; extra == "test" | ||
| Dynamic: author | ||
| Dynamic: author-email | ||
| Dynamic: classifier | ||
| Dynamic: description | ||
| Dynamic: home-page | ||
| Dynamic: license | ||
| Dynamic: license-file | ||
| Dynamic: project-url | ||
| Dynamic: provides-extra | ||
| Dynamic: requires-dist | ||
| Dynamic: requires-python | ||
| Dynamic: summary | ||
@@ -46,0 +60,0 @@ Python bindings to the OpenStack Object Storage API |
@@ -1,1 +0,1 @@ | ||
| {"git_version": "d520b2b", "is_release": true} | ||
| {"git_version": "70e1109", "is_release": true} |
@@ -1,4 +0,4 @@ | ||
| Metadata-Version: 2.1 | ||
| Metadata-Version: 2.4 | ||
| Name: python-swiftclient | ||
| Version: 4.9.0 | ||
| Version: 4.10.0 | ||
| Summary: OpenStack Object Storage API Client Library | ||
@@ -28,2 +28,3 @@ Home-page: https://docs.openstack.org/python-swiftclient/latest/ | ||
| Classifier: Programming Language :: Python :: 3.13 | ||
| Classifier: Programming Language :: Python :: 3.14 | ||
| Classifier: Programming Language :: Python :: 3 :: Only | ||
@@ -44,2 +45,15 @@ Requires-Python: >=3.7 | ||
| Requires-Dist: openstacksdk>=0.11.0; extra == "test" | ||
| Requires-Dist: python-openstackclient>=3.12.0; extra == "test" | ||
| Dynamic: author | ||
| Dynamic: author-email | ||
| Dynamic: classifier | ||
| Dynamic: description | ||
| Dynamic: home-page | ||
| Dynamic: license | ||
| Dynamic: license-file | ||
| Dynamic: project-url | ||
| Dynamic: provides-extra | ||
| Dynamic: requires-dist | ||
| Dynamic: requires-python | ||
| Dynamic: summary | ||
@@ -46,0 +60,0 @@ Python bindings to the OpenStack Object Storage API |
@@ -13,1 +13,2 @@ requests>=2.4.0 | ||
| openstacksdk>=0.11.0 | ||
| python-openstackclient>=3.12.0 |
@@ -60,2 +60,3 @@ .coveragerc | ||
| releasenotes/notes/3_9_0_release-3c293d277f14ec22.yaml | ||
| releasenotes/notes/4_10_0_release-8370f0dcdb8a0e11.yaml | ||
| releasenotes/notes/4_3_0_release.yaml | ||
@@ -103,2 +104,3 @@ releasenotes/notes/4_4_0_release-d731bab5982c160b.yaml | ||
| test/functional/__init__.py | ||
| test/functional/test_openstackclient.py | ||
| test/functional/test_openstacksdk.py | ||
@@ -105,0 +107,0 @@ test/functional/test_swiftclient.py |
+1
-0
@@ -33,2 +33,3 @@ [metadata] | ||
| Programming Language :: Python :: 3.13 | ||
| Programming Language :: Python :: 3.14 | ||
| Programming Language :: Python :: 3 :: Only | ||
@@ -35,0 +36,0 @@ |
@@ -73,9 +73,11 @@ # Copyright 2016 OpenStack Foundation | ||
| endpoints = [{ | ||
| 'interface': 'public', | ||
| 'region': 'default', | ||
| 'publicURL': self._storage_url, | ||
| 'url': self._storage_url, | ||
| }] | ||
| if self.storage_url != self._storage_url: | ||
| endpoints.insert(0, { | ||
| 'interface': 'public', | ||
| 'region': 'override', | ||
| 'publicURL': self.storage_url, | ||
| 'url': self.storage_url, | ||
| }) | ||
@@ -93,4 +95,5 @@ | ||
| 'endpoints': [{ | ||
| 'interface': 'public', | ||
| 'region': 'default', | ||
| 'publicURL': self.auth_url, | ||
| 'url': self.auth_url, | ||
| }], | ||
@@ -156,2 +159,4 @@ } | ||
| self.project_id = None | ||
| self.domain_id = 'default' | ||
| self.system_scoped = False | ||
@@ -158,0 +163,0 @@ @property |
@@ -8,1 +8,2 @@ hacking>=3.2.0,<6.2.0 # Apache-2.0 | ||
| openstacksdk>=0.11.0 # Apache-2.0 | ||
| python-openstackclient>=3.12.0 # Apache-2.0 |
+2
-4
| [func_test] | ||
| # sample config | ||
| auth_uri = http://127.0.0.1:8080/auth/v1.0/ | ||
| ## sample config for Swift with Keystone v2 API | ||
| # For keystone v3 change auth_version to 3 and auth_prefix to /v3/ | ||
| #auth_version = 2 | ||
| #auth_uri = http://localhost:5000/v2.0/ | ||
| # sample config for Swift with Keystone API v3 | ||
| #auth_uri = http://localhost:5000/v3/ | ||
@@ -9,0 +7,0 @@ # You may want to run tests against endpoints that use development certs |
@@ -166,3 +166,3 @@ # Copyright 2016 OpenStack Foundation | ||
| self.assertIn(self.storage_url, [ | ||
| e.get('publicURL') for e in catalog[0]['endpoints']]) | ||
| e.get('url') for e in catalog[0]['endpoints']]) | ||
@@ -169,0 +169,0 @@ def test_get_access_with_expiry(self): |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
1130173
0.27%116
1.75%20564
0.19%