vsphere

package
v0.0.0-...-7b24307 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New returns a VSphere provider.

Types

type Config

type Config struct {
	TemplateVMName   string
	VMNetName        string
	Networks         []string
	Username         string
	Password         string
	VSphereURL       string
	Datacenter       string
	Cluster          string
	Folder           string
	ResourcePool     string
	Datastore        string
	DatastoreCluster string
	AllowInsecure    bool
	VMAntiAffinity   bool
	CPUs             int32
	MemoryMB         int64
	DiskSizeGB       *int64
	Tags             []tags.Tag
}

Config contains vSphere provider configuration.

type RESTSession

type RESTSession struct {
	Client *rest.Client
}

func NewRESTSession

func NewRESTSession(ctx context.Context, config *Config) (*RESTSession, error)

func (*RESTSession) Logout

func (s *RESTSession) Logout(ctx context.Context)

Logout closes the idling vCenter connections.

type Server

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

Server holds vSphere server information.

func (Server) Addresses

func (vsphereServer Server) Addresses() map[string]corev1.NodeAddressType

func (Server) ID

func (vsphereServer Server) ID() string

func (Server) Name

func (vsphereServer Server) Name() string

func (Server) ProviderID

func (vsphereServer Server) ProviderID() string

func (Server) Status

func (vsphereServer Server) Status() instance.Status

type Session

type Session struct {
	Client     *govmomi.Client
	Finder     *find.Finder
	Datacenter *object.Datacenter
}

func NewSession

func NewSession(ctx context.Context, config *Config) (*Session, error)

NewSession creates a vCenter client with initialized finder.

func (*Session) Logout

func (s *Session) Logout(ctx context.Context)

Logout closes the idling vCenter connections.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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