Commit Graph

29 Commits (master)

Author SHA1 Message Date
Eric Harney 3c6c2ee656 mypy: Cover cinder/
Fix implicit optional annotations currently
throwing errors in this file.

Change-Id: I828e0851f7d62917331d5485a820df79785afb4b
2023-06-05 14:31:04 +00:00
Zuul c210c87495 Merge "mypy: cmd/" 2022-11-18 17:00:55 +00:00
Zuul 64ec4ee747 Merge "mypy: cinder/cmd/[api,backup,scheduler,status,volume]" 2022-11-18 16:11:36 +00:00
Alan Bishop d59e41fb3c Add support for transferring encrypted volumes
A new microversion 3.70 adds the ability to transfer a volume's
encryption key when transferring a volume to another project.

When the volume transfer is initiated, the volume's encryption
secret is essentially transferred to the cinder service.
- The cinder service creates a new encryption_key_id that contains
  a copy of the volume's encryption secret.
- The volume (and its snapshots) is updated with the new
  encryption_key_id (the one owned by the cinder service).
- The volume's original encryption_key_id (owned by the volume's
  owner) is deleted.

When the transfer is accepted, the secret is transferred to the
user accepting the transfer.
- A new encryption_key_id is generated on behalf of the new user
  that contains a copy of the volume's encryption secret.
- The volume (and its snapshots) is updated with the new
  encryption_key_id (the one owned by the user).
- The intermediate encryption_key_id owned by the cinder service
  is deleted.

When a transfer is cancelled (deleted), the same process is used
to transfer ownship back to the user that cancelled the transfer.

Implements: blueprint transfer-encrypted-volume
Change-Id: I459f06504e90025c9c0b539981d3d56a2a9394c7
2022-08-26 06:32:41 -07:00
Eric Harney 64489722d5 mypy: cmd/
Change-Id: Iadc48face76e3ab930d76821d0e15ad76178fd71
2022-08-22 14:56:09 +00:00
Eric Harney b6fdb10f35 mypy: cinder/cmd/[api,backup,scheduler,status,volume]
Add type annotations to these cmd files.

Change-Id: I5205d706a5d05e33930353cd5f324980fcb6308a
2022-08-22 14:56:02 +00:00
Zuul a2deecef89 Merge "mypy:" 2022-07-06 18:04:33 +00:00
Eric Harney 9eccdc2fa8 mypy: cinder/api/
Change-Id: I37efff41b49254fe2c4943a2ce722f5e3546c43d
2022-07-05 14:26:35 +00:00
Eric Harney 4c24a3a54c mypy: api_utils
Add coverage for cinder/api/api_utils.

Change-Id: I57913aa8669c30a1e60e704ff8e946cb1eef5213
2022-06-21 10:54:21 -04:00
Eric Harney e6a264e4ad mypy:
Change-Id: Iab6db48ae180fb17b5e8ebd7d462c22a7fa2ab49
2022-05-23 11:08:25 -04:00
Eric Harney 04b6700f48 mypy: cinder/volume/
Change-Id: I89fc0f75d4839fedc4fc771e6d23b9526109cf4a
2022-05-23 10:36:17 -04:00
Zuul eb6ba62473 Merge "mypy: annotate remotefs" 2022-05-12 15:49:45 +00:00
Eric Harney 7b05eabac8 mypy: annotate remotefs
cinder/volume/drivers/ error: Too few arguments for

Change-Id: I0b02fe48fe47af36e4692df78ec3d30f8897618c
2022-05-10 14:55:04 -04:00
Zuul 4f73ff9209 Merge "mypy:" 2022-05-04 17:11:49 +00:00
Eric Harney 07e0156c20 mypy: ceph backup driver
Change-Id: I81da9ae38f03012d2589f8352135652fed338e84
2022-03-21 12:56:39 -04:00
Eric Harney 42810d1a3c mypy:
Change-Id: I4a65b530253715f2cc6f27a27d7a02cf4f21f01a
2022-02-02 09:19:17 -05:00
Eric Harney efd476c74e mypy: RBD driver
Change-Id: I4f8e4c13e678912ce5a3105dc21ea81d1b53bf9a
2022-01-27 11:03:17 -05:00
Eric Harney ce34288e47 mypy: backup
Change-Id: I8ee0e214eb1c1fe5a26304055737dd36cefec6ec
2021-12-15 09:04:52 -05:00
Zuul cf7c2fcc75 Merge "mypy: annotate volume/" 2021-12-14 17:40:39 +00:00
Eric Harney 80dc6c9158 mypy: annotate volume/
Change-Id: I19a47c463dfb8794ebbeda78f39c962e47ad0d93
2021-12-02 14:56:47 -05:00
Eric Harney 5df7daabee mypy: filter scheduler
Change-Id: I426bb8cc4a01b64b2551f36fd0004bb03aa53e47
2021-11-08 09:43:00 -05:00
Eric Harney 61335da5bc mypy:
Change-Id: Iad0b5c7e689b2e524071322bfa59e789e1cc42a1
2021-08-17 14:50:46 +00:00
Eric Harney b5ac2af0c2 mypy: continued manager, scheduler, rpcapi
Change-Id: I9a8d24ac27af8fe4864934d1b9bc5b66da6d2c1e
2021-08-11 08:36:09 -04:00
Eric Harney 8c46c09ad5 mypy: image cache
Change-Id: Iebb002cba51fc0f5e42565151a1687da20bd5a24
2021-08-10 10:26:39 -04:00
Eric Harney b10f71e429 mypy: create_volume flows
Change-Id: I1641ccbbaaac4ee0745071c847f0829235616e04
2021-08-10 10:26:39 -04:00
Eric Harney 334485dc5f mypy: image_utils
Change-Id: Ib32e58125be3a2b6d05488807c83d48e920cf57d
2021-06-30 20:35:49 +00:00
Eric Harney 8953340820 mypy: annotate volume_utils / utils / exc
Change-Id: I886600b1712f4c9415e59cea7166289c0870e58c
2021-04-30 10:41:30 -04:00
Eric Harney 698ab86a74 mypy: annotate volume manager
This is just a first pass to get things

Change-Id: I67ac3df632a34729646e7b037205327696818a22
2021-02-10 12:27:47 -05:00
Eric Harney 6e53c264b6 Add mypy tox env
Add a "mypy" tox environment which runs mypy
type checking against Cinder code.

Taken from Stephen Finucane's Nova work at

Added "show_error_codes" and "pretty" options.

Generates an html report in ./mypy-report/

This adds stubs for oslo.i18n, so that _() calls
are annotated as intended.  It may be possible to
do this with less .pyi files carried along here.

Change-Id: I2589d22c1f16f2e177d34730a520591743c0c1e3
2020-10-14 08:24:13 -04:00