Documentation ¶
Index ¶
- func Clone(client *govmomi.Client, dc *object.Datacenter, vlans []*vlan.LocalList, ...) (err error)
- func Create(client *govmomi.Client, dc *object.Datacenter, Path string) (folderObject *object.Folder, err error)
- func CreateSingleFolder(client *govmomi.Client, dc *object.Datacenter, Path string) (*object.Folder, error)
- func CreateSnapshot(client *govmomi.Client, dc *object.Datacenter, Path, SnapshotName string, ...) error
- func Delete(client *govmomi.Client, dc *object.Datacenter, Path string, ...) error
- func Exists(client *govmomi.Client, dc *object.Datacenter, Path string) bool
- func FromID(client *govmomi.Client, id string) (*object.Folder, error)
- func Get(client *govmomi.Client, dc *object.Datacenter, Path string) (*object.Folder, error)
- func GetChildrenFromPath(client *govmomi.Client, dc *object.Datacenter, Path string) ([]*object.Folder, error)
- func GetVmObjectsFromPath(client *govmomi.Client, dc *object.Datacenter, Path string) (vmObjects []*object.VirtualMachine, err error)
- func HasChildren(f *object.Folder) (bool, error)
- func ListFolderItems(client *govmomi.Client, dc *object.Datacenter, Path, Type string) (*[]string, error)
- func ListSubFolders(client *govmomi.Client, dc *object.Datacenter, Path string) (*[]string, error)
- func ListVirtualMachinesInFolder(client *govmomi.Client, dc *object.Datacenter, Path string) (*[]string, error)
- func ReStart(client *govmomi.Client, dc *object.Datacenter, Path string, ...) (err error)
- func Start(client *govmomi.Client, dc *object.Datacenter, Path string, ...) (err error)
- func Stop(client *govmomi.Client, dc *object.Datacenter, Path string, ...) (err error)
- type FileSystemItem
- func (fileSystem *FileSystemItem) Create(client *govmomi.Client, dc *object.Datacenter, vlans []*vlan.LocalList, ...) (err error)
- func (fileSystem *FileSystemItem) GetVmObjects() []*object.VirtualMachine
- func (fileSystem *FileSystemItem) RecursiveCountVmObjects(NumberOfVms uint) uint
- func (fileSystem *FileSystemItem) RecursiveGetVmObjects(vmArray []*object.VirtualMachine, vmCounter int) ([]*object.VirtualMachine, int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
func Clone(client *govmomi.Client, dc *object.Datacenter, vlans []*vlan.LocalList, Path, newPath, pool string, vmTemplate bool, status *taskstatus.Status) (err error)
Clone Wil clone all items in the speciefied folder and all it's subfolders
func Create ¶
func Create(client *govmomi.Client, dc *object.Datacenter, Path string) (folderObject *object.Folder, err error)
CreateFolder Creates the full folder path spaeciefied
func CreateSingleFolder ¶
func CreateSingleFolder(client *govmomi.Client, dc *object.Datacenter, Path string) (*object.Folder, error)
CreateFolder only creates last subfolder, it fails if the path doesnt exist
func CreateSnapshot ¶
func Delete ¶
func Delete(client *govmomi.Client, dc *object.Datacenter, Path string, status *taskstatus.Status) error
func Get ¶
GetFolder returns an *object.Folder from a given absolute path. If no such folder is found, an appropriate error will be returned.
func GetChildrenFromPath ¶
func GetVmObjectsFromPath ¶
func GetVmObjectsFromPath(client *govmomi.Client, dc *object.Datacenter, Path string) (vmObjects []*object.VirtualMachine, err error)
func ListFolderItems ¶
func ListSubFolders ¶
func ReStart ¶
func ReStart(client *govmomi.Client, dc *object.Datacenter, Path string, status *taskstatus.Status) (err error)
Restarts all the virtualmachines in the folder and subfolders
func Start ¶
func Start(client *govmomi.Client, dc *object.Datacenter, Path string, status *taskstatus.Status) (err error)
Starts all the virtualmachines in the folder and subfolders
func Stop ¶
func Stop(client *govmomi.Client, dc *object.Datacenter, Path string, status *taskstatus.Status) (err error)
Stops all the virtualmachines in the folder and subfolders
Types ¶
type FileSystemItem ¶
type FileSystemItem struct { Name string Subitems []*FileSystemItem Folder *object.Folder VirtualMachine *object.VirtualMachine }
func ReadFileSystem ¶
func ReadFileSystem(client *govmomi.Client, dc *object.Datacenter, Path string) (*FileSystemItem, error)
func (*FileSystemItem) Create ¶
func (fileSystem *FileSystemItem) Create(client *govmomi.Client, dc *object.Datacenter, vlans []*vlan.LocalList, basefolder, pool string, vmTemplate bool, status *taskstatus.Status) (err error)
func (*FileSystemItem) GetVmObjects ¶
func (fileSystem *FileSystemItem) GetVmObjects() []*object.VirtualMachine
func (*FileSystemItem) RecursiveCountVmObjects ¶
func (fileSystem *FileSystemItem) RecursiveCountVmObjects(NumberOfVms uint) uint
this function recursivly calls itself to count all VirtualMachines in the filesystem
func (*FileSystemItem) RecursiveGetVmObjects ¶
func (fileSystem *FileSystemItem) RecursiveGetVmObjects(vmArray []*object.VirtualMachine, vmCounter int) ([]*object.VirtualMachine, int)
Click to show internal directories.
Click to hide internal directories.