Commit graph

5890 commits

Author SHA1 Message Date
Stephen Finucane
ca91c826e3 volume: Add v3-specific volume backup module
This makes testing easier.

Change-Id: I71a13b34a85350af17612e12c03e6df8cb041f86
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 09:59:20 +01:00
Zuul
a6dcb773f1 Merge "Fix: incremental volume backup" 2024-07-05 19:55:12 +00:00
Stephen Finucane
3f781cc3f9 docs: Remove references to novaclient
Change-Id: Ieb1dc77f311a2e279036587a1f8d575a387494d0
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-02 17:52:02 +01:00
Stephen Finucane
0f006392ac compute: Migrate remaining tests to SDK objects
Change-Id: I33b80007777a0483964cc04357961bf0c5eda6e5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-02 17:52:02 +01:00
Stephen Finucane
7252a7a781 compute: Migrate 'host set' to SDK
This was the sole outstanding command to be migrated to SDK. We also
clean up the old in-tree wrappers we have in the process and add missing
error checks for the 'host list' and 'host show' commands.

Change-Id: I5635469b63ab3370fb5118e4f8a1758002381aa5
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-02 17:52:02 +01:00
Stephen Finucane
0f07c97e84 compute: Migrate 'agent *' to SDK
These are not supported by SDK natively (intentionally so) so we use raw
HTTP requests to manage this migration.

Change-Id: I72fa0d6f87899537a24090995b1ba884bc5f9d4d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-02 17:52:02 +01:00
Stephen Finucane
e0f7306011 network: Migrate 'port list' to compute SDK
We use the compute client here to look up server IDs when filtering by
'device_id'.

Change-Id: I76515eaa4ce4e7c7d0173d2e0a91d7564ba7041a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-02 17:52:02 +01:00
Stephen Finucane
aa5eb881e5 compute: Migrate tests for ShowServer to SDK objects
This is a little more realistic. We fix a minor bug along the way and
start ignoring some newly added create-only fields.

Change-Id: I93eae610e16e2a3a859f684b889546ace3afa683
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2024-07-02 17:51:49 +01:00
Zuul
518420abe4 Merge "compute: Remove unnecessary try-except" 2024-07-01 22:38:55 +00:00
Rajat Dhasmana
205bac3caf Fix: incremental volume backup
The incremental volume backup stopped working after we moved from
cinderclient to SDK[1]. This happened because SDK accepts the
``is_incremental`` parameter[2] rather than the ``incremental`` parameter
which is actually passed in the API request and was previously a valid
parameter for cinderclient.

This patch fixes the issue by passing the ``is_incremental`` field instead
of ``incremental`` from the OSC side which adds the ``incremental`` parameter
in the API request.

Request body after the fix:

'{"backup": {"name": null, "description": null, "volume_id": "<vol-id>",
"force": false, "container": null, "incremental": true}}'

[1] https://review.opendev.org/c/openstack/python-openstackclient/+/889748
[2] 10e5e20fc0/openstack/block_storage/v2/backup.py (L126-L134)

Closes-Bug: #2070080
Change-Id: I89bd3d2751267ec39f4dbd664b7873ab87a9ac6c
2024-07-01 21:11:46 +05:30
Stephen Finucane
40ce56201c compute: Remove unnecessary try-except
We don't need to transform one HTTP Forbidden-related error to another:
just use the original one. This also fixes an issue where we would end
up with an undefined variable (server_id) if a non-HTTP 403 exception
was raised, since that would be blindly ignored.

Change-Id: Icdd1764b6f2df4a635e3264ed8f93a115cc52ef2
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #2062010
2024-07-01 11:11:02 +00:00
Rajat Dhasmana
ca81b1acf0 Add cluster to volume service list
This patch adds the ``Cluster`` and ``Backend State`` columns to
the ``openstack volume service list`` command. Note that you need
to provide the appropriate microversion to show these columns.

Cluster: openstack --os-volume-api-version 3.7 volume service list
Backend State: openstack --os-volume-api-version 3.49 volume service list

