Commit graph

4586 commits

Author SHA1 Message Date
Stephen Finucane
841d95b095 common: Remove references to pkg_resources
Even though the comment here attributed this to stevedore, it was in
fact the use of pkg_resources that changed things.

Change-Id: I35377dd7d773024aa6423b72b1412e11b1b6f2e4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-12 10:32:12 +00:00
Stephen Finucane
a7e2f31ecc volume: Remove negotiation for v1 API
Change Ibe1cd6461d2cb78826467078aa17272f171746aa removed support for the
v1 volume API. We should have removed this check at the same time.

We also remove some god-awful monkey patching that references v1
cinderclient but in practice modified all clients.

Change-Id: I3727fd9238df966b3bc59812c5efcf3398da5c72
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-12 10:32:12 +00:00
Zuul
de4e119272 Merge "typing: Add types to custom formatters" 2025-12-11 21:56:06 +00:00
Zuul
30f3192b8d Merge "Add custom command classes" 2025-12-11 21:42:13 +00:00
Zuul
cc36d929b3 Merge "clientmanager: Remove legacy cruft" 2025-12-11 21:32:52 +00:00
Stephen Finucane
e799a4a676 typing: Add types to custom formatters
We make a lot of use of typing.Any just to get this over the line. We
can come back to this later.

Change-Id: I03c18b0b44f210b2ad3e4012344d521fb85cae97
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-11 18:55:15 +00:00
Stephen Finucane
3cd544df53 Add custom command classes
These are effectively identical to the osc-lib variants except they
include the attributes that the OSC shell implementation will set on
this during shell init. This helps from a typing perspective.

Change-Id: I53d9058273748ecd4d4eecec5f7291d5f38ce5ab
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-11 18:55:13 +00:00
Zuul
c59bf71fb7 Merge "Use openstacksdk test generate_fake_resources factory" 2025-12-11 15:50:51 +00:00
Zuul
924822507a Merge "Implement conflict resolution" 2025-12-11 15:50:49 +00:00
Zuul
65801e7e58 Merge "Improve help strings for tap services" 2025-12-11 15:03:09 +00:00
Zuul
f2810a83b0 Merge "Moving tapas osc client code from neutronclient" 2025-12-11 15:03:06 +00:00
Stephen Finucane
3fbe41cd52 clientmanager: Remove legacy cruft
No has used Initialize functions in years, while the _auth_required
attribute has long since been handled by the base class in osc-lib.

Change-Id: I3af9a6d8c339b2170a13346b009392d51e044443
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-11 13:31:26 +00:00
Miro Tomaska
dedc1a342c Use openstacksdk test generate_fake_resources factory
Instead of building fake test objects in the local fakes.py file,
use existing generate_fake_resource(s) factory methods to automatically
populate class attributes. Doing this ensures that fake objects are always
build with actual attributes of the class.

Change-Id: If424b87c79e7dab102cbd8a7938df85411c9465d
Signed-off-by: Miro Tomaska <mtomaska@redhat.com>
2025-12-11 13:28:38 +00:00
Stephen Finucane
060299c749 Implement conflict resolution
Take advantage of functionality recently introduced in cliff to allow us
to prefer commands that are in-tree over those provided via plugin
packages. This will allow us to move the extensions themselves in-tree.

Change-Id: I5dd9bc9743bea779ea1b4a71264c9a77c80033b3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-11 13:17:24 +00:00
Takashi Kajinami
92a277ff4c ruff: Enable E5 check
... to enforce maximum line length, to keep consistent code format.

Note that E501 check is disabled in test code now, until we decide how
to update ~50 lines violating the limit due to too long names.

Change-Id: I122c8b9035d6381dafb34438517c26b01e5201f5
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-12-11 02:43:20 +09:00
Miro Tomaska
9e49047ed1 Improve help strings for tap services
This is a follow up patch to feedback from[1]

[1] https://review.opendev.org/c/openstack/python-openstackclient/+/963445/comment/8f9576d4_938391ea/

