Documentation ¶
Index ¶
- Constants
- func Init() error
- func QemuNbdConnect(imageInfo qemuimg.SImageInfo, nbddev string) error
- func QemuNbdDisconnect(nbddev string) error
- type NBDDriver
- func (d *NBDDriver) Connect(*apis.GuestDesc) error
- func (d *NBDDriver) DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error)
- func (d *NBDDriver) DetectIsUEFISupport(rootfs fsdriver.IRootFsDriver) bool
- func (d *NBDDriver) Disconnect() error
- func (d *NBDDriver) FormatFs(req *apis.FormatFsParams) (*apis.Empty, error)
- func (d *NBDDriver) FormatPartition(fs, uuid string) error
- func (d *NBDDriver) GetPartitions() []fsdriver.IDiskPartition
- func (d *NBDDriver) IsLVMPartition() bool
- func (d *NBDDriver) MakePartition(fs string) error
- func (d *NBDDriver) MountRootfs(readonly bool) (fsdriver.IRootFsDriver, error)
- func (d *NBDDriver) ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error)
- func (d *NBDDriver) ResizeFs() (*apis.Empty, error)
- func (d *NBDDriver) ResizePartition() error
- func (d *NBDDriver) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
- func (d *NBDDriver) UmountRootfs(fd fsdriver.IRootFsDriver) error
- func (d *NBDDriver) Zerofree()
- type SImageProp
- type SKVMGuestLVMPartition
- type SLVMImageConnectUniqueToolSet
- type SNBDManager
- type SVG
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 QemuNbdConnect ¶
func QemuNbdConnect(imageInfo qemuimg.SImageInfo, nbddev string) error
func QemuNbdDisconnect ¶
Types ¶
type NBDDriver ¶
type NBDDriver struct {
// contains filtered or unexported fields
}
func NewNBDDriver ¶
func NewNBDDriver(imageInfo qemuimg.SImageInfo) *NBDDriver
func (*NBDDriver) DeployGuestfs ¶
func (d *NBDDriver) DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error)
func (*NBDDriver) DetectIsUEFISupport ¶
func (d *NBDDriver) DetectIsUEFISupport(rootfs fsdriver.IRootFsDriver) bool
func (*NBDDriver) Disconnect ¶
func (*NBDDriver) FormatPartition ¶
func (*NBDDriver) GetPartitions ¶
func (d *NBDDriver) GetPartitions() []fsdriver.IDiskPartition
func (*NBDDriver) IsLVMPartition ¶
func (*NBDDriver) MakePartition ¶
func (*NBDDriver) MountRootfs ¶
func (d *NBDDriver) MountRootfs(readonly bool) (fsdriver.IRootFsDriver, error)
func (*NBDDriver) ProbeImageInfo ¶
func (*NBDDriver) ResizePartition ¶
func (*NBDDriver) SaveToGlance ¶
func (d *NBDDriver) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
func (*NBDDriver) UmountRootfs ¶
func (d *NBDDriver) UmountRootfs(fd fsdriver.IRootFsDriver) error
type SImageProp ¶
type SImageProp struct { HasLVMPartition bool // contains filtered or unexported fields }
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
func (*SKVMGuestLVMPartition) UmountPartitions ¶
func (p *SKVMGuestLVMPartition) UmountPartitions() error
type SLVMImageConnectUniqueToolSet ¶
func NewLVMImageConnectUniqueToolSet ¶
func NewLVMImageConnectUniqueToolSet() *SLVMImageConnectUniqueToolSet
func (*SLVMImageConnectUniqueToolSet) Acquire ¶
func (s *SLVMImageConnectUniqueToolSet) Acquire(imagePath string) (int, *sync.Mutex)
func (*SLVMImageConnectUniqueToolSet) CacheNonLvmImagePath ¶
func (s *SLVMImageConnectUniqueToolSet) CacheNonLvmImagePath(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)
Click to show internal directories.
Click to hide internal directories.