vsphere

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloudConfigToString added in v0.8.0

func CloudConfigToString(c *CloudConfig) (string, error)

func New

New returns a VSphere provider

Types

type CloudConfig added in v0.8.0

type CloudConfig struct {
	Global    GlobalOpts
	Disk      DiskOpts
	Workspace WorkspaceOpts

	VirtualCenter map[string]*VirtualCenterConfig
}

CloudConfig is used to read and store information from the cloud configuration file

type Config

type Config struct {
	TemplateVMName string
	VMNetName      string
	Username       string
	Password       string
	VSphereURL     string
	Datacenter     string
	Cluster        string
	Folder         string
	Datastore      string
	AllowInsecure  bool
	CPUs           int32
	MemoryMB       int64
	DiskSizeGB     *int64
}

type DiskOpts added in v0.8.0

type DiskOpts struct {
	SCSIControllerType string `dcfg:"scsicontrollertype"`
}

type GlobalOpts added in v0.8.0

type GlobalOpts struct {
	User             string `gcfg:"user"`
	Password         string `gcfg:"password"`
	InsecureFlag     bool   `gcfg:"insecure-flag"`
	VCenterPort      string `gcfg:"port"`
	WorkingDir       string `gcfg:"working-dir"`
	Datacenter       string `gcfg:"datacenter"`
	DefaultDatastore string `gcfg:"datastore"`
	VCenterIP        string `gcfg:"server"`
}

type RawConfig

type RawConfig struct {
	TemplateVMName providerconfig.ConfigVarString `json:"templateVMName"`
	VMNetName      providerconfig.ConfigVarString `json:"vmNetName,omitempty"`
	Username       providerconfig.ConfigVarString `json:"username,omitempty"`
	Password       providerconfig.ConfigVarString `json:"password,omitempty"`
	VSphereURL     providerconfig.ConfigVarString `json:"vsphereURL,omitempty"`
	Datacenter     providerconfig.ConfigVarString `json:"datacenter"`
	Cluster        providerconfig.ConfigVarString `json:"cluster"`
	Folder         providerconfig.ConfigVarString `json:"folder,omitempty"`
	Datastore      providerconfig.ConfigVarString `json:"datastore"`
	CPUs           int32                          `json:"cpus"`
	MemoryMB       int64                          `json:"memoryMB"`
	DiskSizeGB     *int64                         `json:"diskSizeGB,omitempty"`
	AllowInsecure  providerconfig.ConfigVarBool   `json:"allowInsecure"`
}

type Server added in v0.7.20

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

func (Server) Addresses added in v0.7.20

func (vsphereServer Server) Addresses() []string

func (Server) ID added in v0.7.20

func (vsphereServer Server) ID() string

func (Server) Name added in v0.7.20

func (vsphereServer Server) Name() string

func (Server) Status added in v0.7.20

func (vsphereServer Server) Status() instance.Status

type Session added in v1.5.2

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

func NewSession added in v1.5.2

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

NewSession creates a vCenter client with initialized finder

func (*Session) Logout added in v1.5.2

func (s *Session) Logout()

Logout closes the idling vCenter connections

type VirtualCenterConfig added in v0.8.0

type VirtualCenterConfig struct {
	User        string `gcfg:"user"`
	Password    string `gcfg:"password"`
	VCenterPort string `gcfg:"port"`
	Datacenters string `gcfg:"datacenters"`
}

type WorkspaceOpts added in v0.8.0

type WorkspaceOpts struct {
	VCenterIP        string `gcfg:"server"`
	Datacenter       string `gcfg:"datacenter"`
	Folder           string `gcfg:"folder"`
	DefaultDatastore string `gcfg:"default-datastore"`
	ResourcePoolPath string `gcfg:"resourcepool-path"`
}

Jump to

Keyboard shortcuts

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