Fix Structure of VolumeSnapshot.SourceVolume#82
Merged
Conversation
VolumeStub lacks Name and HREF fields, so the integration test cannot compile when referencing these fields from VolumeSnapshot.SourceVolume.
…t.SourceVolume VolumeStub was structurally wrong for the source_volume context: the API returns only href/uuid/name there, while VolumeStub carries type/device_path/size_gb. The new SourceVolumeStub matches the actual API shape.
VolumeStub lacks HREF and Name fields, so the integration test cannot compile when checking these fields on Server.Volumes entries.
Add HREF and Name, remove DevicePath which the API does not return. Update the DeepEqual assertion in TestIntegrationServer_MultipleVolumes to zero out instance-specific fields before comparing.
mweibel
approved these changes
May 4, 2026
Contributor
mweibel
left a comment
There was a problem hiding this comment.
requires new major release. LGTM.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Two related struct fixes, both proven by failing integration tests first.
SourceVolumeStub (VolumeSnapshot.SourceVolume) — the API returns only
href,uuid,nameinsource_volume. ReusingVolumeStubthere was structurally wrong. IntroducesSourceVolumeStubmatching the actual API shape;VolumeSnapshot.SourceVolumeis updated to use it.VolumeStub (Server.Volumes) — the API returns
href,uuid,name,type,size_gb.VolumeStubwas missinghref/nameand carried adevice_pathfield the API never returns. Both are corrected.Breaking changes → requires v9.