hotplug_volume

package
v1.0.0-beta.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Overview

* This file is part of the KubeVirt project * * 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. * * Copyright 2021 Red Hat, Inc. *

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSystems added in v0.43.0

type FileSystems struct {
	Filesystems []FindmntInfo `json:"filesystems"`
}

type FindmntInfo added in v0.43.0

type FindmntInfo struct {
	Target  string `json:"target"`
	Source  string `json:"source"`
	Fstype  string `json:"fstype"`
	Options string `json:"options"`
}

func LookupFindmntInfoByDevice added in v0.43.0

func LookupFindmntInfoByDevice(deviceName string) ([]FindmntInfo, error)

func LookupFindmntInfoByVolume added in v0.43.0

func LookupFindmntInfoByVolume(volumeName string, pid int) ([]FindmntInfo, error)

func (*FindmntInfo) GetOptions added in v0.43.0

func (f *FindmntInfo) GetOptions() []string

func (*FindmntInfo) GetSourceDevice added in v0.44.2

func (f *FindmntInfo) GetSourceDevice() string

func (*FindmntInfo) GetSourcePath added in v0.44.2

func (f *FindmntInfo) GetSourcePath() string

type MockVolumeMounter

type MockVolumeMounter struct {
	// contains filtered or unexported fields
}

Mock of VolumeMounter interface

func NewMockVolumeMounter

func NewMockVolumeMounter(ctrl *gomock.Controller) *MockVolumeMounter

func (*MockVolumeMounter) EXPECT

func (_m *MockVolumeMounter) EXPECT() *_MockVolumeMounterRecorder

func (*MockVolumeMounter) IsMounted

func (_m *MockVolumeMounter) IsMounted(vmi *v1.VirtualMachineInstance, volume string, sourceUID types.UID) (bool, error)

func (*MockVolumeMounter) Mount

func (*MockVolumeMounter) MountFromPod added in v0.44.1

func (_m *MockVolumeMounter) MountFromPod(vmi *v1.VirtualMachineInstance, sourceUID types.UID) error

func (*MockVolumeMounter) Unmount

func (*MockVolumeMounter) UnmountAll

func (_m *MockVolumeMounter) UnmountAll(vmi *v1.VirtualMachineInstance) error

type VolumeMounter

type VolumeMounter interface {
	// Mount any new volumes defined in the VMI
	Mount(vmi *v1.VirtualMachineInstance) error
	MountFromPod(vmi *v1.VirtualMachineInstance, sourceUID types.UID) error
	// Unmount any volumes no longer defined in the VMI
	Unmount(vmi *v1.VirtualMachineInstance) error
	//UnmountAll cleans up all hotplug volumes
	UnmountAll(vmi *v1.VirtualMachineInstance) error
	//IsMounted returns if the volume is mounted or not.
	IsMounted(vmi *v1.VirtualMachineInstance, volume string, sourceUID types.UID) (bool, error)
}

VolumeMounter is the interface used to mount and unmount volumes to/from a running virtlauncher pod.

func NewVolumeMounter

func NewVolumeMounter(mountStateDir string, kubeletPodsDir string) VolumeMounter

NewVolumeMounter creates a new VolumeMounter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL