Commit graph

6355 commits

Author SHA1 Message Date
Zuul
51305d06f7 Merge "identity: Migrate 'domain' commands to SDK" 2025-05-19 14:17:19 +00:00
djp
444a1df705 tests: Simplify mocking in image tests
Replace assignment of `Mock` objects to methods that are already mocked
in tests/unit/v1/test_image.py, tests/unit/v2/test_image.py

story: 2011459
task: 52210
Change-Id: I0a4644c27066c26cf0ee0f3613c174f141fe94ed
2025-05-19 13:46:27 +00:00
Stephen Finucane
f1cd38aabf identity: Normalise output of application credentials commands
cliff is now smarter (I9155763eee15e19eab23b48989dfcc19ea2c5d34), so we
can effectively revert change I6b4f1b793dc383856bfdf9a01514381be3cd2bf1.
We bump the dependencies to ensure this.

Change-Id: I2af19043fd66b5be0826a774baeabeac7110a4aa
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 14:14:14 +01:00
Stephen Finucane
01c1b1e36f network: Allow multiple FIP filter opts
This is allowed by the neutron API. Allow it in OSC.

Change-Id: I7642ecd686d11c5af9e11cc80896243e853e33f3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 14:07:37 +01:00
Zuul
5e1fc3db05 Merge "Fix incorrect warning with --password-prompt option" 2025-05-19 12:48:49 +00:00
Stephen Finucane
082aca89d6 volume: Migrate 'volume delete' to SDK
Change-Id: Ia7d2bfb14945cb5c185daa820f699a4cfe4a3e7f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:22 +01:00
Stephen Finucane
125133d056 volume: Temporarily ignore new volume columns
Change-Id: I4296766a1576c64eb3927cb0557aef5346b2d6f6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:22 +01:00
Stephen Finucane
03aa172fd0 volume: Split v2, v3 create, delete commands
Change-Id: I42616b9586fede3b775bc0fdbba73df90b555d46
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:21 +01:00
Stephen Finucane
267a29d594 volume: Migrate 'snapshot show', 'snapshot list' to SDK
Change-Id: I40de24012363f496e46c3dddc31a3e2563ccf443
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:20 +01:00
Stephen Finucane
3c6fa42642 volume: Migrate 'snapshot set', 'snapshot unset' to SDK
Change-Id: Id34d460c8c5656bf43f48717b13a002508562e4e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:19 +01:00
Stephen Finucane
e0020aec6a volume: Migrate 'snapshot create' to SDK
Change-Id: I0c2811b8518c41658803a7b2053f0f5d5114ed67
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:18 +01:00
Stephen Finucane
fc42f12eb2 volume: Migrate 'snapshot delete' to SDK
Change-Id: Iba89d521ec17a642c5905b0cff908b5a4a9dafd0
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:16 +01:00
Stephen Finucane
e1ff450e34 volume: Add v3-specific volume snapshot module
Change-Id: I23026abbb909c082fbc0fe0c9b2efcc89f4d464a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:15 +01:00
Stephen Finucane
a9b9984973 tests: Use SDK mocks for SDK-based commands
Change-Id: I7e781875d4467ed097196771144e25cee38ce678
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:13 +01:00
Stephen Finucane
8eb1a183fe volume: Migrate 'backup set', 'backup unset' to SDK
Change-Id: Iced346df828faab1ff08a2645ff64f4cfea25cb1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:12 +01:00
Stephen Finucane
b933330d55 volume: Migrate 'service *' to SDK
Change-Id: I81254c6cde8783be371ccdcface5027eb247b1ce
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:10 +01:00
Stephen Finucane
1ee3ef33d7 volume: Add v3-specific volume service module
Ease migration.

Change-Id: Ibcdb157ba1bf370c63320d3a1afcf3c400370624
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:09 +01:00
Stephen Finucane
00f4cf9c17 volume: Migrate 'block storage log level *' to SDK
Change-Id: Ic03f65fee197a85518df448c18a0fd2c11d51993
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-19 13:20:07 +01:00
xfrnk2
a74850d2c4 Add a column to all_projects tag of server list cmd
Add a Project ID column to the --all-projects tag of server list cmd
Differentiate from the basic command, add a column for Project ID
to facilitate easier identification.
Add test code for the Project ID column of --all-projects tag.

Change-Id: I12af2c91f934e7cd268d21cf76dda78646ed2ff4
2025-05-19 12:38:20 +01:00
Chaemin-Lim
eea369e73c Fix incorrect warning with --password-prompt option
When creating a user with the --password-prompt option, a warning is
incorrectly displayed stating that no password was supplied, even though
a password was entered. This occurs because the code checks parsed_args.password
instead of the password variable that actually stores the prompted password.