Change-Id: I1c1ee68b37ef4c87c13d18e773c19b4ca5814ead
Signed-off-by: Miro Tomaska <mtomaska@redhat.com>
2025-12-08 19:00:45 +00:00
Miro Tomaska
97c2238df1 Moving tapas osc client code from neutronclient
Proposal to move all stadium projects from neutronclient
to openstackclient repo. Tap-as-a-service is the first example.
The tapas osc client code was recently moved to neutronclient see
https://review.opendev.org/c/openstack/tap-as-a-service/+/960849
but proposal is to make openstackclient its final destination.

This change also includes automatic lint fixes required in
this repo.

Change-Id: Ied47f40c6947600d40bf675ec06f0bf88fd15f1f
Signed-off-by: Miro Tomaska <mtomaska@redhat.com>
2025-12-08 13:22:12 -05:00
Zuul
f8effe997e Merge "Change metavar name for registered limit delete" 2025-11-26 12:29:54 +00:00
Zuul
79db64f264 Merge "Remove duplicate test utilities" 2025-11-25 14:47:22 +00:00
Stephen Finucane
fb6dad48db Remove duplicate test utilities
We cannot remove them fully, but we can remove a lot of them. Further
cleanup is needed here to remove the references but that will be done
once a version of osc_lib with fixes is included.

Change-Id: Ifd200bd3d3e5c02c239a8ad0e6cee6d823e26544
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-25 12:06:49 +00:00
Luan Utimura
4132ca1818 volume: Add missing backup_id field in tests
This change also reverts commit:
  * 5f1ffe742c

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/958801
Change-Id: Icac78179bc324e6fbe762f8095f2cba490ef6aea
Signed-off-by: Luan Utimura <luan.utimura@luizalabs.com>
2025-11-24 13:50:38 -03:00
0weng
0411805608 Change metavar name for registered limit delete
Change registered limit argument to plural and remove `id` suffix for
`registered limit delete` command. Also, note that service can be
specified by name or ID in help description.

Change-Id: I16950a5ac1a197761592304dcb71dcb09d608d78
Signed-off-by: 0weng <oweng@osuosl.org>
2025-11-19 14:29:31 -08:00
Brian Haley
c17c5f0df6 Try to make help text of network code consistent
Just change all text to be as consistent as possible.

TrivialFix

Change-Id: I959cda9b0688f0fcec0f55ce4c8cadf209d3537f
Signed-off-by: Brian Haley <haleyb.dev@gmail.com>
2025-11-18 19:39:15 -05:00
Zuul
e9b720e1c7 Merge "trivial: Add missing ignore_missing arguments" 2025-11-17 10:57:14 +00:00
Zuul
0b88ea4fab Merge "identity: Remove duplicated _find_sdk_id method" 2025-11-17 10:28:13 +00:00
Zuul
d7e71480d4 Merge "identity: Fix filtering endpoints by project with domain" 2025-11-17 10:28:11 +00:00
Zuul
351d537cb0 Merge "trivial: Normalize some client usage" 2025-11-17 10:26:43 +00:00
Stephen Finucane
73021165ff trivial: Add missing ignore_missing arguments
This prevents a class of bugs.

Change-Id: I96e1cd8ed4a682ef5c95f67f3d1246f7026eada9
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-14 11:54:40 +00:00
Stephen Finucane
55fd501657 identity: Remove duplicated _find_sdk_id method
We have a few instances of this. Settle on one.

Change-Id: Id115fea1c59ad75ec8e00d665e587020f7177a55
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-14 11:51:02 +00:00
Stephen Finucane
a5e4d5f0fa identity: Fix filtering endpoints by project with domain
We were incorrectly passing domain_id as a positional argument, causing
it to get picked up as the ignore_missing argument instead. Correct
this, fixing another bug where the look of projects or domains could be
forbidden by policy, in the process. The latter is unlikely to happen,
given endpoint lookup is typically an admin-only operation, but it's
better to be safe.

Change-Id: Idd3300040967d781b7743accd62298cb24c62872
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-14 11:47:18 +00:00
Stephen Finucane
db2c1a5e2b trivial: Normalize some client usage
Ahead of rework in this area.

