6158 Commits

Author SHA1 Message Date
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
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
Zuul
7ecdb69f08 Merge "Refactor network fakes to sdk properties PART6" 2025-04-08 18:40:06 +00:00
Zuul
0874e2d33f Merge "Refactor network fakes to sdk properties PART 5" 2025-04-08 17:37:57 +00:00
Stephen Finucane
d96c81ff7f Refactor network fakes to sdk properties PART6
Included resources:
router
security_group
security_group_rule

Change-Id: I2423fc31d94f85aeefc7b0a205dfb38829417a29
2025-04-08 16:36:48 +00:00
Stephen Finucane
f870548c7f Refactor network fakes to sdk properties PART 5
Included resources:
qos_policy
qos_rule
qos_rule_type

Note: Parameters in unittests was modified
for compatibility with sdk

Change-Id: Iaa902d64ff1b29a07c28ed2100d437da506be475
2025-04-07 15:53:30 +01:00
Stephen Finucane
80eaa33ffe volume: Make better use of argparse
The latest in a series.

Change-Id: I8273c817e38120ba0b25aebdbfa1c2872222765e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-04 18:11:27 +01:00
Stephen Finucane
181bb194c7 image: Migrate 'create image' volume calls to SDK
Change-Id: Ie57a5c17a6df5a333abd6b11e28b65833740e102
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-04 18:11:27 +01:00
Zuul
30aa27b7f9 Merge "tests: Rename 'compute_sdk_client' -> 'compute_client'" 8.0.0 2025-04-03 18:09:11 +00:00
Zuul
dd8e4740ec Merge "compute: Migrate to 'compute' client alias" 2025-04-03 18:08:17 +00:00
Zuul
1e8d243986 Merge "Fix: extend in-use volumes check" 2025-04-03 16:40:17 +00:00
Stephen Finucane
dc68be6b7b tests: Rename 'compute_sdk_client' -> 'compute_client'
Resolve a TODO. Achieved using:

  sed -i 's/self.compute_sdk_client/self.compute_client/' \
    $(ag -w self.compute_sdk_client -l)

Change-Id: I76798058b9dee9fc7ef01ff8656543fbb1266d43
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-03 16:39:04 +01:00
Stephen Finucane
dae2539490 compute: Migrate to 'compute' client alias
This is no longer assigned to novaclient, meaning we can use it for SDK.

Change-Id: I43d9ede39d36cc29301f94fa462b9b9d9441807c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-03 16:39:03 +01:00
Zuul
54a5d2f40c Merge "Remove use of formatter function" 2025-04-02 14:40:12 +00:00
Zuul
01f9279dbf Merge "Imported Translations from Zanata" 2025-04-02 12:57:43 +00:00
Stephen Finucane
ac1ad1c4e4 Remove use of formatter function
We also update tests to use proper SDK fakes so we actually test this.

Change-Id: Ib98348cab613b7139f0faa0b5df90ff44353974f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-02 12:39:26 +01:00
Zuul
2148a86fc5 Merge "Remove use of formatter function" 2025-04-02 10:19:34 +00:00
OpenStack Proposal Bot
0554ff60b4 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I2493ee06a6d47791be683577f0a9b2c63199a67c
2025-04-02 03:07:33 +00:00
Zuul
ade7da8797 Merge "Prepare for osc-lib changes" 2025-04-01 17:57:57 +00:00
Zuul
4ba21fd6f4 Merge "pre-commit: Enable mypy" 2025-04-01 16:25:53 +00:00
Stephen Finucane
d95e23d92b Remove use of formatter function
Change-Id: I9ef88a4d69ffc3eaae183c77445ac10358d86337
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 16:42:13 +01:00
Zuul
8e95c0ed31 Merge "typing: Indicate another tuple to be extended" 2025-04-01 14:49:36 +00:00
Zuul
425e430c31 Merge "docs: Remove irrelevant TODO" 2025-04-01 14:01:24 +00:00
Zuul
1f25a2f935 Merge "volume: Remove Cinder v1 support" 2025-04-01 14:01:22 +00:00
Zuul
438878a3ed Merge "docs: Migrate remaining block storage commands to autocommand" 2025-04-01 12:44:07 +00:00
Zuul
c0521743ba Merge "Remove contributor specs" 2025-04-01 12:44:05 +00:00
Stephen Finucane
dc8596fe74 Prepare for osc-lib changes
Change-Id: I665cd61272f881dce2d387da6035a2f35c866add
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 13:39:50 +01:00
Stephen Finucane
ec4fd81c11 pre-commit: Enable mypy
To ease migration of various commands from OSC to SDK.