Change-Id: Ie7727d0001307b5d5a40d7ea0348bdb9626f9e03
2024-06-27 19:37:15 +05:30
Zuul
dd6ac285d5 Merge "Identity: Migrate 'role assignment' commands to SDK" 2024-06-17 11:41:01 +00:00
ArtofBugs
de9d0f9e1b Identity: Migrate 'role assignment' commands to SDK
Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/913448
Change-Id: I579775d2dc4110951e934e00b51bf8d7546e207b
2024-06-13 16:00:54 -07:00
Stephen Finucane
887f1e9385 tox: Add testenv descriptions
Change-Id: I0a7880d72248e94690a973d3a1fd33c176ed658e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-06-12 14:40:50 +00:00
Zuul
19c053efb8 Merge "Add support for volume unmanage" 2024-06-11 15:11:11 +00:00
Rajat Dhasmana
fdc2763ac2 Add support for volume unmanage
This patch adds support for unmanaging a volume with the
``openstack volume delete --remote`` command.

Change-Id: Id71681e817f6e56b4ef553079f0bcfac8252d3cf
2024-06-10 20:48:30 +05:30
Brian Haley
5483370981 Remove admin only text from 'port create' help text
Specifying a MAC address is only admin only for
'port set' [0], remove it from the 'port create'
help text.

[0] https://docs.openstack.org/api-ref/network/v2/index.html#ports

Change-Id: Ic3296dd03676b460b3d08b1bbaae6f1d132e839d
2024-05-24 16:38:50 -04:00
Zuul
d9b95d776a Merge "Fix tests on Python 3.12" 2024-05-21 07:41:51 +00:00
Zuul
525fabe051 Merge "Drop direct dependency on simplejson" 2024-05-20 11:45:21 +00:00
Zuul
6dbf7afe1d Merge "Remove clients of retired projects" 2024-05-20 11:45:19 +00:00
Takashi Kajinami
cf6dd62dd1 Drop direct dependency on simplejson
The simplejson library is not included by the requirements but it was
directly imported. Drop the direct inclusion and use the alias in
the requests library to avoid ImportError caused by missing simplejson
in the environment.

Also fix the missing requests library in requirements.

Change-Id: I8713f45c5f2717cc53ba043aaeb479e72f641f78
2024-05-20 09:59:32 +09:00
Takashi Kajinami
bb459d49a8 Remove clients of retired projects
Murano[1], Sahara[2] Senlin[3], and Solum[4] are being retired because
of no activity and no maintainer.

[1] https://review.opendev.org/c/openstack/governance/+/919358
[2] https://review.opendev.org/c/openstack/governance/+/919374
[3] https://review.opendev.org/c/openstack/governance/+/919347
[4] https://review.opendev.org/c/openstack/governance/+/919211

Change-Id: I20a1f55840abad810517b4f583bb1040e63b6210
2024-05-17 00:50:09 +09:00
Rajat Dhasmana
00af14b3f2 Add DeleteVolume class to v3
This is done to support the volume unmanage command.

Change-Id: Ib59b1f599be152a25c4b6a31988c28079f552ba9
2024-05-15 11:55:50 +05:30
Rajat Dhasmana
cc7773f53b Add support for managing volumes
This patch adds support for the cinder manage command to
bring a volume under OpenStack management.

Change-Id: I12b63bfc4f0c9bc29cf9d4efd9a5cd038ec00af3
2024-05-15 11:53:27 +05:30
Rajat Dhasmana
0d9ace6425 Add CreateVolume class to v3
This patch acts as a base framework to add the parameters needed
for manage volume support.
This includes 2 changes:
1. Move get_parser and take_action code to common methods which
can be utilized by both v2 and v3
2. Make _check_size_arg as a static method and move it inside
CreateVolume class since it's not used by other classes.

[2] was initially thought to be a follow up change but since we
are implementing changes into the _check_size_arg method for v3,
it makes sense to just include it in CreateVolume class to avoid
adding a new additional method. Similar changes are done for v2
as well.

Change-Id: I9315e457ebd6c5ba4cc67452f92c9dc8c139ee3c
2024-05-15 11:46:12 +05:30
Stephen Finucane
4c31284936 Fix tests on Python 3.12
We were seeing the following test failures on Python 3.12:

  openstackclient.tests.unit.common.test_module.TestModuleList.test_module_list_all
  openstackclient.tests.unit.common.test_module.TestModuleList.test_module_list_no_options

Both failures were caused by missing attributes of 'sys', e.g.

  AttributeError: module 'sys' has no attribute 'builtin_module_names'

Fix this by exposing the real 'sys' module as part of our mock of
'sys.modules'.