This patch fixes the issue by checking the 'password' variable
instead of 'parsed_args.password' in the warning condition. A test
case has been added to verify that no warning is displayed when
using --password-prompt and entering a password.

Closes-Bug: #2091836
Change-Id: Ib3ddc7e400ee7988f605c00db534bccc3617d982
2025-05-19 16:12:06 +09:00
Stephen Finucane
32762bcda6 compute: Fix key used for NIC fixed IP field
Change-Id: If099ac0e2663228681e87e2f4821b746c8113ffc
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2106221
2025-05-18 15:12:17 +01:00
Zuul
79de137152 Merge "identity: Add missing user argument" 2025-05-16 02:50:39 +00:00
Zuul
f380d029df Merge "identity: Fix listing of applications credentials by user" 2025-05-16 02:50:36 +00:00
Zuul
efce69b47f Merge "Don't warn about unsupported version with SDK-based commands" 2025-05-15 16:19:20 +00:00
Stephen Finucane
e26b447925 identity: Add missing user argument
Change-Id: Ifd2b32e97d1f5fd426f333da13852a8bb6821f1b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2110765
2025-05-15 16:05:56 +01:00
Stephen Finucane
94d17b8762 identity: Fix listing of applications credentials by user
Change-Id: I71f1c4f338694e2b50e71b6907c415bbb6a768fa
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2107354
2025-05-15 15:59:34 +01:00
Zuul
9de5e58bc8 Merge "Bump Python version used for linters to 3.10" 2025-05-09 16:13:11 +00:00
Zuul
05accdde9a Merge "Drop support for Python 3.9" 2025-05-09 16:13:08 +00:00
Stephen Finucane
7c7c066096 Bump Python version used for linters to 3.10
Change-Id: I693516fc2a08218c50d83a3ab121b51254f97958
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-07 17:55:39 +01:00
Stephen Finucane
ce2a253d5a Drop support for Python 3.9
Change-Id: If7d8ce2be7081fdcd609c54a211c91439cddce6b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-07 17:55:31 +01:00
Michael Still
5d730f374b Add support for spice-direct console types.
This patch adds support for Nova microversion 2.99 which exposes the new
spice-direct console type and the pre-existing /os-console-auth-token/ API.

+----------+----------------------------------------------------------+
| Field    | Value                                                    |
+----------+----------------------------------------------------------+
| protocol | spice                                                    |
| type     | spice-direct                                             |
| url      | http://127.0.0.1:13002/nova?token=f78009fb-41ad-...      |
+----------+----------------------------------------------------------+

+----------------------+--------------------------------------+
| Field                | Value                                |
+----------------------+--------------------------------------+
| host                 | 127.0.0.1                            |
| instance_uuid        | f2477018-aa93-...                    |
| internal_access_path | None                                 |
| port                 | 5900                                 |
| tls_port             | 5901                                 |
+----------------------+--------------------------------------+

Change-Id: I2d33646d6ac9b25076d69be76dcef8f5c465cd1b
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/940479
2025-05-07 19:34:17 +10:00
Zuul
a49a290a2b Merge "Update README" 2025-04-17 11:04:23 +00:00
Zuul
871b2a4d80 Merge "Add labels to Dockerfile" 2025-04-17 11:04:21 +00:00
Zuul
6e4c2879d4 Merge "Update the docker image to python3.12" 2025-04-17 11:04:20 +00:00
Zuul
0208a24235 Merge "zuul: Remove osc-upload-image, osc-promote-image jobs" 2025-04-17 09:47:42 +00:00
Stephen Finucane
6cb5d8cd14 Update README
Restructure things to be a little more helpful. Also add a reference to
the Dockerfile we provide and remove an errant header that should have
been removed in change Ife108e6ae191641b56e872e4616a3f4ec78281e8.

Change-Id: I5f562a99ccee7db485b5d40ef4ea6f2e2e362c13
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-17 08:53:35 +00:00
Stephen Finucane
22eecc54f8 Add labels to Dockerfile
Change-Id: Ic2c774c4fea263c7b04d20182e3354d9ae93788b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-17 08:53:27 +00:00
Stephen Finucane
f4e97d9733 Update the docker image to python3.12
Change-Id: I2120ac8d27bcefffa0b414cb74871922ccd2ad80
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-17 08:53:19 +00:00
Stephen Finucane
e4d621d24f zuul: Remove osc-upload-image, osc-promote-image jobs
We are no longer going to publish these images to Dockerhub, given
the recent changes to quotas there coupled with the fact that no one
appears to be using them [1]. The osc-build-image job is retained to
ensure our Dockerfile keeps working.

