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) 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) GetInstanceByID(ctx *lepton.Context, id string) (instance *lepton.CloudInstance, 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
- type Service
Constants ¶
const ProviderName = "upcloud"
ProviderName of the cloud platform provider
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider provides access to the UpCloud API.
func NewProviderWithService ¶
NewProviderWithService returns an instance of Upcloud provider and initializes upcloud service
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 creates a storage object and upload image
func (*Provider) CreateInstance ¶
CreateInstance uses a template to launch a server in upcloud
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 upcloud image
func (*Provider) DeleteInstance ¶
DeleteInstance removes server
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) GetInstanceByID ¶
func (p *Provider) GetInstanceByID(ctx *lepton.Context, id string) (instance *lepton.CloudInstance, err error)
GetInstanceByID return a upcloud server details with ID specified
func (*Provider) GetInstanceByName ¶
func (p *Provider) GetInstanceByName(ctx *lepton.Context, name string) (instance *lepton.CloudInstance, err error)
GetInstanceByName returns upcloud instance with given name
func (*Provider) GetInstanceLogs ¶
GetInstanceLogs is a stub
func (*Provider) GetInstances ¶
GetInstances returns the list of servers managed by upcloud
func (*Provider) Initialize ¶
func (p *Provider) Initialize(c *types.ProviderConfig) error
Initialize checks conditions to use upcloud
func (*Provider) InstanceStats ¶
InstanceStats show metrics for instances on Provider.
func (*Provider) ListImages ¶
ListImages prints upcloud images in table format
func (*Provider) ListInstances ¶
ListInstances prints servers list managed by upcloud in table
func (*Provider) PrintInstanceLogs ¶
PrintInstanceLogs prints server log on console
func (*Provider) RebootInstance ¶
RebootInstance reboots the instance.
func (*Provider) ResizeImage ¶
ResizeImage is a stub
func (*Provider) StartInstance ¶
StartInstance initiates server in upcloud
func (*Provider) StopInstance ¶
StopInstance stops server in upcloud