Change-Id: I17391a46f08896f49dccaf75ad685dab1375a03d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-05-10 11:16:56 +01:00
Zuul
5e5b89f906 Merge "Router flavor_id can be a name" 2024-05-08 19:43:44 +00:00
Zuul
1ea291167b Merge "Improve output of 'server migrate --wait'" 2024-05-07 14:52:05 +00:00
Stephen Finucane
50c595b6e0 identity: Make better use of argparse
Change-Id: I50d2d28422e609656408b9b59f330d6a78314344
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-05-07 11:20:02 +01:00
elajkat
2e7ba5e3dd Router flavor_id can be a name
Change-Id: I72fc21a1adb4790a2a51e9b37744ee1ee3d01f32
Partial-Bug: #2020823
2024-05-06 13:36:04 +02:00
Stephen Finucane
0fd107e6c7 pre-commit: Add pyupgrade hook
Another day, another useful hook. We also ignore the preceding patch
that actually did the work, renaming the incorrect named file in the
process.

Change-Id: I412827761fbdeb36702ebaf5c1b727c62e629299
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-05-03 19:18:45 +01:00
OpenStack Release Bot
25f2e22429 reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.

Change-Id: Ia39713784cb393f5d2371922eb314720131561f1
2024-04-29 10:48:50 +00:00
Zuul
3950b4f7ce Merge "tests: Fix trivial sorting issue" 2024-04-26 13:08:00 +00:00
Stephen Finucane
837a3dc015 tests: Fix trivial sorting issue
We've seen an ordering issue pop up occasionally in the CI. Resolve it.

Change-Id: I4dd10268b673c260ac0894fac92cd8bea9e626f4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-25 10:34:36 +01:00
Stephen Finucane
c5b772db76 trivial: Prepare for pyupgrade pre-commit hook
This change is entirely automated save for the update of some mocks from
'io.open' to '__builtins__.open').

We are keeping this change separate from addition of the actual hook so
that we can ignore the commit later.

Change-Id: I0a9d8736632084473b57b57b693322447d7be519
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-23 12:24:23 +01:00
Zuul
3de6969dbe Merge "tox: Remove bandit skips, run via pre-commit" 2024-05-03 17:36:21 +00:00
Zuul
7f42cb84b7 Merge "tox: Add functional-pyNN jobs" 2024-05-03 17:36:20 +00:00
Stephen Finucane
0646f9b4e4 tox: Remove bandit skips, run via pre-commit
Most of these skips were unnecessary. The few that did generate warnings
could be skipped.

We also set 'skip_install' since there's no reason to build the package
for linting purposes.

Change-Id: I9644e5c19720b9c41c60e0a5882b7cd7f6a71f7b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-26 13:17:15 +01:00
Stephen Finucane
648d8df578 tox: Add functional-pyNN jobs
Let's us test with specific Python versions. We also merge the
'functional-tips' target in.

Change-Id: I08e1b3e2f4be57aec0c1cd01274d86dfec769666
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2024-04-26 13:16:48 +01:00
Stephen Finucane
ee23995004 pre-commit: Bump versions
We fold in the new black changes also.

Change-Id: I326a0529b6b9f2aa9fbc33862567131839460797
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-04-23 12:22:26 +01:00
Bence Romsics
bbe686109d
Improve output of 'server migrate --wait'
We have seen users interpret the current output ('Complete') of
'server migrate --wait' as if it meant success as well and be surprised
when later they learned that the migration was complete and failed.

This change adds a pointer to the that output, how to actually check the
success/failure of a migration, hoping to eliminate this user confusion.

Change-Id: I09030705a39405366d6202a5ac743cc4d1ddd63c
2024-04-16 10:58:42 +02:00
Zuul
a79cb608b0 Merge "Add image metadef resource type association commands 'create', 'list', 'delete'" 2024-04-15 14:01:02 +00:00
Zuul
147503f3c6 Merge "Add NUMA affinity policy options "socket"" 2024-04-15 13:00:49 +00:00
Zuul
4d30527659 Merge "Add support for showing requested az in output" 2024-04-15 13:00:47 +00:00
Zuul
c99c189ac5 Merge "Update master for stable/2024.1" 2024-04-15 13:00:45 +00:00
Zuul
c13977fd68 Merge "image cache clear: fix value of default target" 2024-04-15 13:00:43 +00:00
Zuul
7e3664ff07 Merge "Adds CLI support for `glance md-object-property-show`" 2024-04-15 13:00:41 +00:00
Zuul
54bb7477f2 Merge "Do not sort subnet dns_nameservers field" 2024-04-15 13:00:39 +00:00
Zuul
e9aa6f57c5 Merge "Identity: Properly list users in a group in 'user list' commands" 2024-04-15 13:00:37 +00:00