vbox

package
v0.0.0-...-6054725 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
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 NewProvider

func NewProvider() *Provider

NewProvider VirtualBox

func (*Provider) AttachVolume

func (p *Provider) AttachVolume(ctx *lepton.Context, image, name string, attachID int) (err error)

AttachVolume attaches a storage to an upcloud server

func (*Provider) BuildImage

func (p *Provider) BuildImage(ctx *lepton.Context) (string, error)

BuildImage creates local image

func (*Provider) BuildImageWithPackage

func (p *Provider) BuildImageWithPackage(ctx *lepton.Context, pkgpath string) (string, error)

BuildImageWithPackage creates local image using package image

func (*Provider) CreateImage

func (p *Provider) CreateImage(ctx *lepton.Context, imagePath string) error

CreateImage is a stub

func (*Provider) CreateInstance

func (p *Provider) CreateInstance(ctx *lepton.Context) (err error)

CreateInstance uses an image to launch a vm in VirtualBox

func (*Provider) CreateVolume

func (p *Provider) CreateVolume(ctx *lepton.Context, name, data, provider string) (vol lepton.NanosVolume, err error)

CreateVolume creates a local volume and uploads the volume to upcloud

func (*Provider) CustomizeImage

func (p *Provider) CustomizeImage(ctx *lepton.Context) (string, error)

CustomizeImage is a stub

func (*Provider) DeleteImage

func (p *Provider) DeleteImage(ctx *lepton.Context, imagename string) (err error)

DeleteImage removes VirtualBox image

func (*Provider) DeleteInstance

func (p *Provider) DeleteInstance(ctx *lepton.Context, instancename string) (err error)

DeleteInstance removes a vm

func (*Provider) DeleteVolume

func (p *Provider) DeleteVolume(ctx *lepton.Context, name string) (err error)

DeleteVolume deletes a volume from upcloud

func (*Provider) DetachVolume

func (p *Provider) DetachVolume(ctx *lepton.Context, image, name string) (err error)

DetachVolume detaches a storage from an upcloud server

func (*Provider) GetAllVolumes

func (p *Provider) GetAllVolumes(ctx *lepton.Context) (volumes *[]lepton.NanosVolume, err error)

GetAllVolumes returns every upcloud volume

func (*Provider) GetImages

func (p *Provider) GetImages(ctx *lepton.Context) (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

func (p *Provider) GetInstanceLogs(ctx *lepton.Context, instancename string) (string, error)

GetInstanceLogs is a stub

func (*Provider) GetInstances

func (p *Provider) GetInstances(ctx *lepton.Context) (instances []lepton.CloudInstance, err error)

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) ListImages

func (p *Provider) ListImages(ctx *lepton.Context) error

ListImages prints vcloud images in table format

func (*Provider) ListInstances

func (p *Provider) ListInstances(ctx *lepton.Context) (err error)

ListInstances prints vms list managed by VirtualBox in table

func (*Provider) PrintInstanceLogs

func (p *Provider) PrintInstanceLogs(ctx *lepton.Context, instancename string, watch bool) error

PrintInstanceLogs prints vm log on console

func (*Provider) RebootInstance

func (p *Provider) RebootInstance(ctx *lepton.Context, instanceName string) error

RebootInstance reboots the instance.

func (*Provider) ResizeImage

func (p *Provider) ResizeImage(ctx *lepton.Context, imagename string, hbytes string) error

ResizeImage is a stub

func (*Provider) StartInstance

func (p *Provider) StartInstance(ctx *lepton.Context, instancename string) (err error)

StartInstance starts a vm in VirtualBox

func (*Provider) StopInstance

func (p *Provider) StopInstance(ctx *lepton.Context, instancename string) (err error)

StopInstance stops vm in VirtualBox

func (*Provider) SyncImage

func (p *Provider) SyncImage(config *types.Config, target lepton.Provider, imagename string) error

SyncImage is a stub

Jump to

Keyboard shortcuts

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