vmwarevsphere

package
v0.15.0-rancher114 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// B2DUser is the guest User for
	// tools login
	B2DUser = "docker"
	// B2DPass is the guest Pass for tools login
	B2DPass      = "tcuser"
	B2DUserGroup = "staff"
)
View Source
const (
	WindowsMachineOS = "windows"
)

Variables

This section is empty.

Functions

func NewDriver

func NewDriver(hostName, storePath string) drivers.Driver

Types

type AuthFlag added in v0.5.5

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

func NewAuthFlag

func NewAuthFlag(u, p string) *AuthFlag

func (*AuthFlag) Auth added in v0.5.5

type Driver

type Driver struct {
	*drivers.BaseDriver
	Memory         int
	DiskSize       int
	CPU            int
	ISO            string
	Boot2DockerURL string
	CPUS           int
	MachineId      string

	IP                      string
	Port                    int
	Username                string
	Password                string
	Network                 string
	Networks                []string
	Tags                    []string
	CustomAttributes        []string
	Datastore               string
	DatastoreCluster        string
	Datacenter              string
	Folder                  string
	Pool                    string
	HostSystem              string
	CfgParams               []string
	CloudInit               string
	CloudConfig             string
	VAppIpProtocol          string
	VAppIpAllocationPolicy  string
	VAppTransport           string
	VAppProperties          []string
	CreationType            string
	ContentLibrary          string
	CloneFrom               string
	SSHPassword             string
	SSHUserGroup            string
	OS                      string
	GracefulShutdownTimeout int
	// contains filtered or unexported fields
}

func (*Driver) CheckMachineOS

func (d *Driver) CheckMachineOS(os string) bool

func (*Driver) Create

func (d *Driver) Create() error

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName returns the name of the driver

func (*Driver) GetCreateFlags added in v0.5.0

func (d *Driver) GetCreateFlags() []mcnflag.Flag

func (*Driver) GetIP

func (d *Driver) GetIP() (string, error)

func (*Driver) GetMachineId

func (d *Driver) GetMachineId() (string, error)

func (*Driver) GetSSHHostname added in v0.2.0

func (d *Driver) GetSSHHostname() (string, error)

func (*Driver) GetSSHUsername added in v0.2.0

func (d *Driver) GetSSHUsername() string

func (*Driver) GetState

func (d *Driver) GetState() (state.State, error)

func (*Driver) GetURL

func (d *Driver) GetURL() (string, error)

func (*Driver) Kill

func (d *Driver) Kill() error

func (*Driver) PreCreateCheck

func (d *Driver) PreCreateCheck() error

PreCreateCheck checks that the machine creation process can be started safely.

func (*Driver) Remove

func (d *Driver) Remove() error

Remove removes a VM in vSphere. It will perform a graceful shutdown on the Guest OS if the GracefulShutdownTimeout is greater than zero; It will perform a power off if either the GracefulShutdownTimeout is zero or a graceful shutdown times out.

func (*Driver) Restart

func (d *Driver) Restart() error

func (*Driver) SetConfigFromFlags

func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error

func (*Driver) SetMachineOSFromFlags

func (d *Driver) SetMachineOSFromFlags(flags drivers.DriverOptions) error

func (*Driver) Start

func (d *Driver) Start() error

func (*Driver) Stop

func (d *Driver) Stop() error

func (*Driver) UnmarshalJSON

func (d *Driver) UnmarshalJSON(data []byte) error

UnmarshalJSON loads driver config from JSON. This function is used by the RPCServerDriver that wraps all drivers as a means of populating an already-initialized driver with new configuration. See `RPCServerDriver.SetConfigRaw`.

func (*Driver) Upgrade

func (d *Driver) Upgrade() error

type FileAttrFlag added in v0.5.5

type FileAttrFlag struct {
	types.GuestPosixFileAttributes
}

func (*FileAttrFlag) Attr added in v0.5.5

func (*FileAttrFlag) SetPerms added in v0.5.5

func (f *FileAttrFlag) SetPerms(owner, group, perms int)

type LogProvider

type LogProvider struct {
}

func (*LogProvider) Flush

func (s *LogProvider) Flush()

func (*LogProvider) NewFile

func (s *LogProvider) NewFile(p string) io.WriteCloser

type LogWriterCloser

type LogWriterCloser struct {
}

func NewLogWriterCloser

func NewLogWriterCloser() *LogWriterCloser

func (*LogWriterCloser) Close

func (lwc *LogWriterCloser) Close() error

func (*LogWriterCloser) Write

func (lwc *LogWriterCloser) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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