outscale

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Throtlling
	ThrottlingErrors = []int{503, 429}
)

Functions

func GetVersion

func GetVersion() string

func RetrieveNetFromSubnetId added in v0.2.0

func RetrieveNetFromSubnetId(d *OscDriver, subnetId string) (string, error)

Types

type CloudError added in v0.2.0

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

func (CloudError) Error added in v0.2.0

func (e CloudError) Error() string

type OscApiData

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

type OscDriver

type OscDriver struct {
	*drivers.BaseDriver

	// Stored
	Ak     string
	Sk     string
	Region string

	VmId            string
	KeypairName     string
	SecurityGroupId string
	PublicIpId      string
	PublicCloud     bool
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(hostName, storePath string) *OscDriver

NewDriver creates and returns a new instance of the Outscale driver

func (*OscDriver) Create

func (d *OscDriver) Create() error

Create a host using the driver's config

func (*OscDriver) DriverName

func (d *OscDriver) DriverName() string

DriverName returns the name of the driver

func (*OscDriver) GetCreateFlags

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

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

func (*OscDriver) GetIP

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

GetIP returns an IP or hostname that this host is available at e.g. 1.2.3.4 or docker-host-d60b70a14d3a.cloudapp.net

func (*OscDriver) GetSSHHostname

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

func (*OscDriver) GetSSHPort

func (d *OscDriver) GetSSHPort() (int, error)

GetSSHPort returns port for use with ssh

func (*OscDriver) GetSSHUsername

func (d *OscDriver) GetSSHUsername() string

GetSSHUsername returns username for use with ssh

func (*OscDriver) GetState

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

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

func (*OscDriver) GetURL

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

GetURL returns a Docker compatible host URL for connecting to this host e.g. tcp://1.2.3.4:2376

func (*OscDriver) Kill

func (d *OscDriver) Kill() error

Kill stops a host forcefully

func (*OscDriver) PreCreateCheck

func (d *OscDriver) PreCreateCheck() error

PreCreateCheck allows for pre-create operations to make sure a driver is ready for creation

func (*OscDriver) Remove

func (d *OscDriver) Remove() error

Remove a host

func (*OscDriver) Restart

func (d *OscDriver) Restart() error

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

func (*OscDriver) SetConfigFromFlags

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

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

func (*OscDriver) Start

func (d *OscDriver) Start() error

Start a host

func (*OscDriver) Stop

func (d *OscDriver) Stop() error

Stop a host gracefully

Jump to

Keyboard shortcuts

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