Documentation ¶
Index ¶
- Constants
- Variables
- type Command
- type DiskParams
- type IDisk
- type SKVMGuestDisk
- func (d *SKVMGuestDisk) Cleanup()
- func (d *SKVMGuestDisk) Connect(guestDesc *apis.GuestDesc) error
- func (d *SKVMGuestDisk) DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error)
- func (d *SKVMGuestDisk) Disconnect() error
- func (d *SKVMGuestDisk) FormatFs(req *apis.FormatFsParams) (*apis.Empty, error)
- func (d *SKVMGuestDisk) IsLVMPartition() bool
- func (d *SKVMGuestDisk) MountKvmRootfs() (fsdriver.IRootFsDriver, error)
- func (d *SKVMGuestDisk) MountKvmRootfsReadOnly() (fsdriver.IRootFsDriver, error)
- func (d *SKVMGuestDisk) MountRootfs() (fsdriver.IRootFsDriver, error)
- func (d *SKVMGuestDisk) ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error)
- func (d *SKVMGuestDisk) ResizeFs() (*apis.Empty, error)
- func (d *SKVMGuestDisk) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
- func (d *SKVMGuestDisk) UmountKvmRootfs(fd fsdriver.IRootFsDriver) error
- func (d *SKVMGuestDisk) UmountRootfs(fd fsdriver.IRootFsDriver) error
- type VDDKDisk
- func (vd *VDDKDisk) Cleanup()
- func (vd *VDDKDisk) Connect(*apis.GuestDesc) error
- func (vd *VDDKDisk) ConnectBlockDevice() (string, error)
- func (vd *VDDKDisk) DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error)
- func (vd *VDDKDisk) Disconnect() error
- func (vd *VDDKDisk) DisconnectBlockDevice() error
- func (vd *VDDKDisk) ExecProg() error
- func (d *VDDKDisk) FormatFs(req *apis.FormatFsParams) (*apis.Empty, error)
- func (vd *VDDKDisk) Mount() (err error)
- func (vd *VDDKDisk) MountRootfs() (fsdriver.IRootFsDriver, error)
- func (vd *VDDKDisk) ParsePartitions(buf string) error
- func (d *VDDKDisk) ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error)
- func (d *VDDKDisk) ResizeFs() (*apis.Empty, error)
- func (d *VDDKDisk) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
- func (vd *VDDKDisk) Umount() error
- func (vd *VDDKDisk) UmountRootfs(fd fsdriver.IRootFsDriver) error
- func (vd *VDDKDisk) WaitMounted() error
- type VDDKPartition
- func (vp *VDDKPartition) GetPartDev() string
- func (vp *VDDKPartition) GetPhysicalPartitionType() string
- func (vp *VDDKPartition) IsMounted() bool
- func (vp *VDDKPartition) IsReadonly() bool
- func (vp *VDDKPartition) Mount() bool
- func (vp *VDDKPartition) MountPartReadOnly() bool
- func (vp *VDDKPartition) Umount() error
- func (vp *VDDKPartition) Zerofree()
Constants ¶
View Source
const (
TMPDIR = "/tmp/vmware-root"
)
Variables ¶
View Source
var (
MNT_PATTERN = regexp.MustCompile(`Disk flat file mounted under ([^\s]+)`)
)
Functions ¶
This section is empty.
Types ¶
type Command ¶
func NewCommand ¶
type DiskParams ¶
type DiskParams struct { Hypervisor string DiskInfo qemuimg.SImageInfo VddkInfo *apis.VDDKConInfo }
type IDisk ¶
type IDisk interface { Connect(desc *apis.GuestDesc) error Disconnect() error MountRootfs() (fsdriver.IRootFsDriver, error) UmountRootfs(driver fsdriver.IRootFsDriver) error Cleanup() DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error) ResizeFs() (res *apis.Empty, err error) FormatFs(req *apis.FormatFsParams) (*apis.Empty, error) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error) ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error) }
type SKVMGuestDisk ¶
type SKVMGuestDisk struct {
// contains filtered or unexported fields
}
func NewKVMGuestDisk ¶
func NewKVMGuestDisk(imageInfo qemuimg.SImageInfo, driver string, readOnly bool) (*SKVMGuestDisk, error)
func (*SKVMGuestDisk) Cleanup ¶
func (d *SKVMGuestDisk) Cleanup()
func (*SKVMGuestDisk) DeployGuestfs ¶
func (d *SKVMGuestDisk) DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error)
func (*SKVMGuestDisk) Disconnect ¶
func (d *SKVMGuestDisk) Disconnect() error
func (*SKVMGuestDisk) FormatFs ¶
func (d *SKVMGuestDisk) FormatFs(req *apis.FormatFsParams) (*apis.Empty, error)
func (*SKVMGuestDisk) IsLVMPartition ¶
func (d *SKVMGuestDisk) IsLVMPartition() bool
func (*SKVMGuestDisk) MountKvmRootfs ¶
func (d *SKVMGuestDisk) MountKvmRootfs() (fsdriver.IRootFsDriver, error)
func (*SKVMGuestDisk) MountKvmRootfsReadOnly ¶
func (d *SKVMGuestDisk) MountKvmRootfsReadOnly() (fsdriver.IRootFsDriver, error)
func (*SKVMGuestDisk) MountRootfs ¶
func (d *SKVMGuestDisk) MountRootfs() (fsdriver.IRootFsDriver, error)
func (*SKVMGuestDisk) ProbeImageInfo ¶
func (d *SKVMGuestDisk) ProbeImageInfo(req *apis.ProbeImageInfoPramas) (*apis.ImageInfo, error)
func (*SKVMGuestDisk) SaveToGlance ¶
func (d *SKVMGuestDisk) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
func (*SKVMGuestDisk) UmountKvmRootfs ¶
func (d *SKVMGuestDisk) UmountKvmRootfs(fd fsdriver.IRootFsDriver) error
func (*SKVMGuestDisk) UmountRootfs ¶
func (d *SKVMGuestDisk) UmountRootfs(fd fsdriver.IRootFsDriver) error
type VDDKDisk ¶
type VDDKDisk struct { Host string Port int User string Passwd string VmRef string DiskPath string FUseDir string PartDirs []string Proc *Command Pid int // contains filtered or unexported fields }
func NewVDDKDisk ¶
func (*VDDKDisk) ConnectBlockDevice ¶
connect vddk disk as fuse block device on local host return fuse device path, is null error
func (*VDDKDisk) DeployGuestfs ¶
func (vd *VDDKDisk) DeployGuestfs(req *apis.DeployParams) (res *apis.DeployGuestFsResponse, err error)
func (*VDDKDisk) Disconnect ¶
func (*VDDKDisk) DisconnectBlockDevice ¶
func (*VDDKDisk) MountRootfs ¶
func (vd *VDDKDisk) MountRootfs() (fsdriver.IRootFsDriver, error)
func (*VDDKDisk) ParsePartitions ¶
func (*VDDKDisk) ProbeImageInfo ¶
func (*VDDKDisk) SaveToGlance ¶
func (d *VDDKDisk) SaveToGlance(req *apis.SaveToGlanceParams) (*apis.SaveToGlanceResponse, error)
func (*VDDKDisk) UmountRootfs ¶
func (vd *VDDKDisk) UmountRootfs(fd fsdriver.IRootFsDriver) error
func (*VDDKDisk) WaitMounted ¶
type VDDKPartition ¶
type VDDKPartition struct {
*kvmpart.SLocalGuestFS
}
func (*VDDKPartition) GetPartDev ¶
func (vp *VDDKPartition) GetPartDev() string
func (*VDDKPartition) GetPhysicalPartitionType ¶
func (vp *VDDKPartition) GetPhysicalPartitionType() string
func (*VDDKPartition) IsMounted ¶
func (vp *VDDKPartition) IsMounted() bool
func (*VDDKPartition) IsReadonly ¶
func (vp *VDDKPartition) IsReadonly() bool
func (*VDDKPartition) Mount ¶
func (vp *VDDKPartition) Mount() bool
func (*VDDKPartition) MountPartReadOnly ¶
func (vp *VDDKPartition) MountPartReadOnly() bool
func (*VDDKPartition) Umount ¶
func (vp *VDDKPartition) Umount() error
func (*VDDKPartition) Zerofree ¶
func (vp *VDDKPartition) Zerofree()
Click to show internal directories.
Click to hide internal directories.