migrate to k8s.io/utils/strings

This commit is contained in:
danielqsj
2019-01-29 17:50:53 +08:00
parent df7e4f3d49
commit 093328e57f
75 changed files with 164 additions and 173 deletions

View File

@@ -24,10 +24,10 @@ import (
"k8s.io/apimachinery/pkg/types"
"k8s.io/klog"
"k8s.io/kubernetes/pkg/util/mount"
kstrings "k8s.io/kubernetes/pkg/util/strings"
"k8s.io/kubernetes/pkg/volume"
"k8s.io/kubernetes/pkg/volume/util"
"k8s.io/kubernetes/pkg/volume/util/volumepathhandler"
utilsstrings "k8s.io/utils/strings"
)
var _ volume.VolumePlugin = &cinderPlugin{}
@@ -163,5 +163,5 @@ func (cd *cinderVolume) GetGlobalMapPath(spec *volume.Spec) (string, error) {
// path: pods/{podUid}/volumeDevices/kubernetes.io~cinder
func (cd *cinderVolume) GetPodDeviceMapPath() (string, string) {
name := cinderVolumePluginName
return cd.plugin.host.GetPodVolumeDeviceDir(cd.podUID, kstrings.EscapeQualifiedNameForDisk(name)), cd.volName
return cd.plugin.host.GetPodVolumeDeviceDir(cd.podUID, utilsstrings.EscapeQualifiedName(name)), cd.volName
}