Skip to content

Fix Structure of VolumeSnapshot.SourceVolume#82

Merged
alakae merged 4 commits intomasterfrom
alain/source-volume-stub
May 4, 2026
Merged

Fix Structure of VolumeSnapshot.SourceVolume#82
alakae merged 4 commits intomasterfrom
alain/source-volume-stub

Conversation

@alakae
Copy link
Copy Markdown
Contributor

@alakae alakae commented Apr 29, 2026

Two related struct fixes, both proven by failing integration tests first.

SourceVolumeStub (VolumeSnapshot.SourceVolume) — the API returns only href, uuid, name in source_volume. Reusing VolumeStub there was structurally wrong. Introduces SourceVolumeStub matching the actual API shape;
VolumeSnapshot.SourceVolume is updated to use it.

VolumeStub (Server.Volumes) — the API returns href, uuid, name, type, size_gb. VolumeStub was missing href/name and carried a device_path field the API never returns. Both are corrected.

Breaking changes → requires v9.

alakae added 4 commits April 29, 2026 07:01
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.
Copy link
Copy Markdown
Contributor

@mweibel mweibel left a comment

Choose a reason for hiding this comment

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

requires new major release. LGTM.

@alakae alakae merged commit b7ca0c2 into master May 4, 2026
1 check passed
@alakae alakae deleted the alain/source-volume-stub branch May 4, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants