virtualmachine

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsContain

func IsContain(items []string, item string) bool

Types

type IpAddr

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

type VmWare

type VmWare struct {
	IP   string
	User string
	Pwd  string
	// contains filtered or unexported fields
}

func NewVmWare

func NewVmWare(IP, User, Pwd string) *VmWare

func (*VmWare) CloneVM

func (vw *VmWare) CloneVM(TempName, Datacenter, Cluster, HostStr, Resources, Storage, VmName, SysHostName, cloneDoneVmPower, nicAddress, netMask, nicGateway string) (err error)

func (*VmWare) CloneVMPlus

func (vw *VmWare) CloneVMPlus(TempName, Datacenter, HostStr, Resources, Storage, VmName, SysHostName, cloneDoneVmPower, nicAddress, netMask, nicGateway string) (err error)

和CloneVM 可以整合为一个,这个是不需要集群,CloneVM是需要集群的克隆

func (*VmWare) CreateVM

func (vw *VmWare) CreateVM()

func (*VmWare) DestroyVM

func (vw *VmWare) DestroyVM()

func (*VmWare) GetAllCluster

func (vw *VmWare) GetAllCluster() (clusterList []structs.ClusterInfo, err error)

func (*VmWare) GetAllDatacenter

func (vw *VmWare) GetAllDatacenter() (dataCenterList []structs.DataCenter, err error)

func (*VmWare) GetAllDatastore

func (vw *VmWare) GetAllDatastore() (datastoreList []structs.DatastoreSummary, err error)

func (*VmWare) GetAllHost

func (vw *VmWare) GetAllHost() (hostList []*structs.HostSummary, err error)

func (*VmWare) GetAllNetwork

func (vw *VmWare) GetAllNetwork() (networkList []map[string]string, err error)

func (*VmWare) GetAllResourcePool

func (vw *VmWare) GetAllResourcePool() (resourceList []structs.ResourcePoolInfo, err error)

func (*VmWare) GetAllVmClient

func (vw *VmWare) GetAllVmClient() (vmList []structs.VirtualMachines, templateList []structs.TemplateInfo, err error)

func (*VmWare) GetConfigData

func (vw *VmWare) GetConfigData() (linuxResult map[string]map[string]string, err error)

func (*VmWare) GetFolder

func (vw *VmWare) GetFolder() (folderList []structs.FolderInfo, err error)

func (*VmWare) GetHostVm

func (vw *VmWare) GetHostVm() (resVm map[string][]structs.VMS, err error)

func (*VmWare) GetSourceData

func (vw *VmWare) GetSourceData() (resultSource structs.SourceInfo)

func (*VmWare) GetVMInterface

func (vw *VmWare) GetVMInterface() (interfaces [][]map[string]structs.InterfaceVM, err error)

func (*VmWare) GetVMVersion

func (vw *VmWare) GetVMVersion() (version string, err error)

func (*VmWare) GetVmIpData

func (vw *VmWare) GetVmIpData() (VmIpAddress map[string][]string, err error)

func (*VmWare) MigrateVM

func (vw *VmWare) MigrateVM()

type VmWareHttp

type VmWareHttp struct {
	SessionId string
	HostIp    string
}

func NewVmWareHttp

func NewVmWareHttp(Ip, User, Pwd string) *VmWareHttp

func (*VmWareHttp) GetVmList

func (vm *VmWareHttp) GetVmList()

Jump to

Keyboard shortcuts

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