pkg/rbd: Updated for new versions of CSI/Kubernetes dependencies

This commit is contained in:
Mike Cronce
2018-11-24 14:18:24 -05:00
parent 41b30eb6c2
commit 93cb8a04d7
5 changed files with 52 additions and 47 deletions

View File

@ -24,7 +24,7 @@ import (
"github.com/golang/glog"
"golang.org/x/net/context"
"github.com/container-storage-interface/spec/lib/go/csi/v0"
"github.com/container-storage-interface/spec/lib/go/csi"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
@ -65,13 +65,13 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
if !notMnt {
return &csi.NodePublishVolumeResponse{}, nil
}
volOptions, err := getRBDVolumeOptions(req.VolumeAttributes)
volOptions, err := getRBDVolumeOptions(req.GetVolumeContext())
if err != nil {
return nil, err
}
volOptions.VolName = volName
// Mapping RBD image
devicePath, err := attachRBDImage(volOptions, volOptions.UserId, req.GetNodePublishSecrets())
devicePath, err := attachRBDImage(volOptions, volOptions.UserId, req.GetSecrets())
if err != nil {
return nil, err
}
@ -79,7 +79,7 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
fsType := req.GetVolumeCapability().GetMount().GetFsType()
readOnly := req.GetReadonly()
attrib := req.GetVolumeAttributes()
attrib := req.GetVolumeContext()
mountFlags := req.GetVolumeCapability().GetMount().GetMountFlags()
glog.V(4).Infof("target %v\nfstype %v\ndevice %v\nreadonly %v\nattributes %v\n mountflags %v\n",