vcenter_manager

package
v0.0.0-...-fd40943 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientCreator

type ClientCreator struct {
}

func (*ClientCreator) NewClient

func (g *ClientCreator) NewClient(ctx context.Context, rt soap.RoundTripper) (*vim25.Client, error)

type FactoryConfig

type FactoryConfig struct {
	VCenterServer  string
	Username       string
	Password       string
	ClientCreator  Vim25ClientCreator
	FinderCreator  FinderCreator
	RootCACertPath string
}

type Finder

type Finder interface {
	VirtualMachine(ctx context.Context, path string) (*object.VirtualMachine, error)
	DatacenterOrDefault(ctx context.Context, path string) (*object.Datacenter, error)
	ResourcePoolOrDefault(ctx context.Context, path string) (*object.ResourcePool, error)
	SetDatacenter(dc *object.Datacenter) *find.Finder
	FolderOrDefault(ctx context.Context, path string) (*object.Folder, error)
}

type FinderCreator

type FinderCreator interface {
	NewFinder(client *vim25.Client, all bool) *find.Finder
}

type GovmomiClient

type GovmomiClient interface {
	Login(ctx context.Context, u *url.Userinfo) error
}

type GovmomiFinderCreator

type GovmomiFinderCreator struct {
}

func (*GovmomiFinderCreator) NewFinder

func (g *GovmomiFinderCreator) NewFinder(client *vim25.Client, all bool) *find.Finder

type ManagerFactory

type ManagerFactory struct {
	Config FactoryConfig
}

func (*ManagerFactory) SetConfig

func (f *ManagerFactory) SetConfig(config FactoryConfig)

func (*ManagerFactory) VCenterManager

func (f *ManagerFactory) VCenterManager(ctx context.Context) (*VCenterManager, error)

type OpsManager

type OpsManager interface {
	ProcessManager(ctx context.Context) (*guest.ProcessManager, error)
	FileManager(ctx context.Context) (*guest.FileManager, error)
}

type VCenterManager

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

func NewVCenterManager

func NewVCenterManager(govmomiClient GovmomiClient, vimClient *vim25.Client, finder Finder, username, password string) (*VCenterManager, error)

func (*VCenterManager) CloneVM

func (v *VCenterManager) CloneVM(ctx context.Context, vm *object.VirtualMachine, clonePath string) error

CloneVM clones vm to clonePath. It currently does no network configuration (i.e. there is no IP assigned)

func (*VCenterManager) FindVM

func (v *VCenterManager) FindVM(ctx context.Context, inventoryPath string) (*object.VirtualMachine, error)

func (*VCenterManager) GuestManager

func (v *VCenterManager) GuestManager(ctx context.Context, opsManager OpsManager, username, password string) (*guest_manager.GuestManager, error)

func (*VCenterManager) Login

func (v *VCenterManager) Login(ctx context.Context) error

func (*VCenterManager) OperationsManager

func (v *VCenterManager) OperationsManager(ctx context.Context, vm *object.VirtualMachine) *guest.OperationsManager

type Vim25ClientCreator

type Vim25ClientCreator interface {
	NewClient(ctx context.Context, rt soap.RoundTripper) (*vim25.Client, error)
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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