Change-Id: I1b1c2370967381903970870da8cbe0868b1e23e1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-13 15:20:35 +00:00
Zuul
0e8aa79f9f Merge "Add functional tests for image metadef resource type list" 2025-11-13 15:17:36 +00:00
Zuul
3b6f9ee7ba Merge "Add functional test for cached image command" 2025-11-13 13:34:57 +00:00
Zuul
1b6df0b5bb Merge "Add new hacking rules" 2025-11-07 18:17:29 +00:00
Zuul
232a0ab68d Merge "tests: Avoid more unnecessary mocks" 2025-11-07 17:18:53 +00:00
Zuul
23f47e0dab Merge "tests: Remove duplicated fake network client" 2025-11-07 17:18:50 +00:00
Stephen Finucane
eb7c4c61a9 Add new hacking rules
To catch some obvious issues.

Change-Id: Ic0ddc95100811e7b313b519aad7d687a1415020b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-07 15:45:51 +00:00
Stephen Finucane
33d34bdfe8 Remove tests for other osc-lib
These are already found in osc-lib itself.

Change-Id: I51114a5a79d6cd6ea46f60284066132b2e54a1a5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-07 14:14:05 +00:00
Stephen Finucane
7116449190 tests: Avoid more unnecessary mocks
Change-Id: I04672d46595e93b19f873a54d5be9363d262370b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-07 14:06:36 +00:00
Stephen Finucane
44dfa157e4 tests: Remove duplicated fake network client
This must have crept in some time after [1] merged.

[1] Ic203964c7dede7dd80ae2d93b8fa1b7e6634a758

Change-Id: Ic0603db8b1a59b7704c51b0e0ffceb7db2e781d3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-07 12:43:11 +00:00
Zuul
492a184add Merge "Add option to filter for projects when listing volume backups" 2025-10-22 17:51:49 +00:00
Jan Ueberacker
305e037df2 Add option to filter for projects when listing volume backups
Change-Id: Idb07c1be90a98b65b6c1b8f888d0ca5309f8cbc4
Signed-off-by: Jan Ueberacker <jan.ueberacker@inovex.de>
2025-10-22 16:33:09 +02:00
Zuul
b0763f9f9a Merge "Extend project delete command description" 2025-10-14 18:46:12 +00:00
Zuul
b28b3249de Merge "Fix openstack quota show without cinder" 2025-10-02 13:40:36 +00:00
Zuul
4282a512c0 Merge "identity: Fix 'user list --project' option" 2025-10-02 12:29:02 +00:00
Stephen Finucane
0ed122094a identity: Fix 'user list --project' option
The 'role_assignments_filter' identity proxy method requires either a
user or group, which defeats the entire purpose of the command when used
with this option. Use 'role_assignments' instead.

Change-Id: I8fb705c55fb4e81fa82d4a7dbe4c5bf7e1edd98a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #1616104
2025-10-02 09:58:46 +00:00
Matt Anson
fb8cdd4441 Ensure show on absent appcreds raises exception
Currently, running ``application credential show`` on a
non-existent appcred will exit normally and display a
formatted application credential with no data, despite
the Keystone API returning a 404.

Ensure that querying a non-existent application
credential raises an exception message and an exit-code
1 to the user.

Closes-Bug: #2126565
Change-Id: I597d2d4064f1020c5ac40862ecc556f3c94b53eb
Signed-off-by: Matt Anson <matta@stackhpc.com>
2025-10-01 14:36:17 +01:00
Thomas Goirand
de88853de2 Fix openstack quota show without cinder
Per this Debian bug [1], 'openstack quota show --default' fails when
cinder is NOT installed. This is also true of other services.

[1] https://bugs.debian.org/1109288

Change-Id: I361da44b9f1d09ba3a454632d41e2110a3815395
Signed-off-by: Svein-Erik Skjelbred <svein-erik@skjelbred.com>
Signed-off-by: Thomas Goirand <zigo@debian.org>
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-09-30 10:32:44 +01:00
wonjun0120
4cf70113d2 Add functional test for cached image command
Implements tests for cache clear operations including queue,
cache, and combined clearing functionality.

Change-Id: I71056bb5db6c3de4f9294ac1b661ab927f59c867
Signed-off-by: wonjun0120 <wonjundero@gmail.com>
2025-09-25 23:44:09 +09:00
jiwonjang
6b6a9bafd8 Add functional tests for image metadef resource type list
Implements functional tests for 'image metadef resource type list' command.

Change-Id: If645a04d4b8800da44041769f08b1e81332af33c
Signed-off-by: jiwonjang <kooriangman@gmail.com>
2025-09-25 21:12:10 +09:00