mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
rbd: have GetCreationTime() return a time.Time struct
Do not use protobuf types when there is no need. Just use the standard time.Time format instead. Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
2fd92573f4
commit
6d1ab1b8d9
@ -32,6 +32,7 @@ import (
|
||||
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -1240,7 +1241,7 @@ func (cs *ControllerServer) CreateSnapshot(
|
||||
SizeBytes: vol.VolSize,
|
||||
SnapshotId: vol.VolID,
|
||||
SourceVolumeId: req.GetSourceVolumeId(),
|
||||
CreationTime: vol.CreatedAt,
|
||||
CreationTime: timestamppb.New(*vol.CreatedAt),
|
||||
ReadyToUse: true,
|
||||
},
|
||||
}, nil
|
||||
@ -1300,7 +1301,7 @@ func cloneFromSnapshot(
|
||||
SizeBytes: rbdSnap.VolSize,
|
||||
SnapshotId: rbdSnap.VolID,
|
||||
SourceVolumeId: rbdSnap.SourceVolumeID,
|
||||
CreationTime: rbdSnap.CreatedAt,
|
||||
CreationTime: timestamppb.New(*rbdSnap.CreatedAt),
|
||||
ReadyToUse: true,
|
||||
},
|
||||
}, nil
|
||||
|
Reference in New Issue
Block a user