import "github.com/genevievelesperance/leftovers/vsphere"
client.go folder.go folders.go helpers.go leftovers.go logger.go virtual_machine.go
type Client struct {
// contains filtered or unexported fields
}
type Folder struct {
// contains filtered or unexported fields
}
Folder represents an inventory folder within vSphere.
type Folders struct {
// contains filtered or unexported fields
}
List not only lists top-level folders, it also lists child and grandchild folders, and all VMs within those folders.
type Leftovers struct {
// contains filtered or unexported fields
}
func NewLeftovers(logger logger, vCenterIP, vCenterUser, vCenterPassword, vCenterDC string) (Leftovers, error)
NewLeftovers returns a new Leftovers for vSphere that can be used to list resources, list types, or delete resources for the provided account. It returns an error if the credentials provided are invalid or a client cannot be created.
Delete will collect all resources that contain the provided filter in the resource's identifier, prompt you to confirm deletion (if enabled), and delete those that are selected.
DeleteByType will collect all resources of the provied type that contain the provided filter in the resource's identifier, prompt you to confirm deletion, and delete those that are selected.
List will print all the resources that contain the provided filter in the resource's identifier.
ListByType defaults to List.
Types will print all the resource types that can be deleted on this IaaS.
type VirtualMachine struct {
// contains filtered or unexported fields
}
VirtualMachine represents a vm or template in vSphere.
func NewVirtualMachine(vm *object.VirtualMachine) VirtualMachine
func (v VirtualMachine) Delete() error
Delete will shut off a VM, if it is powered on or suspended, and will delete a VM or template from inventory.
func (v VirtualMachine) Name() string
func (v VirtualMachine) Type() string
Package vsphere imports 12 packages (graph). Updated 2019-09-30. Refresh now. Tools for package owners.