driver

package module
v0.0.0-...-22d1802 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildReference

func BuildReference(uuid, kind string) *v3.Reference

BuildReference create reference from defined object

Types

type HyperVDriver

type HyperVDriver struct {
	*drivers.BaseDriver
	Endpoint         string
	Username         string
	Password         string
	Port             string
	Insecure         bool
	Cluster          string
	VMVCPUs          int
	VMCores          int
	VMCPUPassthrough bool
	VMMem            int
	SSHPass          string
	Subnet           []string
	Image            string
	ImageSize        int
	VMId             string
	SessionAuth      bool
	ProxyURL         string
	Categories       []string
	StorageContainer string
	DiskSize         int
	CloudInit        string
	SerialPort       bool
	Project          string
}

HyperVDriver driver structure

func NewDriver

func NewDriver(hostname, storePath string) *HyperVDriver

NewDriver create new instance

func (*HyperVDriver) Create

func (d *HyperVDriver) Create() error

Create a host using the driver's config

func (*HyperVDriver) DriverName

func (d *HyperVDriver) DriverName() string

DriverName returns the name of the driver

func (*HyperVDriver) GetCreateFlags

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

GetCreateFlags returns the mcnflag.Flag slice representing the flags that can be set, their descriptions and defaults.

func (*HyperVDriver) GetSSHHostname

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

GetSSHHostname returns hostname for use with ssh

func (*HyperVDriver) GetState

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

GetState returns the state that the host is in (running, stopped, etc)

func (*HyperVDriver) GetURL

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

GetURL returns a Docker compatible host URL for connecting to this host

func (*HyperVDriver) Kill

func (d *HyperVDriver) Kill() error

Kill stops a host forcefully

func (*HyperVDriver) Remove

func (d *HyperVDriver) Remove() error

Remove a host

func (*HyperVDriver) Restart

func (d *HyperVDriver) Restart() error

Restart a host. This may just call Stop(); Start() if the provider does not have any special restart behaviour.

func (*HyperVDriver) SetConfigFromFlags

func (d *HyperVDriver) SetConfigFromFlags(opts drivers.DriverOptions) error

SetConfigFromFlags configures the driver with the object that was returned by RegisterCreateFlags

func (*HyperVDriver) Start

func (d *HyperVDriver) Start() error

Start a host

func (*HyperVDriver) Stop

func (d *HyperVDriver) Stop() error

Stop a host gracefully

Directories

Path Synopsis
client module

Jump to

Keyboard shortcuts

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