6070 Commits

Author SHA1 Message Date
Stephen Finucane
e5ccf1eb1c common: Use correct argument for volume limits
The sooner we have type hints in SDK, the better /o\

Change-Id: Iaf9596aea02f683c280ae68504a14d43dbd6134a
Closes-bug: #2077634
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-11-05 17:07:49 +00:00
Zuul
974cdd9a4e Merge "Fix ignored --user-domain in role assignment list" 2024-11-05 17:01:54 +00:00
Slawek Kaplonski
47144103ca Add "trusted" attribute to the "port"
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/927723

Related-bug: #2060916
Change-Id: I8e3d4ee2208ef6bb6c96ee430d7b550a0720431e
2024-11-04 09:12:43 +00:00
Takashi Kajinami
2e491191e5 Fix ignored --user-domain in role assignment list
Fix the wrong value assignment which made the --user-domain option
ignored. Unit tests are updated to verify usage of domain options to
avoid further regressions.

Also drop the redundant look up of domain id to avoid unnecessary API
call.

Closes-Bug: #2085604
Change-Id: I5112b8e831fb26eb6544615277f0d3fe4f15dc5a
2024-10-29 21:20:07 +09:00
Tobias Urdin
695d025f00 Show Created At column for volume backups in v3
The change in [1] erroneously only added the
created_at column for volume v2 API and not
also for the volume v3 API.

[1] https://review.opendev.org/c/openstack/python-openstackclient/+/920003

Change-Id: Iae0b4f21cbc31ae7464a79c8f5e01446ca4ff098
2024-10-17 16:25:13 +02:00
Yosef Salmalian
db115c09a2 remove project from network flavor profile
Removing project from network_flavor_profile as neutron api
does not uses project.

Closes-Bug: 2046496
Change-Id: I77b0544cf8629fb0a5b9914361a007d28b2b5662
2024-10-16 10:19:59 +03:30
Stephen Finucane
7c6b47b451 clientmanager: Check for 'block-storage' service type
This is a fun one driven by two separate changes. We recently started
checking whether the volume service was available before setting quotas
in order to allow us to use quota set for other services [1]. This
merged a number of weeks ago and was included in 7.1.0. More recently,
we modified DevStack to stop publishing a service catalog entry with a
service type of 'volumev3', preferring instead to use the correct
'block-storage' service type. Taken separately, neither of these changes
would have caused issues. Together, they mean our lookups for the volume
service now fail and we can't set volume quotas.

Fix things by checking for the block-storage service type also. A future
change will raise a warning (later an error) if the volume service is
not found and you're attempting to set a quota since this is clearly a
mistake.

Change-Id: Ibbeef52225e18757cd28d0fbfb14c1ca06975b60
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2084580
7.2.1
2024-10-15 18:07:26 +01:00
Rajat Dhasmana
b6b18489b0 Fix volume backup show by name
When we show a volume backup by name, it calls the get_backup
method in SDK which is only used for getting a backup by ID.
This patch modifies the approach to call find_backup method
which first tries the find by ID and then find by name logic
eventually returning the backup details.

Story: 2011234
Task: 51127
Change-Id: I926d8de9810fcf2e5335bbe35aaab15e1e36a5cb
2024-10-07 13:25:14 +00:00
Zuul
8979c00150 Merge "Always resolve domain id" 7.2.0 2024-10-03 11:59:16 +00:00
Takashi Kajinami
c8326b5525 Always resolve domain id
The --user-domain option and the --project-domain option may take id or
name. In case name is given it should be translated to id.

Closes-Bug: 2083390
Change-Id: Idf3f113a74452daabc80660574030cb9b24b1a15
2024-10-01 15:37:27 +00:00
Zuul
ac59673b5d Merge "Add status filtering options to port list" 2024-09-30 17:38:14 +00:00
Alfredo Moralejo
52d56b3fd9 identity: in service set command, don't pass the enable option when it is None
Currently, it is passing None value which is not accepted by keystone
parameters validation:

BadRequestException: 400: Client Error for url: ... Invalid input for field 'enabled': None is not of type 'boolean'

Failed validating 'type' in schema['properties']['enabled']:
    {'enum': [True, False, None], 'type': 'boolean'}

On instance['enabled']:
    None