[1] https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/thread/BE7PPQL4DGNDZ2SIMUVSK67I5NF3TFCX/

Change-Id: I9d2ca8f90b8244a09832da673491312095520968
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-16 17:55:06 +01:00
Stephen Finucane
7d64003196 tests: Stop returning FakeResource in compute tests
This was still being used in places where we have our own API bindings
because SDK does not support the API. Those bindings should be returning
dicts, not FakeResource objects. Correct this, and in doing so fix the
bug this highlights in our cell-down output.

Change-Id: I6647d94fcf5ada8186edbf64c03abd3d8ae7ca56
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-14 16:43:22 +01:00
Stephen Finucane
abed52f106 tests: Remove sdk prefix
It is no longer necessary.

Change-Id: I6bcc14be90be7c93ec4729f241299d55885570fd
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-14 16:27:32 +01:00
Stephen Finucane
2c878ad2b7 tests: Remove dead code
None of these fakes are used anymore. Remove them.

Change-Id: I06721aa77f93b76b189901bbdc13a9825fe2fc3d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-14 16:27:31 +01:00
Stephen Finucane
b0fe724caf tests: Remove use of legacy resource helpers
This allows us to remove get_servers, create_servers, and
create_one_servers.

Change-Id: I31a86b6333fdc3da1b54407f077873511260a5df
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-14 14:10:55 +01:00
Zuul
db4739fc5c Merge "Require confirmation to reset server state." 2025-04-11 13:23:47 +00:00
Sean Mooney
25cd1178b3 Require confirmation to reset server state.
This change updates the server set state command to require confirmation
before it is applied. The same pattern as project clean is used and a
new --auto-approve flag is added to allow skipping the prompt.

Operators often use reset state in cases that are incorrect
this change updates the warning to be more explicit
about when and when not to use it.

Change-Id: Iab14739cf6043ad45ad49edff0580e81d75af2fd
2025-04-11 11:53:14 +01:00
melanie witt
d123be0819 Fix 'openstack keypair list --project <project>'
The --project option of 'openstack keypair list' is supposed to filter
keypairs by a project but has not been working and instead returns
keypairs from all projects.

The reason appears to be because it uses a request for a user list
filtered by project but tenant_id/project_id is not a valid filter for
GET /users.

This fixes the issue by requesting role assignments for the specified
project and then requesting keypairs for users with a role in the
project.

This change depends on a recent openstacksdk bug fix change
Ic552dee83d56278d2b866de0cb365a0c394fe26a which fixed the user_id query
parameter for the compute /os-keypairs APIs. The bug fix was released in
openstacksdk 4.4.0.

Closes-Bug: #2096947

Change-Id: Ibb5757766e3040e58d64388b95678fab9b2b6f23
2025-04-10 17:59:29 -07:00
Zuul
616d6f3a29 Merge "Add support for showing scheduler_hints in server details" 2025-04-10 18:37:26 +00:00
Stephen Finucane
11495e655a Don't warn about unsupported version with SDK-based commands
This doesn't make sense: SDK (and the server) will handle this for us.

Change-Id: I31b84e09eca0dc2bc5316d6727620346ae519512
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2106760
2025-04-10 18:21:17 +01:00
Rajesh Tailor
c66abfc76f Workaround for failing tests on openstacksdk change
The 'show-instance-action-finish-time' blueprint [1] adds support for
showing 'finish_time' for InstanceAction object.

This change adds 'finish_time' as hidden column, so it doesn't fail
tests.

We need to remove this from hidden_column list, once all the changes
related to blueprint are merged and show the field only if microversion
is >= 2.101

This is a workaround for failing tests on patch [2], as per suggestion
from Stephen.

[1] https://blueprints.launchpad.net/openstack/?searchtext=show-instance-action-finish-time
[2] https://review.opendev.org/c/openstack/openstacksdk/+/930562

Implements: blueprint show-instance-action-finish-time
Change-Id: Ib9294a603daed0fdb936be128dfba254b9108799
2025-04-09 12:23:38 +05:30
Douglas Viroel
c68622402e Add support for showing scheduler_hints in server details
Adds support for a new compute microversion that returns the
associated scheduler_hints in ``GET /servers/{server_id}``,
``GET /servers/detail``, ``PUT /servers/{server_id}`` and
``POST /server/{server_id}/action`` (rebuild) responses.

Change-Id: Ia5a4e0047b5123f2fb063cfc9ab1f58b2844308f
2025-04-08 19:27:29 +00:00