mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
rebase: remove protobuf dependency locking
this commit remove the protobuf dependency locking in the module description. Also, ptypes.TimestampProto is deprecated and this commit make use of the timestamppb.New() for the construction. ParseTime() function has been removed and callers adjusted to the same. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
d772fc098c
commit
71c4ae542c
@ -35,8 +35,8 @@ import (
|
||||
librbd "github.com/ceph/go-ceph/rbd"
|
||||
"github.com/ceph/go-ceph/rbd/admin"
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
"k8s.io/cloud-provider/volume/helpers"
|
||||
mount "k8s.io/mount-utils"
|
||||
@ -1599,11 +1599,7 @@ func (ri *rbdImage) getImageInfo() error {
|
||||
return err
|
||||
}
|
||||
t := time.Unix(tm.Sec, tm.Nsec)
|
||||
protoTime, err := ptypes.TimestampProto(t)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ri.CreatedAt = protoTime
|
||||
ri.CreatedAt = timestamppb.New(t)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user