Skip to content

Commit 7d3bdf0

Browse files
leonardocenixpanic
authored andcommitted
Set groupsnapshotid field in ListSnapshot response
1 parent 3b83da7 commit 7d3bdf0

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

pkg/hostpath/controllerserver.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -644,11 +644,12 @@ func (hp *hostPath) ListSnapshots(ctx context.Context, req *csi.ListSnapshotsReq
644644

645645
for _, snap := range hpSnapshots {
646646
snapshot := csi.Snapshot{
647-
SnapshotId: snap.Id,
648-
SourceVolumeId: snap.VolID,
649-
CreationTime: snap.CreationTime,
650-
SizeBytes: snap.SizeBytes,
651-
ReadyToUse: snap.ReadyToUse,
647+
SnapshotId: snap.Id,
648+
SourceVolumeId: snap.VolID,
649+
CreationTime: snap.CreationTime,
650+
SizeBytes: snap.SizeBytes,
651+
ReadyToUse: snap.ReadyToUse,
652+
GroupSnapshotId: snap.GroupSnapshotID,
652653
}
653654
snapshots = append(snapshots, snapshot)
654655
}
@@ -760,11 +761,12 @@ func convertSnapshot(snap state.Snapshot) *csi.ListSnapshotsResponse {
760761
entries := []*csi.ListSnapshotsResponse_Entry{
761762
{
762763
Snapshot: &csi.Snapshot{
763-
SnapshotId: snap.Id,
764-
SourceVolumeId: snap.VolID,
765-
CreationTime: snap.CreationTime,
766-
SizeBytes: snap.SizeBytes,
767-
ReadyToUse: snap.ReadyToUse,
764+
SnapshotId: snap.Id,
765+
SourceVolumeId: snap.VolID,
766+
CreationTime: snap.CreationTime,
767+
SizeBytes: snap.SizeBytes,
768+
ReadyToUse: snap.ReadyToUse,
769+
GroupSnapshotId: snap.GroupSnapshotID,
768770
},
769771
},
770772
}

0 commit comments

Comments
 (0)