Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatacenterFromID ¶
Types ¶
type Folder ¶
type Folder struct {
// contains filtered or unexported fields
}
Folder represents an inventory folder within vSphere.
type Folders ¶
type Folders struct {
// contains filtered or unexported fields
}
func NewFolders ¶
func NewFolders(client client, logger logger) Folders
type Leftovers ¶
type Leftovers struct {
// contains filtered or unexported fields
}
func NewLeftovers ¶
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.
func (Leftovers) Delete ¶
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.
func (Leftovers) DeleteByType ¶ added in v0.55.0
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.
func (Leftovers) List ¶ added in v0.16.0
List will print all the resources that contain the provided filter in the resource's identifier.
func (Leftovers) ListByType ¶ added in v0.55.0
ListByType defaults to List.
type VirtualMachine ¶ added in v0.15.0
type VirtualMachine struct {
// contains filtered or unexported fields
}
VirtualMachine represents a vm or template in vSphere.
func NewVirtualMachine ¶ added in v0.15.0
func NewVirtualMachine(vm *object.VirtualMachine) VirtualMachine
func (VirtualMachine) Delete ¶ added in v0.15.0
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 (VirtualMachine) Name ¶ added in v0.15.0
func (v VirtualMachine) Name() string
func (VirtualMachine) Type ¶ added in v0.16.0
func (v VirtualMachine) Type() string