Commit graph

1657 commits

Author SHA1 Message Date
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
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
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
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
30f3192b8d Merge "Add custom command classes" 2025-12-11 21:42:13 +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
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
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
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
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
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
Zuul
8f3277326c Merge "Validation: Cannot create network with segmentation id alone" 2025-09-11 17:49:10 +00:00
dlawton
b808b82dfb Validation: Cannot create network with segmentation id alone
Change-Id: I7d98921fe6f2819a6427bc826d640a6685a00da7
Signed-off-by: Dan lawton <dlawton@redhat.com>
Closes-bug: #1693106
2025-09-11 15:28:51 +00:00
Zuul
475d69efad Merge "Bug Fix: Skip invalid server ID during multi-server delete" 2025-09-08 19:43:25 +00:00
dlawton
3dfeb5ed08 Bug Fix: Skip invalid server ID during multi-server delete
Change-Id: I8e5339f07b43dd0a9422eaf33346bbfdf2c9b328
Signed-off-by: Dan Lawton <dlawton@redhat.com>
Closes-Bug: #2122056
2025-09-08 17:13:47 +01:00
Rajesh Tailor
e7554603ac Fix microversion 2.100
This change fixes missing conditional logic for microversion
2.100 which adds support for showing `scheduler_hints` field
to `openstack server list --long` output.

Change-Id: I2820e02a91deb73850f37dc737dbec79dea99e8d
Signed-off-by: Rajesh Tailor <ratailor@redhat.com>
2025-09-03 16:53:35 +05:30
Stephen Finucane
94e447af80 tests: Remove use of namedtuple
Change-Id: I19a272ffd260bab263dd63cb920802b792e192eb
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-08-20 17:41:21 +01:00
Rajesh Tailor
dbddbf9760 Fix microversion 2.96
This change fixes missing conditional logic for
microversion 2.96 which adds `pinned_availability_zone`
field to `openstack server list` output.

Change-Id: I1e398bb3379fa6443b0a44db76baaf6241a945e7
Signed-off-by: Rajesh Tailor <ratailor@redhat.com>
2025-08-20 18:19:13 +05:30
Zuul
34f431bade Merge "compute: Fix flavor create --id auto" 2025-08-18 16:59:33 +00:00
Artem Goncharov
a312e9cdad Adopt sdk_fakes for compute.test_flavor
Use sdk_fakes inside test_flavor. The only left fake is for
flavor_access, for which there is no resource in SDK.

Change-Id: I8fcfb734eb45308b80aa1478c2935c9881fee928
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025-08-18 13:57:56 +01:00
Stephen Finucane
5feaa952ad compute: Fix flavor create --id auto
This was inadvertently broken during the switch from novaclient to SDK.
Fix it for now but also deprecate it since it is an unnecessary alias.

Change-Id: Iaf136d82e00defc86e57ae4ea7e848246f2ade2c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2120833
2025-08-18 12:20:44 +01:00
Zuul
d90e18b08c Merge "Support image save with chunk-size option" 2025-08-15 13:37:16 +00:00
Zuul
6ba9473cdb Merge "Adds CLI support for `glance md-namespace-properties-delete`" 2025-08-15 13:37:13 +00:00
Mridula Joshi
2177f07dfb Adds CLI support for `glance md-namespace-properties-delete`
This patch modifies the command to delete all metadef properties
inside a namespace. This operation can be called by `image metadef
property delete`

Change-Id: Iff9bda0dddfa157be0438a66d1d05da7b0b437c3
Signed-off-by: Mridula Joshi <mrjoshi@redhat.com>
2025-08-15 11:16:46 +00:00
Artem Goncharov
a73698490a image: Add hashing-related fields
Add support for the 'os_hash_algo' and 'os_hash_value' image attributes
added with Image API 2.7.

Change-Id: Id8fe6f3fecf77f537587e9088b207ef2077a9def
Signed-off-by: Artem Goncharov <artem.goncharov@gmail.com>
2025-08-15 12:01:58 +01:00
Hang Yang
13fe801968 Support image save with chunk-size option
Add '--chunk-size' option to 'image save' command to control the size of
bytes to read at one time.

Change-Id: I0a02323384433010b8c6804a4337040acb13da8f
Signed-off-by: Hang Yang <hangyang@verizonmedia.com>
2025-08-15 11:59:30 +01:00
Zuul
37228ae2d3 Merge "tests: Avoid unnecessary mocks" 2025-08-15 04:48:40 +00:00
Zuul
87fe04ae08 Merge "tests: Simplify mocking in server tests" 2025-08-15 04:48:26 +00:00
Zuul
7bb5857081 Merge "Remap custom named Image attributes when unsetting" 2025-08-15 04:48:23 +00:00
Zuul
a8751b00fe Merge "Add device ID and device owner to port unset" 2025-08-15 03:29:28 +00:00
Zuul
ad2a511434 Merge "Replace deprecated assertItemsEqual" 2025-08-14 13:34:42 +00:00