mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Remove GetRootContext from VolumeHost
This commit is contained in:
@@ -42,17 +42,16 @@ import (
|
||||
|
||||
// fakeVolumeHost is useful for testing volume plugins.
|
||||
type fakeVolumeHost struct {
|
||||
rootDir string
|
||||
kubeClient clientset.Interface
|
||||
pluginMgr VolumePluginMgr
|
||||
cloud cloudprovider.Interface
|
||||
mounter mount.Interface
|
||||
writer io.Writer
|
||||
rootContext string
|
||||
rootDir string
|
||||
kubeClient clientset.Interface
|
||||
pluginMgr VolumePluginMgr
|
||||
cloud cloudprovider.Interface
|
||||
mounter mount.Interface
|
||||
writer io.Writer
|
||||
}
|
||||
|
||||
func NewFakeVolumeHost(rootDir string, kubeClient clientset.Interface, plugins []VolumePlugin, rootContext string) *fakeVolumeHost {
|
||||
host := &fakeVolumeHost{rootDir: rootDir, kubeClient: kubeClient, cloud: nil, rootContext: rootContext}
|
||||
func NewFakeVolumeHost(rootDir string, kubeClient clientset.Interface, plugins []VolumePlugin) *fakeVolumeHost {
|
||||
host := &fakeVolumeHost{rootDir: rootDir, kubeClient: kubeClient, cloud: nil}
|
||||
host.mounter = &mount.FakeMounter{}
|
||||
host.writer = &io.StdWriter{}
|
||||
host.pluginMgr.InitPlugins(plugins, host)
|
||||
@@ -123,10 +122,6 @@ func (f *fakeVolumeHost) GetHostIP() (net.IP, error) {
|
||||
return nil, fmt.Errorf("GetHostIP() not implemented")
|
||||
}
|
||||
|
||||
func (f *fakeVolumeHost) GetRootContext() string {
|
||||
return f.rootContext
|
||||
}
|
||||
|
||||
func (f *fakeVolumeHost) GetNodeAllocatable() (api.ResourceList, error) {
|
||||
return api.ResourceList{}, nil
|
||||
}
|
||||
@@ -743,7 +738,6 @@ func GetTestVolumePluginMgr(
|
||||
"", /* rootDir */
|
||||
nil, /* kubeClient */
|
||||
nil, /* plugins */
|
||||
"", /* rootContext */
|
||||
)
|
||||
plugins := ProbeVolumePlugins(VolumeConfig{})
|
||||
if err := v.pluginMgr.InitPlugins(plugins, v); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user