Closes-Bug: #2083021
Change-Id: Ia8772560deb54e71672102157659d4eb22e6ad59
2024-09-30 13:45:03 +02:00
Zuul
2f790c319d Merge "identity: Don't pass unset options when creating user" 2024-09-25 08:22:26 +00:00
Sylvain Bauza
58d1b06fdc evacuate SDK actually uses admin_pass param
Change I0cd86675a884e6c2cbd3a861b8e111f961f0f336 was incorrect,
the SDK param name is admin_pass.

Change-Id: Ibe22c3d7d7ba0f1a5178475143e35fee5cac2ca2
2024-09-18 08:46:44 +02:00
Zuul
b92291f0aa Merge "compute: Allow adding, removing multiple SGs" 2024-09-17 13:26:47 +00:00
Stephen Finucane
033793aa0e identity: Don't pass unset options when creating user
In change I06f3848812bce60c65909f1311f36b70eba427d4, we migrated the
'user *' commands from keystoneclient to SDK. One side effect of this is
that we are no longer able to rely on keystoneclient's 'filter_none'
helper method that filters out parameters that are set to None. As such,
we now need to do this ourselves. Eventually, it would be nice if SDK
provided such functionality itself.

The same change also introduced a bug where the '--domain' argument was
being used to lookup a project rather than the '--project-domain'
argument. This is also corrected.

Change-Id: I1204ca611a74d134c879467d6c2b73f16e043213
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2080600
2024-09-17 13:26:26 +01:00
zhangoic
9c223696a0 Add status filtering options to port list
The patch adds "--status" options to list command.

Change-Id: I710437f67e9432b2b6389986bc922eac4a60c934
Partial-bug: #1672680
2024-09-17 12:56:21 +01:00
Antonia Gaete
415f68016c identity: Migrate 'access rule' commands to SDK
Change-Id: Id5740cc61474650f22f9efe8d148c8c666c3b91e
2024-09-17 11:52:46 +01:00
Stephen Finucane
bbe04238a8 tests: Add functional test for access rules
Change-Id: I0131eab2e5395ed530c05a2e9c91b348a7a34c13
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-09-17 11:51:54 +01:00
Zuul
31251e33ec Merge "Handle NotFoundException when listing floating IPs" 2024-09-13 18:58:51 +00:00
Zuul
e46a7a2adc Merge "pre-commit: Migrate pyupgrade to ruff" 2024-09-13 17:35:54 +00:00
Zuul
eaec72e2ba Merge "pre-commit: Migrate bandit to ruff" 2024-09-13 17:35:52 +00:00
Zuul
f63784606d Merge "evacuate: Fix password parameter name for SDK" 2024-09-13 17:35:50 +00:00
Zuul
86720f8a95 Merge "tests: Remove aliasing from extensions test" 2024-09-13 12:36:49 +00:00
Zuul
108aeb0bdf Merge "Remove TestServer base class" 2024-09-13 12:36:47 +00:00
Dr. Jens Harbott
8932282952 evacuate: Fix password parameter name for SDK
The parameter is called admin_password on the SDK side.

Change-Id: I0cd86675a884e6c2cbd3a861b8e111f961f0f336
2024-09-13 13:22:26 +02:00
Nate Johnston
b0936c5b30 Handle NotFoundException when listing floating IPs
Asking for floating IPs on an undercloud results in a NotFoundException.
Make openstackclient handle it gracefully.

No test is added for this because it would need to be a scenario test -
deploying a cloud without the foalting IP extension loaded.  I don't
think this edge case is worth an entire new job just to exercise it.

Change-Id: I73b544853376d98ab0dbb14e32fefc43c1a8a179
Story: 2006863
2024-09-13 11:34:05 +01:00
Zuul
067261e80d Merge "Removed the emit_duplicated_warning() funtion." 2024-09-12 19:19:48 +00:00
Zuul
e319df4726 Merge "compute: Fix --host in server list for new openstacksdk" 2024-09-12 18:37:15 +00:00
Stephen Finucane
f98006ca9d pre-commit: Migrate pyupgrade to ruff
Change-Id: Ic50d2a5e0bc9dcdfe29f382607135cab510cd396
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-09-12 18:08:23 +01:00
Stephen Finucane
fc6852cd94 pre-commit: Migrate bandit to ruff
The name of the errors change and we need to move things around a
little, but it's otherwise a straight swap.

