Skip to content

Commit

Permalink
Merge pull request #202 from dell/remove-deprecated-pkg
Browse files Browse the repository at this point in the history
Removing deprecated package github.com/golang/protobuf
  • Loading branch information
suryagupta4 authored Apr 22, 2024
2 parents 33a4cfb + 641214d commit 0ecb693
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
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

0 comments on commit 0ecb693

Please sign in to comment.