Documentation
¶
Index ¶
- Constants
- type Provider
- func (p *Provider) AttachVolume(ctx *lepton.Context, image, name string, attachID int) (err error)
- func (p *Provider) BuildImage(ctx *lepton.Context) (string, error)
- func (p *Provider) BuildImageWithPackage(ctx *lepton.Context, pkgpath string) (string, error)
- func (p *Provider) CreateImage(ctx *lepton.Context, imagePath string) error
- func (p *Provider) CreateInstance(ctx *lepton.Context) (err error)
- func (p *Provider) CreateVolume(ctx *lepton.Context, cv types.CloudVolume, data string, provider string) (lepton.NanosVolume, error)
- func (p *Provider) CustomizeImage(ctx *lepton.Context) (string, error)
- func (p *Provider) DeleteImage(ctx *lepton.Context, imagename string) (err error)
- func (p *Provider) DeleteInstance(ctx *lepton.Context, instancename string) (err error)
- func (p *Provider) DeleteVolume(ctx *lepton.Context, name string) (err error)
- func (p *Provider) DetachVolume(ctx *lepton.Context, image, name string) (err error)
- func (p *Provider) GetAllVolumes(ctx *lepton.Context) (volumes *[]lepton.NanosVolume, err error)
- func (p *Provider) GetImages(ctx *lepton.Context, filter string) (images []lepton.CloudImage, err error)
- func (p *Provider) GetInstanceByName(ctx *lepton.Context, name string) (instance *lepton.CloudInstance, err error)
- func (p *Provider) GetInstanceLogs(ctx *lepton.Context, instancename string) (string, error)
- func (p *Provider) GetInstances(ctx *lepton.Context) (instances []lepton.CloudInstance, err error)
- func (p *Provider) Initialize(c *types.ProviderConfig) error
- func (p *Provider) InstanceStats(ctx *lepton.Context, instancename string, watch bool) error
- func (p *Provider) ListImages(ctx *lepton.Context, filter string) error
- func (p *Provider) ListInstances(ctx *lepton.Context) (err error)
- func (p *Provider) PrintInstanceLogs(ctx *lepton.Context, instancename string, watch bool) error
- func (p *Provider) RebootInstance(ctx *lepton.Context, instanceName string) error
- func (p *Provider) ResizeImage(ctx *lepton.Context, imagename string, hbytes string) error
- func (p *Provider) StartInstance(ctx *lepton.Context, instancename string) (err error)
- func (p *Provider) StopInstance(ctx *lepton.Context, instancename string) (err error)
- func (p *Provider) SyncImage(config *types.Config, target lepton.Provider, imagename string) error
Constants ¶
const ProviderName = "vbox"
ProviderName of the cloud platform provider
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct{}
Provider to interact with VirtualBox infrastructure
func (*Provider) AttachVolume ¶
AttachVolume attaches a storage to an upcloud server
func (*Provider) BuildImage ¶
BuildImage creates local image
func (*Provider) BuildImageWithPackage ¶
BuildImageWithPackage creates local image using package image
func (*Provider) CreateImage ¶
CreateImage is a stub
func (*Provider) CreateInstance ¶
CreateInstance uses an image to launch a vm in VirtualBox
func (*Provider) CreateVolume ¶
func (p *Provider) CreateVolume(ctx *lepton.Context, cv types.CloudVolume, data string, provider string) (lepton.NanosVolume, error)
CreateVolume creates a local volume and uploads the volume to upcloud
func (*Provider) CustomizeImage ¶
CustomizeImage is a stub
func (*Provider) DeleteImage ¶
DeleteImage removes VirtualBox image
func (*Provider) DeleteInstance ¶
DeleteInstance removes a vm
func (*Provider) DeleteVolume ¶
DeleteVolume deletes a volume from upcloud
func (*Provider) DetachVolume ¶
DetachVolume detaches a storage from an upcloud server
func (*Provider) GetAllVolumes ¶
GetAllVolumes returns every upcloud volume
func (*Provider) GetImages ¶
func (p *Provider) GetImages(ctx *lepton.Context, filter string) (images []lepton.CloudImage, err error)
GetImages returns the list of images available
func (*Provider) GetInstanceByName ¶
func (p *Provider) GetInstanceByName(ctx *lepton.Context, name string) (instance *lepton.CloudInstance, err error)
GetInstanceByName returns VirtualBox vm with given name
func (*Provider) GetInstanceLogs ¶
GetInstanceLogs is a stub
func (*Provider) GetInstances ¶
GetInstances returns the list of vms managed by VirtualBox
func (*Provider) Initialize ¶
func (p *Provider) Initialize(c *types.ProviderConfig) error
Initialize checks conditions to use VirtualBox
func (*Provider) InstanceStats ¶
InstanceStats show metrics for instances on Provider
func (*Provider) ListImages ¶
ListImages prints vcloud images in table format
func (*Provider) ListInstances ¶
ListInstances prints vms list managed by VirtualBox in table
func (*Provider) PrintInstanceLogs ¶
PrintInstanceLogs prints vm log on console
func (*Provider) RebootInstance ¶
RebootInstance reboots the instance.
func (*Provider) ResizeImage ¶
ResizeImage is a stub
func (*Provider) StartInstance ¶
StartInstance starts a vm in VirtualBox
func (*Provider) StopInstance ¶
StopInstance stops vm in VirtualBox