mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 08:03:53 +08:00
1. 修改了host-deployer 使其支持 vmware vddk 的 deploy guest fs 操作。 2. esxi agent python ==> Go fix(esxi-agent): Fix some bugs and irregular contents fix(esxi-agent): Partial parameter structure fix(esxi-agent): Add ovf template and remove some binary file fix(esxi-agent): Format Code fix(esxi-agent): fix based on reviewers' comments fix(esxi-agent): fix host-deployer because of occasional unknown panic fix: DelayTask should have a new Context fix(esxi-agent): call hostutils.DelayTask change '_interface' package to 'iagent' package fix(esxi-agent): Fix some irregular code
27 lines
656 B
Go
27 lines
656 B
Go
package diskutils
|
|
|
|
import (
|
|
comapi "yunion.io/x/onecloud/pkg/apis/compute"
|
|
"yunion.io/x/onecloud/pkg/hostman/guestfs/fsdriver"
|
|
"yunion.io/x/onecloud/pkg/hostman/hostdeployer/apis"
|
|
)
|
|
|
|
type IDisk interface {
|
|
Connect() bool
|
|
Disconnect() bool
|
|
MountRootfs() fsdriver.IRootFsDriver
|
|
UmountRootfs(driver fsdriver.IRootFsDriver)
|
|
}
|
|
|
|
func GetIDisk(params *apis.DeployParams) IDisk {
|
|
hypervisor := params.GuestDesc.Hypervisor
|
|
switch hypervisor {
|
|
case comapi.HYPERVISOR_KVM:
|
|
return NewKVMGuestDisk(params.DiskPath)
|
|
case comapi.HYPERVISOR_ESXI:
|
|
return NewVDDKDisk(params.VddkInfo, params.DiskPath)
|
|
default:
|
|
return NewKVMGuestDisk(params.DiskPath)
|
|
}
|
|
}
|