volume_path_handler_unsupported.go 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // +build !linux
  2. /*
  3. Copyright 2018 The Kubernetes Authors.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. */
  14. package volumepathhandler
  15. import (
  16. "fmt"
  17. )
  18. // AttachFileDevice takes a path to a regular file and makes it available as an
  19. // attached block device.
  20. func (v VolumePathHandler) AttachFileDevice(path string) (string, error) {
  21. return "", fmt.Errorf("AttachFileDevice not supported for this build.")
  22. }
  23. // GetLoopDevice returns the full path to the loop device associated with the given path.
  24. func (v VolumePathHandler) GetLoopDevice(path string) (string, error) {
  25. return "", fmt.Errorf("GetLoopDevice not supported for this build.")
  26. }
  27. // RemoveLoopDevice removes specified loopback device
  28. func (v VolumePathHandler) RemoveLoopDevice(device string) error {
  29. return fmt.Errorf("RemoveLoopDevice not supported for this build.")
  30. }