6355 Commits

Author SHA1 Message Date
Andriy Kurilin
0a93733293 Fix quota usage and reservation display
Fix `openstack quota show --usage` to correctly display resource usage
and reservations by applying proper name normalization for corresponding
sections of data.
Previously, name normalization was applied only for "limits" which is
the root section, leaving 'usage' and 'reservation' sections untouched.

Change-Id: Id14fe894b30a74b9b8d78b00c3d4ff151f8b4210
Closes-bug: #2137636
Signed-off-by: Andriy Kurilin <andr.kurilin@gmail.com>
2026-01-07 13:29:49 +01:00
Zuul
d1a0ede7db Merge "zuul: Make openstackclient-check-plugins voting" 8.3.0 2025-12-19 19:38:24 +00:00
Abhishek Kekane
ed2dc692dd Fix image owner change when accepting membership with --project
When using 'openstack image set --project <project> --accept <image>',
the command incorrectly changed the image owner. The --project parameter
when used with membership flags should only identify which member's
status to update, not change ownership.

Closes-Bug: #2136795
Change-Id: I1044b51f38000fb5339740bc40c7f8645c794402
Signed-off-by: Abhishek Kekane <akekane@redhat.com>
2025-12-18 14:01:45 +00:00
Zuul
85fccc7a91 Merge "typing: Fixups for typed osc-lib" 2025-12-16 18:13:51 +00:00
Zuul
08b1bb70dd Merge "taas: Use custom command classes" 2025-12-16 18:13:48 +00:00
Zuul
58210a141a Merge "fix(keystone): correct the args submitted on user creation" 2025-12-15 19:56:34 +00:00
Doug Goldstein
0b05fd8968 fix(keystone): correct the args submitted on user creation
When a user is created without a password then no parameter called
'password' should be submitted to the keystone API. This removes the
incorrect 'password' with null being supplied.

Closes-Bug: 2136148
Change-Id: If1c2eb5db360764a5f7660ce4e5353da85b6d3da
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2025-12-15 10:14:41 -06:00
Stephen Finucane
e8ae075c38 typing: Fixups for typed osc-lib
Change-Id: I436983a13e8812d704af2f1eb3f600277ef8a531
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-15 11:38:36 +00:00
Stephen Finucane
7246a07834 taas: Use custom command classes
In change I53d9058273748ecd4d4eecec5f7291d5f38ce5ab we added custom
Command classes for typing purposes. However, the Tap-as-a-Service code
merged around the same time and was missed. Correct this.

Change-Id: I3a9fe20b5b8eb54708644527538f27396f29b476
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-15 11:27:56 +00:00
Stephen Finucane
8dbb7126c6 identity: Use plural dest for append opts
Change-Id: I73a263a309e022b7606ced43a814a1d1914bc751
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-12-15 11:25:43 +00:00
Zuul
43ffea5c4d Merge "Remove functional testenv for py38/py39" 2025-12-12 17:59:10 +00:00
Koya Watanabe
f2f0f92d41 Remove functional testenv for py38/py39
Python 3.8 and 3.9 are no longer supported.
Refer to pyproject.toml for the current supported versions.

Change-Id: Ie7f917c26299509050294037cc27e1fd9c20e78b
Signed-off-by: Koya Watanabe <koywatan@lycorp.co.jp>
2025-12-12 14:49:33 +00:00
Stephen Finucane
748cff5914 zuul: Make openstackclient-check-plugins voting
This will ensure we do not forget to ignore a module when migrating
plugins in-tree.

Change-Id: Id4dd657746f7c5f8ebf5ef55964593123303b996
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstackclient/+/970618
2025-12-12 11:39:24 +00:00
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
d6b2f42cfb Merge "hacking: Check for missing ignore_missing calls" 2025-11-17 10:58:12 +00: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
db6c34c2c7 hacking: Check for missing ignore_missing calls
This comes up in reviews frequently. Let's automate it.

Change-Id: Ia7ebd7cf29fe4550b22921e898bebaaa5f7bb4f6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-11-14 11:54:41 +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
7505186a41 Merge "ruff: Use more specific name to enable pyupgrade rule" 2025-11-11 20:10:45 +00:00
Takashi Kajinami
188737c69c ruff: Use more specific name to enable pyupgrade rule
UP is the exact name of the rule, instead of U. Use the exact name to
avoid potential problems caused by any UX rules which can be added
in the future.

Change-Id: I5fa59181fcd3e28bf3c87ce2a5e610561b2ee8a8
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-11-12 01:41:37 +09:00