6236 Commits

Author SHA1 Message Date
Takashi Kajinami
ea85c7aa4d Replace deprecated datetime.utcfromtimestamp
It was deprecated in Python 3.12 in favor of datetime.fromtimestamp[1].

[1] https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp

Change-Id: Ia805157eaecac0c61d4c5f88daa430ec6d69a9d4
2025-06-18 18:15:52 +09:00
Zuul
f4c4a7343c Merge "Fix openstack image import --method web-download --uri 'invalid value'" 2025-05-30 17:15:43 +00:00
Zuul
d5e6392454 Merge "identity: Remove unnecessary helper" 2025-05-30 14:37:41 +00:00
djp
9ad18c4967
Fix openstack image import --method web-download --uri 'invalid value'
although python-openstackclient run command(image import) with invalid uri,
but the request succeeds. Fixed it to throw an exception
when requesting with an invalid URI.

unit test added. the test cover --uri 'invalid value'

Task: 52251
Story: 2011468
Closes-Bug: 2111777
Change-Id: I62cd8cdf054b6a5e07d664a543b0923ce5f20f83
2025-05-30 22:47:29 +09:00
Zuul
c923ed5893 Merge "Security-groups: Temporarily ignore is_shared" 2025-05-29 15:59:21 +00:00
elajkat
5f602475cd Security-groups: Temporarily ignore is_shared
[1] introduces is_shared field to SDK security-groups.
Till that is merged and released temporary skip the new field.

[1]: https://review.opendev.org/c/openstack/openstacksdk/+/950305
Related-Bug: #1999774

Change-Id: I71cdf96460bbb21ee61105ef9ccc23170b0b5460
2025-05-29 07:53:58 +00:00
Zuul
a8d2c56337 Merge "bug fix volume group show command." 2025-05-26 16:28:16 +00:00
Zuul
606fd132bc Merge "identity: Normalise output of application credentials commands" 2025-05-26 16:03:37 +00:00
Stephen Finucane
2f03c3ea3c identity: Remove unnecessary helper
Make better use of argparse and eliminate the need for a helper in the
process.

Change-Id: Ibdc9b4bfbb4d532ddb05bce9b49bcf0580cce76d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2025-05-26 16:12:28 +01:00
hongp
1c70e264a4 bug fix volume group show command.
There is no "show" function in the "group" class of python-cinderclient. Instead, there is a "get" function, so I fixed it.
0125495f92/cinderclient/v3/groups.py (L134)

Closes-Bug: #2111539
Change-Id: If61d8cf115c9ff04d172d7344565e693774e7a21
2025-05-23 10:08:39 +09:00
Zuul
88b59d8975 Merge "evacuate: respect original SHUTOFF state in --wait completion" 2025-05-21 10:29:33 +00:00
waf
3909e93301 evacuate: respect original SHUTOFF state in --wait completion
When running `openstack server evacuate --wait`, the command would hang
indefinitely if the instance was originally in SHUTOFF state, because
only “ACTIVE” was treated as a successful completion. We now capture
the server’s status before evacuation and dynamically include
“SHUTOFF” in the `success_status` list if the instance was already
shut off. This ensures that a shutoff instance is accepted as a valid
completion without requiring manual intervention.

Unit tests have been added and updated to cover both:
- pre-evacuation ACTIVE → success_status=['active']
- pre-evacuation SHUTOFF → success_status=['active','shutoff']

Closes-Bug: #2103426
Change-Id: I86ad1cd173a144b16fde1dbac87819fab2d7a50a
2025-05-21 16:52:24 +09:00
Zuul
5a565ca1ce Merge "Fix missing 'options' field in 'user show' command" 2025-05-20 18:08:26 +00:00
Chaemin-Lim
9bcb1c5c00 Fix missing 'options' field in 'user show' command
This patch fixes a bug where the 'options' field was missing from
the output of the 'openstack user show' command since v7.0.0.

The issue was caused by the 'options' field not being included in
the column list in the _format_user function. This field is important
as it contains various user settings such as multi-factor authentication
configurations and password policy exemptions.

This patch:
1. Adds 'options' field to the column list in _format_user function
2. Updates all affected unit tests to include this field
3. Uses getattr() to safely handle cases where the options field may be absent

Without this fix, users cannot see important options like multi-factor
authentication settings through the CLI, which could lead to security
configuration issues being overlooked.

Closes-Bug: #2084946
Change-Id: I4319268ad4310e6164eb8e65664d73f9b32cdd78
2025-05-20 23:46:39 +09:00
0weng
a2be1b014e Identity: Migrate 'group' commands to SDK
Change-Id: I5a477426318d77021c0430efa1d1f9a7b1ee2633
2025-05-19 15:39:18 -07:00
Zuul
5fb4559a1f Merge "tests: Simplify mocking in image tests" 2025-05-19 16:25:49 +00:00
Zuul
50dd542519 Merge "network: Allow multiple FIP filter opts" 2025-05-19 16:05:20 +00:00
Zuul
de7762f9b8 Merge "volume: Migrate 'volume delete' to SDK" 2025-05-19 15:54:41 +00:00
Zuul
bea4d834ce Merge "volume: Temporarily ignore new volume columns" 2025-05-19 15:54:38 +00:00
Zuul
47a2596b39 Merge "volume: Split v2, v3 create, delete commands" 2025-05-19 15:54:36 +00:00
Zuul
07909a6a6c Merge "volume: Migrate 'snapshot show', 'snapshot list' to SDK" 2025-05-19 15:47:53 +00:00
Zuul
803c3c6d6a Merge "volume: Migrate 'snapshot set', 'snapshot unset' to SDK" 2025-05-19 15:47:50 +00:00
Zuul
110cd9faae Merge "volume: Migrate 'snapshot create' to SDK" 2025-05-19 15:45:04 +00:00
Zuul
2e0318629d Merge "volume: Migrate 'snapshot delete' to SDK" 2025-05-19 15:45:01 +00:00
Zuul
0e47fc4e45 Merge "volume: Add v3-specific volume snapshot module" 2025-05-19 15:37:26 +00:00
Zuul
5c9c4e3dd7 Merge "tests: Use SDK mocks for SDK-based commands" 2025-05-19 15:15:38 +00:00
Zuul
ff7497689c Merge "volume: Migrate 'backup set', 'backup unset' to SDK" 2025-05-19 15:15:35 +00:00
Zuul
d27ff5a650 Merge "volume: Migrate 'service *' to SDK" 2025-05-19 15:15:32 +00:00
Zuul
82170be8d6 Merge "volume: Add v3-specific volume service module" 2025-05-19 15:15:29 +00:00
Zuul
e3bd9a4c01 Merge "volume: Migrate 'block storage log level *' to SDK" 2025-05-19 15:14:29 +00:00
Zuul
d5238d1dab Merge "Add a column to all_projects tag of server list cmd" 2025-05-19 14:17:25 +00:00
Zuul
5f2145d102 Merge "Add filters to search for enabled/disabled users and projects" 2025-05-19 14:17:22 +00:00
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