Documentation ¶
Index ¶
- Constants
- type OpenStack
- func (o *OpenStack) AttachVolume(ctx *lepton.Context, image, name string, attachID int) error
- func (o *OpenStack) BuildImage(ctx *lepton.Context) (string, error)
- func (o *OpenStack) BuildImageWithPackage(ctx *lepton.Context, pkgpath string) (string, error)
- func (o *OpenStack) CreateImage(ctx *lepton.Context, imagePath string) error
- func (o *OpenStack) CreateInstance(ctx *lepton.Context) error
- func (o *OpenStack) CreateVolume(ctx *lepton.Context, cv types.CloudVolume, data string, provider string) (lepton.NanosVolume, error)
- func (o *OpenStack) CreateZoneRecord(config *types.Config, zoneID string, record *lepton.DNSRecord) error
- func (o *OpenStack) CustomizeImage(ctx *lepton.Context) (string, error)
- func (o *OpenStack) DeleteImage(ctx *lepton.Context, imagename string) error
- func (o *OpenStack) DeleteInstance(ctx *lepton.Context, instancename string) error
- func (o *OpenStack) DeleteVolume(ctx *lepton.Context, name string) error
- func (o *OpenStack) DeleteZoneRecordIfExists(config *types.Config, zoneID string, recordName string) error
- func (o *OpenStack) DetachVolume(ctx *lepton.Context, image, name string) error
- func (o *OpenStack) FindOrCreateZoneIDByName(config *types.Config, dnsName string) (string, error)
- func (o *OpenStack) GetAllVolumes(ctx *lepton.Context) (*[]lepton.NanosVolume, error)
- func (o *OpenStack) GetImages(ctx *lepton.Context, filter string) ([]lepton.CloudImage, error)
- func (o *OpenStack) GetInstanceByName(ctx *lepton.Context, name string) (*lepton.CloudInstance, error)
- func (o *OpenStack) GetInstanceLogs(ctx *lepton.Context, instancename string) (string, error)
- func (o *OpenStack) GetInstances(ctx *lepton.Context) ([]lepton.CloudInstance, error)
- func (o *OpenStack) Initialize(config *types.ProviderConfig) error
- func (o *OpenStack) InstanceStats(ctx *lepton.Context, instancename string, watch bool) error
- func (o *OpenStack) ListImages(ctx *lepton.Context, filter string) error
- func (o *OpenStack) ListInstances(ctx *lepton.Context) error
- func (o *OpenStack) PrintInstanceLogs(ctx *lepton.Context, instancename string, watch bool) error
- func (o *OpenStack) RebootInstance(ctx *lepton.Context, instancename string) error
- func (o *OpenStack) ResizeImage(ctx *lepton.Context, imagename string, hbytes string) error
- func (o *OpenStack) StartInstance(ctx *lepton.Context, instancename string) error
- func (o *OpenStack) StopInstance(ctx *lepton.Context, instancename string) error
- func (o *OpenStack) SyncImage(config *types.Config, target lepton.Provider, image string) error
Constants ¶
const ProviderName = "openstack"
ProviderName of the cloud platform provider
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenStack ¶
type OpenStack struct {
// contains filtered or unexported fields
}
OpenStack Provider to interact with OpenStack infrastructure
func (*OpenStack) AttachVolume ¶
AttachVolume is a stub to satisfy VolumeService interface
func (*OpenStack) BuildImage ¶
BuildImage to be upload on OpenStack
func (*OpenStack) BuildImageWithPackage ¶
BuildImageWithPackage to upload on OpenStack.
func (*OpenStack) CreateImage ¶
CreateImage - Creates image on OpenStack using nanos images
func (*OpenStack) CreateInstance ¶
CreateInstance - Creates instance on OpenStack.
func (*OpenStack) CreateVolume ¶
func (o *OpenStack) CreateVolume(ctx *lepton.Context, cv types.CloudVolume, data string, provider string) (lepton.NanosVolume, error)
CreateVolume is a stub to satisfy VolumeService interface
func (*OpenStack) CreateZoneRecord ¶
func (o *OpenStack) CreateZoneRecord(config *types.Config, zoneID string, record *lepton.DNSRecord) error
CreateZoneRecord creates a record in a DNS zone
func (*OpenStack) CustomizeImage ¶
CustomizeImage returns image path with adaptations needed by cloud provider
func (*OpenStack) DeleteImage ¶
DeleteImage deletes image from OpenStack
func (*OpenStack) DeleteInstance ¶
DeleteInstance deletes instance from OpenStack
func (*OpenStack) DeleteVolume ¶
DeleteVolume is a stub to satisfy VolumeService interface
func (*OpenStack) DeleteZoneRecordIfExists ¶
func (o *OpenStack) DeleteZoneRecordIfExists(config *types.Config, zoneID string, recordName string) error
DeleteZoneRecordIfExists deletes a record from a DNS zone if it exists
func (*OpenStack) DetachVolume ¶
DetachVolume is a stub to satisfy VolumeService interface
func (*OpenStack) FindOrCreateZoneIDByName ¶
FindOrCreateZoneIDByName searches for a DNS zone with the name passed by argument and if it doesn't exist it creates one
func (*OpenStack) GetAllVolumes ¶
GetAllVolumes is a stub to satisfy VolumeService interface
func (*OpenStack) GetInstanceByName ¶
func (o *OpenStack) GetInstanceByName(ctx *lepton.Context, name string) (*lepton.CloudInstance, error)
GetInstanceByName returns instance with given name
func (*OpenStack) GetInstanceLogs ¶
GetInstanceLogs gets instance related logs.
func (*OpenStack) GetInstances ¶
GetInstances return all instances on OpenStack
func (*OpenStack) Initialize ¶
func (o *OpenStack) Initialize(config *types.ProviderConfig) error
Initialize OpenStack related things
func (*OpenStack) InstanceStats ¶
InstanceStats show metrics for instances on openstack
func (*OpenStack) ListImages ¶
ListImages lists images on a datastore.
func (*OpenStack) ListInstances ¶
ListInstances lists instances on OpenStack. It essentially does:
func (*OpenStack) PrintInstanceLogs ¶
PrintInstanceLogs writes instance logs to console
func (*OpenStack) RebootInstance ¶
RebootInstance reboots the instance.
func (*OpenStack) ResizeImage ¶
ResizeImage is not supported on OpenStack.
func (*OpenStack) StartInstance ¶
StartInstance starts an instance in OpenStack.
func (*OpenStack) StopInstance ¶
StopInstance stops an instance from OpenStack