Change-Id: I4645237e8808239e4d605f7f45138449c9439949
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 13:14:47 +01:00
Stephen Finucane
62c8b8217e typing: Indicate another tuple to be extended
One has been introduced since Ie5907de8d60f2f39e98f6a88227cebb2e2ff565c
merged.

Change-Id: I37f7bf58a2cbecb69b370e832e56daa310cea3b6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 13:14:47 +01:00
Zuul
c9e4e5404f Merge "Permit use of tuple API_VERSIONS" 2025-04-01 12:02:24 +00:00
Zuul
77143f9bed Merge "typing: Resolve incompatible operand issues" 2025-04-01 11:50:55 +00:00
Zuul
28bd00a642 Merge "typing: Correct type for missing attributes" 2025-04-01 11:50:53 +00:00
Zuul
e6ae7d8533 Merge "typing: Remove use of optional imports" 2025-04-01 11:50:51 +00:00
Zuul
93da5f7af5 Merge "typing: Use consistent types" 2025-04-01 11:50:49 +00:00
Zuul
6e89f9da63 Merge "identity: Migrate 'endpoint' commands to SDK" 2025-04-01 10:55:58 +00:00
Zuul
514a46ee5d Merge "Remove tags from README" 2025-04-01 10:48:12 +00:00
Zuul
cf25526e94 Merge "Return the `port` column headers expected in the list command" 2025-04-01 10:48:10 +00:00
Stephen Finucane
662405e55c docs: Remove irrelevant TODO
cue is a dead project.

Change-Id: Ie860312a9ea481741bf5e7ab29610f621daba702
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 10:46:06 +01:00
Stephen Finucane
e6be9a3edf volume: Remove Cinder v1 support
The Cinder v1 API was removed in Queens [1]. Its replacement, the v2
API, has existed since Grizzly [2]. More importantly, the v1 commands
are implemented using python-cinderclient but support for the v1 API was
removed from python-cinderclient in Train [3], meaning none of these
have worked since then. Clearly if no one has noticed or cared in the 6
years or so since that happened, it's safe to say we can delete these
commands.

[1] 3e91de956e
[2] 75ca60f619
[3] 2189e5702b

Change-Id: Ibe1cd6461d2cb78826467078aa17272f171746aa
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 10:46:03 +01:00
Stephen Finucane
3eb063d4f7 docs: Migrate remaining block storage commands to autocommand
Change-Id: I6924f7053e14e843420deea1a023201fad7d4999
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 10:45:32 +01:00
Stephen Finucane
0b9c998d8a Remove contributor specs
There is only one and it was never implemented. Remove the directory.

Change-Id: Ibfffe7936556a626b407deca0e8de17b45db5313
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 10:45:32 +01:00
Stephen Finucane
b2eccdcb1a Permit use of tuple API_VERSIONS
The values of these dictionaries are not used when SDK is in use,
which should soon account for all use cases. Eventually we should
probably look for plugins to return a proper class or typeddict but
that's a job for another day.

This began as a fix for in openstackclient/object/client.py which
referenced a non-existent class and quickly snowballed.

Change-Id: I7b807ec3a97124b35828ffdecbb36f6fde11e7b5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-04-01 10:36:02 +01:00
Antonia Gaete
7750fc1cf4 identity: Migrate 'endpoint' commands to SDK
Change-Id: I71b5ae8a4bbcb2fdebf894d8bd5cc8322c31bdb5
Depends-On: I599ff3e88d4e1e9ffafc638bb74186f2739b5a77
Depends-On: I9aa39810fe94f7ee9b68d34050f4adb9dbdfccb8
2025-03-31 16:58:27 -07:00
Stephen Finucane
9de592ebaf typing: Resolve incompatible operand issues
Change-Id: I7f3dd908053b9ace5206d0a1bd3b8258fd0264ef
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-31 17:52:16 +01:00
Stephen Finucane
e28046cc19 typing: Correct type for missing attributes
Change-Id: I55652220ecd663fa024937646dfef92595e1cd0f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-31 17:52:16 +01:00
Stephen Finucane
9435ef825a typing: Remove use of optional imports
Do them inline instead.

Change-Id: Icab1a0452249efc79f214c4d7b369d02291e94b4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-03-31 17:48:36 +01:00