Move escape function to util and clarify name

This commit is contained in:
markturansky
2015-03-24 10:39:51 -04:00
parent a4c02d8ede
commit 2fd82f60f4
9 changed files with 50 additions and 23 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/types"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
)
// fakeVolumeHost is useful for testing volume plugins.
@@ -117,7 +118,7 @@ func (fv *FakeVolume) SetUpAt(dir string) error {
}
func (fv *FakeVolume) GetPath() string {
return path.Join(fv.Plugin.Host.GetPodVolumeDir(fv.PodUID, EscapePluginName(fv.Plugin.PluginName), fv.VolName))
return path.Join(fv.Plugin.Host.GetPodVolumeDir(fv.PodUID, util.EscapeQualifiedNameForDisk(fv.Plugin.PluginName), fv.VolName))
}
func (fv *FakeVolume) TearDown() error {