Merge pull request #81187 from codenrhoden/rename-newosexec

Rename mount.NewOsExec to mount.NewOSExec
This commit is contained in:
Kubernetes Prow Robot 2019-08-09 22:17:13 -07:00 committed by GitHub
commit d816998bd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 11 deletions

View File

@ -24,7 +24,7 @@ import (
"time" "time"
authenticationv1 "k8s.io/api/authentication/v1" authenticationv1 "k8s.io/api/authentication/v1"
"k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors" apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/labels"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
@ -779,7 +779,7 @@ func (adc *attachDetachController) DeleteServiceAccountTokenFunc() func(types.UI
} }
func (adc *attachDetachController) GetExec(pluginName string) mount.Exec { func (adc *attachDetachController) GetExec(pluginName string) mount.Exec {
return mount.NewOsExec() return mount.NewOSExec()
} }
func (adc *attachDetachController) addNodeToDswp(node *v1.Node, nodeName types.NodeName) { func (adc *attachDetachController) addNodeToDswp(node *v1.Node, nodeName types.NodeName) {

View File

@ -24,7 +24,7 @@ import (
"k8s.io/klog" "k8s.io/klog"
authenticationv1 "k8s.io/api/authentication/v1" authenticationv1 "k8s.io/api/authentication/v1"
"k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/runtime" "k8s.io/apimachinery/pkg/util/runtime"
@ -374,7 +374,7 @@ func (expc *expandController) GetMounter(pluginName string) mount.Interface {
} }
func (expc *expandController) GetExec(pluginName string) mount.Exec { func (expc *expandController) GetExec(pluginName string) mount.Exec {
return mount.NewOsExec() return mount.NewOSExec()
} }
func (expc *expandController) GetHostName() string { func (expc *expandController) GetHostName() string {

View File

@ -21,7 +21,7 @@ import (
"net" "net"
authenticationv1 "k8s.io/api/authentication/v1" authenticationv1 "k8s.io/api/authentication/v1"
"k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
clientset "k8s.io/client-go/kubernetes" clientset "k8s.io/client-go/kubernetes"
"k8s.io/client-go/tools/record" "k8s.io/client-go/tools/record"
@ -117,7 +117,7 @@ func (ctrl *PersistentVolumeController) DeleteServiceAccountTokenFunc() func(typ
} }
func (adc *PersistentVolumeController) GetExec(pluginName string) mount.Exec { func (adc *PersistentVolumeController) GetExec(pluginName string) mount.Exec {
return mount.NewOsExec() return mount.NewOSExec()
} }
func (ctrl *PersistentVolumeController) GetNodeLabels() (map[string]string, error) { func (ctrl *PersistentVolumeController) GetNodeLabels() (map[string]string, error) {

View File

@ -24,7 +24,7 @@ import (
"k8s.io/klog" "k8s.io/klog"
authenticationv1 "k8s.io/api/authentication/v1" authenticationv1 "k8s.io/api/authentication/v1"
"k8s.io/api/core/v1" v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/util/wait" "k8s.io/apimachinery/pkg/util/wait"
utilfeature "k8s.io/apiserver/pkg/util/feature" utilfeature "k8s.io/apiserver/pkg/util/feature"
@ -294,7 +294,7 @@ func (kvh *kubeletVolumeHost) GetExec(pluginName string) mount.Exec {
exec = nil exec = nil
} }
if exec == nil { if exec == nil {
return mount.NewOsExec() return mount.NewOSExec()
} }
return exec return exec
} }

View File

@ -18,8 +18,8 @@ package mount
import "k8s.io/utils/exec" import "k8s.io/utils/exec"
// NewOsExec returns a new Exec interface implementation based on exec() // NewOSExec returns a new Exec interface implementation based on exec()
func NewOsExec() Exec { func NewOSExec() Exec {
return &osExec{} return &osExec{}
} }

View File

@ -125,7 +125,7 @@ func TestIoHandler(t *testing.T) {
if runtime.GOOS != "windows" && runtime.GOOS != "linux" { if runtime.GOOS != "windows" && runtime.GOOS != "linux" {
t.Skipf("TestIoHandler not supported on GOOS=%s", runtime.GOOS) t.Skipf("TestIoHandler not supported on GOOS=%s", runtime.GOOS)
} }
disk, err := findDiskByLun(lun, &fakeIOHandler{}, mount.NewOsExec()) disk, err := findDiskByLun(lun, &fakeIOHandler{}, mount.NewOSExec())
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
if err != nil { if err != nil {
t.Errorf("no data disk found: disk %v err %v", disk, err) t.Errorf("no data disk found: disk %v err %v", disk, err)