Change-Id: I0a19765ebeaa14c0534faa1542165b76ed2bf4e2
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-09-12 18:08:23 +01:00
Zuul
e60ca0f898 Merge "Drop support for Python 3.8" 2024-09-12 16:28:24 +00:00
Mohammed Al-Dokimi
2bf123f315 Removed the emit_duplicated_warning() funtion.
Since this function is called once, I moved its implementaion to where
its called.

Story: 2010344

Change-Id: Iaf06def1a06ffbb605ee42569e6f87b409a72772
2024-09-12 14:42:57 +01:00
Johannes Kulik
ffa683ab4e compute: Fix --host in server list for new openstacksdk
With `openstacksdk` 3.2.0 the `host` attribute of an Instance got added
to the `Server` class [0]. With that change, listing servers with the `host`
attribute leads to a query-filter for `compute_host` as expected, but
`openstacksdk` will also filter for the `host` attribute locally after
the results are returned. Since `compute_host` being
`OS-EXT-SRV-ATTR:host` is not the same as `host, this means no results
are returned.

Since we want to keep the old behaviour of filtering by `compute_host`
i.e. the service host name, we need to switch to filter for
`compute_host`. This is already supported in older versions of
`openstacksdk`.

[0] 0f311ff3e2

Change-Id: I0cd32c5b7d6d4d21194f3efdcfb9b205dea6a91e
Closes-bug: #2074200
2024-09-12 12:51:36 +00:00
Zuul
c2d96c5938 Merge "pre-commit: Migrate from black to ruff format" 2024-09-11 21:16:47 +00:00
Zuul
6e1a5ed5a6 Merge "trivial: Remove unnecessary trailing comma" 2024-09-11 21:16:45 +00:00
Zuul
9fca2b51ee Merge "pre-commit: Migrate from flake8 to ruff" 2024-09-11 21:16:44 +00:00
Zuul
21a384a868 Merge "pre-commit: Bump versions" 2024-09-11 21:16:42 +00:00
b0c08ae29a Update master for stable/2024.2
Add file to the reno documentation build to show release notes for
stable/2024.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.2.

Sem-Ver: feature
Change-Id: I5b2c70118df024dfc9236c7e1fa39554ffccf5e0
2024-09-11 16:07:20 +00:00
Zuul
73e9dd1934 Merge "quota: Allow 'quota set' to function without volume service" 7.1.0 2024-09-06 15:46:49 +00:00
Stephen Finucane
519fa7aabc pre-commit: Migrate from black to ruff format
Change-Id: I28ca7d31d30272002799f3e2832105dc67c60538
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 15:55:39 +01:00
Stephen Finucane
17e6545fd4 trivial: Remove unnecessary trailing comma
Change-Id: I62402145c17f96626ec6e29598e32dee03a6038e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 15:55:39 +01:00
Stephen Finucane
2ba90581d5 pre-commit: Migrate from flake8 to ruff
Well, mostly. We still keep our own flake8 hooks and the hacking hooks
enabled. Everything else can be handled by ruff.

Doing this enables a couple of hacking checks that were previously
unaddressed. It also highlights a few cases that flake8 missed. Both are
addressed.

Change-Id: If81c7055e9ef692425da2789bae18a96d04b104f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 15:55:13 +01:00
Stephen Finucane
869b07eded pre-commit: Bump versions
We also drop the default language setting: everything is Python 3
nowadays.

Change-Id: I9dc9573a86c93416d1bbbc782dac76ecdda6effd
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-08-29 10:58:38 +01:00
Zuul
9c5fd76d9e Merge "compute: Add 'uuid' column to aggregate list" 2024-08-27 17:21:35 +00:00
Zuul
50d1e0916b Merge "Add callback on plugin load failure" 2024-08-14 11:12:03 +00:00
Zuul
bc6cff777f Merge "compute: Make 'hypervisor show' a bit faster" 2024-08-12 16:45:25 +00:00
Zuul
6312a6f452 Merge "compute: Only pass admin_password on rebuild if set" 2024-08-12 16:44:11 +00:00
Zuul
0d570cd66a Merge "identity: Use previous naming for 'service show' fields" 2024-08-12 16:01:30 +00:00
Zuul
e97e59d22d Merge "identity: Use previous naming for 'application credential show' fields" 2024-08-12 15:49:39 +00:00