api: Fetch crypto key in GetVirtualDiskInfoByUUID #3602
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.