mirror of https://github.com/k3s-io/k3s
Merge pull request #51105 from jsafrane/exec-fc
Automatic merge from submit-queue (batch tested with PRs 51105, 51097, 51110, 50843, 51107) fibre channel: Remove unused exe interface **What this PR does / why we need it**: `execCommand` is not used anywhere, let's remove it and associated `exe` field from several structs. @kubernetes/sig-storage-pr-reviews **Release note**: ```release-note NONE ```pull/6/head
commit
ac2d24b46e
|
@ -24,7 +24,6 @@ go_library(
|
|||
"//vendor/github.com/golang/glog:go_default_library",
|
||||
"//vendor/k8s.io/api/core/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
|
||||
"//vendor/k8s.io/utils/exec:go_default_library",
|
||||
],
|
||||
)
|
||||
|
||||
|
|
|
@ -29,13 +29,11 @@ import (
|
|||
"k8s.io/kubernetes/pkg/volume"
|
||||
volumeutil "k8s.io/kubernetes/pkg/volume/util"
|
||||
"k8s.io/kubernetes/pkg/volume/util/volumehelper"
|
||||
"k8s.io/utils/exec"
|
||||
)
|
||||
|
||||
type fcAttacher struct {
|
||||
host volume.VolumeHost
|
||||
manager diskManager
|
||||
exe exec.Interface
|
||||
}
|
||||
|
||||
var _ volume.Attacher = &fcAttacher{}
|
||||
|
@ -46,7 +44,6 @@ func (plugin *fcPlugin) NewAttacher() (volume.Attacher, error) {
|
|||
return &fcAttacher{
|
||||
host: plugin.host,
|
||||
manager: &FCUtil{},
|
||||
exe: exec.New(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@ -126,7 +123,6 @@ func (attacher *fcAttacher) MountDevice(spec *volume.Spec, devicePath string, de
|
|||
type fcDetacher struct {
|
||||
mounter mount.Interface
|
||||
manager diskManager
|
||||
exe exec.Interface
|
||||
}
|
||||
|
||||
var _ volume.Detacher = &fcDetacher{}
|
||||
|
@ -135,7 +131,6 @@ func (plugin *fcPlugin) NewDetacher() (volume.Detacher, error) {
|
|||
return &fcDetacher{
|
||||
mounter: plugin.host.GetMounter(plugin.GetPluginName()),
|
||||
manager: &FCUtil{},
|
||||
exe: exec.New(),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
@ -28,17 +28,15 @@ import (
|
|||
utilstrings "k8s.io/kubernetes/pkg/util/strings"
|
||||
"k8s.io/kubernetes/pkg/volume"
|
||||
"k8s.io/kubernetes/pkg/volume/util"
|
||||
"k8s.io/utils/exec"
|
||||
)
|
||||
|
||||
// This is the primary entrypoint for volume plugins.
|
||||
func ProbeVolumePlugins() []volume.VolumePlugin {
|
||||
return []volume.VolumePlugin{&fcPlugin{nil, exec.New()}}
|
||||
return []volume.VolumePlugin{&fcPlugin{nil}}
|
||||
}
|
||||
|
||||
type fcPlugin struct {
|
||||
host volume.VolumeHost
|
||||
exe exec.Interface
|
||||
}
|
||||
|
||||
var _ volume.VolumePlugin = &fcPlugin{}
|
||||
|
@ -160,11 +158,6 @@ func (plugin *fcPlugin) newUnmounterInternal(volName string, podUID types.UID, m
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (plugin *fcPlugin) execCommand(command string, args []string) ([]byte, error) {
|
||||
cmd := plugin.exe.Command(command, args...)
|
||||
return cmd.CombinedOutput()
|
||||
}
|
||||
|
||||
func (plugin *fcPlugin) ConstructVolumeSpec(volumeName, mountPath string) (*volume.Spec, error) {
|
||||
fcVolume := &v1.Volume{
|
||||
Name: volumeName,
|
||||
|
|
Loading…
Reference in New Issue