1// +build !linux
2
3/*
4Copyright 2018 The Kubernetes Authors.
5
6Licensed under the Apache License, Version 2.0 (the "License");
7you may not use this file except in compliance with the License.
8You may obtain a copy of the License at
9
10    http://www.apache.org/licenses/LICENSE-2.0
11
12Unless required by applicable law or agreed to in writing, software
13distributed under the License is distributed on an "AS IS" BASIS,
14WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15See the License for the specific language governing permissions and
16limitations under the License.
17*/
18
19package volumepathhandler
20
21import (
22	"fmt"
23
24	"k8s.io/apimachinery/pkg/types"
25)
26
27// AttachFileDevice takes a path to a regular file and makes it available as an
28// attached block device.
29func (v VolumePathHandler) AttachFileDevice(path string) (string, error) {
30	return "", fmt.Errorf("AttachFileDevice not supported for this build.")
31}
32
33// DetachFileDevice takes a path to the attached block device and
34// detach it from block device.
35func (v VolumePathHandler) DetachFileDevice(path string) error {
36	return fmt.Errorf("DetachFileDevice not supported for this build.")
37}
38
39// GetLoopDevice returns the full path to the loop device associated with the given path.
40func (v VolumePathHandler) GetLoopDevice(path string) (string, error) {
41	return "", fmt.Errorf("GetLoopDevice not supported for this build.")
42}
43
44// FindGlobalMapPathUUIDFromPod finds {pod uuid} bind mount under globalMapPath
45// corresponding to map path symlink, and then return global map path with pod uuid.
46func (v VolumePathHandler) FindGlobalMapPathUUIDFromPod(pluginDir, mapPath string, podUID types.UID) (string, error) {
47	return "", fmt.Errorf("FindGlobalMapPathUUIDFromPod not supported for this build.")
48}
49