Documentation ¶
Index ¶
- type ClientCreator
- type FactoryConfig
- type Finder
- type FinderCreator
- type GovmomiClient
- type GovmomiFinderCreator
- type ManagerFactory
- type OpsManager
- type VCenterManager
- func (v *VCenterManager) CloneVM(ctx context.Context, vm *object.VirtualMachine, clonePath string) error
- func (v *VCenterManager) FindVM(ctx context.Context, inventoryPath string) (*object.VirtualMachine, error)
- func (v *VCenterManager) GuestManager(ctx context.Context, opsManager OpsManager, username, password string) (*guest_manager.GuestManager, error)
- func (v *VCenterManager) Login(ctx context.Context) error
- func (v *VCenterManager) OperationsManager(ctx context.Context, vm *object.VirtualMachine) *guest.OperationsManager
- type Vim25ClientCreator
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 GovmomiClient ¶
type GovmomiFinderCreator ¶
type GovmomiFinderCreator struct { }
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) OperationsManager ¶
func (v *VCenterManager) OperationsManager(ctx context.Context, vm *object.VirtualMachine) *guest.OperationsManager
type Vim25ClientCreator ¶
Click to show internal directories.
Click to hide internal directories.