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>
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
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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
This patch migrates the volume attachment create, get, list,
delete, update and complete commands to SDK.
Change-Id: Ib237d25cc1c3fc72946b9d088ff3447433162130
This beats the horrible mess of mocks we have created for ourselves.
Change-Id: I8af3ce0a0b10f52e2124ec86f306327ff3474982
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
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>
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>
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>
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>
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
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
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
This patch adds support for unmanaging a volume with the
``openstack volume delete --remote`` command.
Change-Id: Id71681e817f6e56b4ef553079f0bcfac8252d3cf
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