fibre channel: Remove unused exe interface
This commit is contained in:
		@@ -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,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user