2017-11-14 10:30:00 -05:00
|
|
|
// +build !linux
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
Copyright 2017 The Kubernetes Authors.
|
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
*/
|
|
|
|
|
|
2019-04-11 14:19:55 -04:00
|
|
|
package exec
|
2017-11-14 10:30:00 -05:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"errors"
|
2019-04-11 14:19:55 -04:00
|
|
|
|
|
|
|
|
"k8s.io/kubernetes/pkg/util/mount"
|
2017-11-14 10:30:00 -05:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type execMounter struct{}
|
|
|
|
|
|
2019-05-09 18:15:42 -04:00
|
|
|
var _ = mount.Interface(&execMounter{})
|
|
|
|
|
|
2019-04-11 15:22:14 -04:00
|
|
|
// NewExecMounter returns a mounter that uses provided Exec interface to mount and
|
2017-11-14 10:30:00 -05:00
|
|
|
// unmount a filesystem. For all other calls it uses a wrapped mounter.
|
2019-04-11 14:19:55 -04:00
|
|
|
func NewExecMounter(exec mount.Exec, wrapped mount.Interface) mount.Interface {
|
2017-11-14 10:30:00 -05:00
|
|
|
return &execMounter{}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (mounter *execMounter) Mount(source string, target string, fstype string, options []string) error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (mounter *execMounter) Unmount(target string) error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
2019-04-11 14:19:55 -04:00
|
|
|
func (mounter *execMounter) List() ([]mount.MountPoint, error) {
|
|
|
|
|
return []mount.MountPoint{}, nil
|
2017-11-14 10:30:00 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (mounter *execMounter) IsLikelyNotMountPoint(file string) (bool, error) {
|
|
|
|
|
return true, nil
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-20 03:26:31 -04:00
|
|
|
func (mounter *execMounter) GetMountRefs(pathname string) ([]string, error) {
|
|
|
|
|
return nil, errors.New("not implemented")
|
|
|
|
|
}
|