nbd

package
v0.3.10-0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: Apache-2.0 Imports: 21 Imported by: 3

Documentation

Index

Constants

View Source
const (
	PATH_TYPE_UNKNOWN = 0
	LVM_PATH          = 1
	NON_LVM_PATH      = 2
)
View Source
const MAX_TRIES = 3

Variables

This section is empty.

Functions

func Init

func Init() error

func QemuNbdConnect

func QemuNbdConnect(imageInfo qemuimg.SImageInfo, nbddev string) error

func QemuNbdDisconnect

func QemuNbdDisconnect(nbddev string) error

Types

type NBDDriver

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

func NewNBDDriver

func NewNBDDriver(imageInfo qemuimg.SImageInfo) *NBDDriver

func (*NBDDriver) Connect

func (d *NBDDriver) Connect() error

func (*NBDDriver) Disconnect

func (d *NBDDriver) Disconnect() error

func (*NBDDriver) FormatPartition

func (d *NBDDriver) FormatPartition(fs, uuid string) error

func (*NBDDriver) GetPartitions

func (d *NBDDriver) GetPartitions() []fsdriver.IDiskPartition

func (*NBDDriver) IsLVMPartition

func (d *NBDDriver) IsLVMPartition() bool

func (*NBDDriver) MakePartition

func (d *NBDDriver) MakePartition(fs string) error

func (*NBDDriver) ResizePartition

func (d *NBDDriver) ResizePartition() error

func (*NBDDriver) Zerofree

func (d *NBDDriver) Zerofree()

type SKVMGuestLVMPartition

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

func NewKVMGuestLVMPartition

func NewKVMGuestLVMPartition(partDev string, vg SVG) *SKVMGuestLVMPartition

func (*SKVMGuestLVMPartition) FindPartitions

func (p *SKVMGuestLVMPartition) FindPartitions() []*kvmpart.SKVMGuestDiskPartition

func (*SKVMGuestLVMPartition) PutdownDevice

func (p *SKVMGuestLVMPartition) PutdownDevice() bool

func (*SKVMGuestLVMPartition) SetupDevice

func (p *SKVMGuestLVMPartition) SetupDevice() bool

type SLVMImageConnectUniqueToolSet

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

func NewLVMImageConnectUniqueToolSet

func NewLVMImageConnectUniqueToolSet() *SLVMImageConnectUniqueToolSet

func (*SLVMImageConnectUniqueToolSet) Acquire

func (s *SLVMImageConnectUniqueToolSet) Acquire(imagePath string)

func (*SLVMImageConnectUniqueToolSet) CacheNonLvmImagePath

func (s *SLVMImageConnectUniqueToolSet) CacheNonLvmImagePath(imagePath string)

func (*SLVMImageConnectUniqueToolSet) GetPathType

func (s *SLVMImageConnectUniqueToolSet) GetPathType(imagePath string) int

func (*SLVMImageConnectUniqueToolSet) Release

func (s *SLVMImageConnectUniqueToolSet) Release(imagePath string)

type SNBDManager

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

func GetNBDManager

func GetNBDManager() *SNBDManager

func NewNBDManager

func NewNBDManager() (*SNBDManager, error)

func (*SNBDManager) AcquireNbddev

func (m *SNBDManager) AcquireNbddev() string

func (*SNBDManager) ReleaseNbddev

func (m *SNBDManager) ReleaseNbddev(nbddev string)

type SVG

type SVG struct {
	Id   string
	Name string
}

Jump to

Keyboard shortcuts

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