4243 Commits

Author SHA1 Message Date
Zuul
b223156906 Merge "Remove python-novaclient" 2024-07-18 18:03:28 +00:00
Zuul
70fbf687cf Merge "quota: Migrate 'quota *' to SDK" 2024-07-18 17:53:24 +00:00
Zuul
2d59c675dd Merge "quota: Split up 'quota list' command" 2024-07-18 13:35:21 +00:00
Zuul
692b06dfd5 Merge "quota: Default network quotas to not force" 2024-07-18 13:35:19 +00:00
Stephen Finucane
438e40db36 Remove python-novaclient
There are a few remnants left here but this is trivial to clean up now.

Change-Id: I517d906796338e64a31afa08b9ee6909b08e0115
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-18 13:28:51 +01:00
Zuul
97bded1a3d Merge "quota: Add 'quota set --default' option" 2024-07-18 11:26:26 +00:00
Stephen Finucane
6127b44d0a quota: Migrate 'quota *' to SDK
This is done for both the compute and block storage services. The
network service was already using SDK.

Change-Id: Id7a6943b8b4d7d1330e7d7f13705f027d1b67189
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/923864
2024-07-15 18:19:43 +01:00
Zuul
45ac2b62fb Merge "quota: Remove deprecated quota options" 2024-07-15 16:17:47 +00:00
Zuul
cf81902402 Merge "quota: Move nova-network-related quota" 2024-07-15 16:02:25 +00:00
Zuul
716dff1052 Merge "tests: Remove references to novaclient methods" 2024-07-15 15:15:03 +00:00
Zuul
7219144dae Merge "network: Replace use of in-tree API client" 2024-07-15 15:01:18 +00:00
Zuul
e08cf1790f Merge "compute: Migrate 'server create' to SDK" 2024-07-15 15:01:16 +00:00
Zuul
c78cba654a Merge "compute: Prevent use of conflicting v*-fixed-ip for 'server create --nic'" 2024-07-15 13:12:58 +00:00
Zuul
1b8eabee4e Merge "compute: Migrate 'server evacuate' to SDK" 2024-07-15 13:05:00 +00:00
Zuul
f58f85857b Merge "compute: Migrate remaining server actions to SDK" 2024-07-15 13:04:59 +00:00
Zuul
c18eab5198 Merge "compute: Migrate 'server rebuild' to SDK" 2024-07-15 13:04:57 +00:00
Zuul
855686a881 Merge "compute: Avoid third API call during 'server show'" 2024-07-15 13:00:11 +00:00
Zuul
f1a3fc319d Merge "compute: Always use SDK client to display server" 2024-07-15 13:00:07 +00:00
Zuul
5898f13473 Merge "compute: Migrate 'server set', 'server unset' commands" 2024-07-15 13:00:02 +00:00
Zuul
816f4857dc Merge "compute: Migrate 'server migrate' to SDK" 2024-07-15 12:59:58 +00:00
Zuul
8b783fd8ad Merge "compute: Migrate 'server add/remove security group' to SDK" 2024-07-15 12:59:54 +00:00
Zuul
10b448351d Merge "common: Migrate 'limits show' to SDK" 2024-07-15 12:59:52 +00:00
Zuul
2733b3413d Merge "identity: Migrate 'service' commands to SDK" 2024-07-12 14:07:22 +00:00
Zuul
7de15cee16 Merge "identity: Migrate 'application credential' commands to SDK" 2024-07-12 13:54:38 +00:00
Stephen Finucane
b4f30a1583 quota: Split up 'quota list' command
This is really three separate commands rolled into one. Split the logic
up more to simplify it somewhat.

Change-Id: Ief3c3c413f791dda076f90e5ec76a033d3a9e12b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-11 11:34:24 +01:00
Stephen Finucane
da7eda66e9 quota: Default network quotas to not force
The existing default behavior has been deprecated for over a 18 months
(change I25828a3d68e2e900f498e17a0d01fb70be77548e). It's time for a new
default.

Change-Id: Iaf4fa931dcbf16c22933f63629c6a4d443ac5310
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-11 11:34:02 +01:00
Stephen Finucane
7d8baa87bb quota: Add 'quota set --default' option
This should have been added as a counterpart to the 'quota show
--default' option way back when we added that. Better late than never!

Change-Id: I0e3719e585353664fea6f23ec658a330086db3df
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-11 11:21:24 +01:00
Stephen Finucane
ba2d2358e6 quota: Remove deprecated quota options
These are all deprecated for over 18 months (change
I0dd38e5cb252a01d5817ed168be040b21b35e348). It's time to remove them and
simplify this code.

Change-Id: I9ee3bfebbad21eec3eb1b475a813bcbc450edea4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>

Change-Id: Ibdd329a6db8bd176af065d7f5190f0901d3c3f8d
2024-07-11 11:10:11 +01:00
Stephen Finucane
f5f543b8de quota: Move nova-network-related quota
This was incorrectly grouped as a general compute quota, when in fact
it's a nova-network quota. Move it.

Change-Id: If93c95bc181ab766137b61943a09821810345300
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-10 12:16:16 +01:00
Stephen Finucane
75b9214f6c tests: Remove references to novaclient methods
These should have been cleaned up as we went but weren't. Fix things
now.

Change-Id: I80b29c0fd6e4f557c2efc45474279306f50c4fd7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-09 18:19:36 +01:00
Stephen Finucane
209f8e9e17 network: Replace use of in-tree API client
None of these are actually supported by openstacksdk (intentionally so)
so we add our own manual implementations.

Change-Id: Ifd24f04ae4d1e56e0ce5ba0afe63828403bb7a6f
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-09 18:19:36 +01:00
Stephen Finucane
30a64579b6 compute: Migrate 'server create' to SDK
The final step. Future changes will clean up the remnants of the
novaclient usage. This is a rather large patch, owing to the number of
things that novaclient was handling for us which SDK does not, but the
combination of unit and functional tests mean we should be handling
all of these differences.

Change-Id: I623e8c772235438a3d1590e1bbd832748d6e62ea
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-09 18:17:22 +01:00
Antonia Gaete
bef8a7a630 identity: Migrate 'application credential' commands to SDK
Change-Id: Iba3fee2672d32266623c6f367beaabe84bd3d24e
2024-07-09 15:19:38 +00:00
Antonia Gaete
717f242881 identity: Migrate 'service' commands to SDK
Change-Id: I37d07a6c5cdc98680b8d65d596521cad2b049500
2024-07-09 15:09:37 +00:00
Stephen Finucane
d22f26446a compute: Prevent use of conflicting v*-fixed-ip for 'server create --nic'
Currently this check is handled by novaclient. In the future, we won't
have that so we need to do it ourselves. Do so now, fixing a typo along
the way and adding tests to prevent regressions.

Change-Id: Iaa9c087d846390b6a4f95ed3fa121dd8dc640903
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-09 14:35:05 +01:00
Stephen Finucane
e6dc0f39c0 compute: Migrate 'server evacuate' to SDK
Change-Id: I8ea2da0921c5fd306271f03fa733c0f9787afb82
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/918745
2024-07-08 16:07:07 +01:00
Stephen Finucane
b9b5e7615a compute: Migrate remaining server actions to SDK
Migrate the following commands:

- 'server delete'
- 'server rescue'
- 'server unrescue'
- 'server resize'
- 'server resize confirm'
- 'server resize revert'
- 'server migrate confirm'
- 'server migrate revert'
- 'server remove fixed ip' ('server add fixed ip' was already migrated)
- 'server ssh'

That leaves a few commands to migrate, all of which are called out with
TODOs.

Change-Id: Idb769a93609da522c458e719bc69a63ff2ab107b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 16:06:59 +01:00
Stephen Finucane
8d904a9efb compute: Migrate 'server rebuild' to SDK
Change-Id: Ic7cdb05327a4a74364f08451e531d02c631b7633
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/918730
2024-07-08 11:07:09 +00:00
Stephen Finucane
2057462120 compute: Avoid third API call during 'server show'
We can use a detailed list instead when looking up by name. We also
improve tests somewhat.

Change-Id: I18b38e7fbcac813190b304c4d67d8ea03d8c1a80
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 11:06:11 +00:00
Stephen Finucane
628ac48901 compute: Always use SDK client to display server
This affects the 'server create', 'server show', 'server rebuild' and
'server set' commands. We also fix a few mistakes around the fields
shown.

Change-Id: I9946e12146efff39f9ba1591c90a4a9bccd46919
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 12:00:49 +01:00
Stephen Finucane
bcaf2ab559 compute: Migrate 'server set', 'server unset' commands
Change-Id: I2c249e9ca3952100dcf7f97fcafa879b733d34c6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 10:30:44 +01:00
Stephen Finucane
c8621e5b8b compute: Migrate 'server migrate' to SDK
Change-Id: I56d31c2fd4f8bf19eedd8f9eecd8a41cdafc5b55
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 10:30:44 +01:00
Stephen Finucane
abef798f30 compute: Migrate 'server add/remove security group' to SDK
We need to work around SDK's (intentional) lack of support for Nova's
deprecated '/os-security-groups' API but it's nothing too crazy.

Change-Id: I03ca1a73f98aa77b288148607baff336dae69fb1
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 10:30:44 +01:00
whoami-rajat
9d39437282 common: Migrate 'limits show' to SDK
This is done for both the compute and block storage services even though
the compute service hasn't supported rate limits since API v2.1 was
introduced [1].

[1] https://github.com/openstack/nova/commit/ca4ec762804

Change-Id: Idd9f4a1c23952a6087f08c03ac8b5bebd5a0c86d
Co-authored-by: Stephen Finucane <stephenfin@redhat.com>
Depends-on: https://review.opendev.org/c/openstack/openstacksdk/+/918519
2024-07-08 10:30:36 +01:00
Stephen Finucane
55cbb84e60 volume: Migrate 'volume list' to compute SDK
Change-Id: Iae662aa6b391ba6ae5f569184c7d19fb3654be35
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 09:59:21 +01:00
whoami-rajat
9f30ee9af2 volume: Migrate 'volume attachment *' to SDK
This patch migrates the volume attachment create, get, list,
delete, update and complete commands to SDK.

Change-Id: Ib237d25cc1c3fc72946b9d088ff3447433162130
2024-07-08 09:59:21 +01:00
Stephen Finucane
402327f2e4 tests: Migrate to 'set_xxx_api_version' helpers
Clean things up somewhat.

Change-Id: I868f496fc8285a28e8fd551377f2ae6228051d19
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 09:59:21 +01:00
Stephen Finucane
88fffeabd7 tests: Add ability to configure fake server API version
This beats the horrible mess of mocks we have created for ourselves.

Change-Id: I8af3ce0a0b10f52e2124ec86f306327ff3474982
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 09:59:21 +01:00
Stephen Finucane
3f624295ec volume: Add v3-specific volume transfer module
This makes testing easier.

Change-Id: I515aa54750439a6c4ad5b16cffe004ba1c7cf5b2
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 09:59:21 +01:00
Stephen Finucane
f1f390f2ae volume: add v3-specific volume type module
This makes testing easier.

Change-Id: If1ed8d5003160e45d503971ae722fd9983d3dd6d
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2024-07-08 09:59:21 +01:00