Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing deprecated package github.com/golang/protobuf #202

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ require (
github.com/dell/goiscsi v1.9.0
github.com/dell/gounity v1.17.0
github.com/fsnotify/fsnotify v1.4.9
github.com/golang/protobuf v1.5.3
github.com/kubernetes-csi/csi-lib-utils v0.7.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/viper v1.7.1
Expand Down Expand Up @@ -40,6 +39,7 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/mock v1.4.4 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/googleapis/gnostic v0.4.1 // indirect
github.com/hashicorp/go-immutable-radix v1.2.0 // indirect
Expand Down
7 changes: 3 additions & 4 deletions service/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import (

"github.com/dell/gounity/api"
"github.com/dell/gounity/util"
"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/timestamp"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/dell/csi-unity/service/utils"
Expand Down Expand Up @@ -916,9 +915,9 @@ func (s *service) getCSISnapshots(snaps []types.Snapshot, volID, protocol, array
if snap.SnapshotContent.State == 2 {
isReady = true
}
var timestamp *timestamp.Timestamp
var timestamp *timestamppb.Timestamp
if !snap.SnapshotContent.CreationTime.IsZero() {
timestamp, _ = ptypes.TimestampProto(snap.SnapshotContent.CreationTime)
timestamp = timestamppb.New(snap.SnapshotContent.CreationTime)
}

snapID := fmt.Sprintf("%s-%s-%s-%s", snap.SnapshotContent.Name, protocol, arrayID, snap.SnapshotContent.ResourceID)
Expand Down
7 changes: 3 additions & 4 deletions service/utils/emcutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ import (
"strings"
"time"

"github.com/golang/protobuf/ptypes"
"github.com/golang/protobuf/ptypes/timestamp"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/container-storage-interface/spec/lib/go/csi"
"github.com/dell/gounity/types"
Expand Down Expand Up @@ -232,9 +231,9 @@ func GetAddresses(allowedNetworks []string, addrs []net.Addr) ([]string, error)
func GetSnapshotResponseFromSnapshot(snap *types.Snapshot, protocol, arrayID string) *csi.CreateSnapshotResponse {
content := snap.SnapshotContent
snapID := fmt.Sprintf("%s-%s-%s-%s", content.Name, protocol, arrayID, content.ResourceID)
var timestamp *timestamp.Timestamp
var timestamp *timestamppb.Timestamp
if !snap.SnapshotContent.CreationTime.IsZero() {
timestamp, _ = ptypes.TimestampProto(snap.SnapshotContent.CreationTime)
timestamp = timestamppb.New(snap.SnapshotContent.CreationTime)
}

snapReq := &csi.Snapshot{
Expand Down