Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: Fetch crypto key in GetVirtualDiskInfoByUUID #3602

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

akutz
Copy link
Member

@akutz akutz commented Oct 24, 2024

Description

The helper function vmdk.GetVirtualDiskInfoByUUID now returns the disk's crypto key if the disk is encrypted.

Closes: NA

How Has This Been Tested?

$ go test -v -count 1 -run TestGetVirtualDiskInfoByUUID ./vmdk
=== RUN   TestGetVirtualDiskInfoByUUID
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/diskUUID_is_empty
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/no_matching_disks
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskFlatVer2BackingInfo
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/one_encrypted_disk_w_VirtualDiskFlatVer2BackingInfo
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskSeSparseBackingInfo
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/one_encrypted_disk_w_VirtualDiskSeSparseBackingInfo
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskRawDiskMappingVer1BackingInfo
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskSparseVer2BackingInfo
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/one_encrypted_disk_w_VirtualDiskSparseVer2BackingInfo
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskRawDiskVer2BackingInfo
=== RUN   TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_multiple_chain_entries
=== RUN   TestGetVirtualDiskInfoByUUID/fetch_properties
=== RUN   TestGetVirtualDiskInfoByUUID/fetch_properties/ctx_is_nil
=== RUN   TestGetVirtualDiskInfoByUUID/fetch_properties/client_is_nil
=== RUN   TestGetVirtualDiskInfoByUUID/fetch_properties/failed_to_retrieve_properties
=== RUN   TestGetVirtualDiskInfoByUUID/fetch_properties/fetchProperties_is_false_but_cached_properties_are_missing
=== RUN   TestGetVirtualDiskInfoByUUID/fetch_properties/fetchProperties_is_true_and_cached_properties_are_stale
--- PASS: TestGetVirtualDiskInfoByUUID (0.44s)
    --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/diskUUID_is_empty (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/no_matching_disks (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskFlatVer2BackingInfo (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/one_encrypted_disk_w_VirtualDiskFlatVer2BackingInfo (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskSeSparseBackingInfo (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/one_encrypted_disk_w_VirtualDiskSeSparseBackingInfo (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskRawDiskMappingVer1BackingInfo (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskSparseVer2BackingInfo (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/one_encrypted_disk_w_VirtualDiskSparseVer2BackingInfo (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_VirtualDiskRawDiskVer2BackingInfo (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/w_cached_properties/one_disk_w_multiple_chain_entries (0.00s)
    --- PASS: TestGetVirtualDiskInfoByUUID/fetch_properties (0.44s)
        --- PASS: TestGetVirtualDiskInfoByUUID/fetch_properties/ctx_is_nil (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/fetch_properties/client_is_nil (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/fetch_properties/failed_to_retrieve_properties (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/fetch_properties/fetchProperties_is_false_but_cached_properties_are_missing (0.00s)
        --- PASS: TestGetVirtualDiskInfoByUUID/fetch_properties/fetchProperties_is_true_and_cached_properties_are_stale (0.01s)
PASS
ok  	github.com/vmware/govmomi/vmdk	0.986s

Guidelines

Please read and follow the CONTRIBUTION guidelines of this project.

The helper function vmdk.GetVirtualDiskInfoByUUID now returns the
disk's crypto key if the disk is encrypted.
Copy link
Member

@dougm dougm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks @akutz

@akutz akutz merged commit 6df5289 into vmware:main Oct 24, 2024
11 checks passed
@akutz akutz deleted the feature/include-crypto-key-in-disk-info branch October 24, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants