Documentation ¶
Index ¶
- Constants
- type Datastores
- type Vsphere
- func (v *Vsphere) AttachVolume(ctx *lepton.Context, image, name string, attachID int) error
- func (v *Vsphere) BuildImage(ctx *lepton.Context) (string, error)
- func (v *Vsphere) BuildImageWithPackage(ctx *lepton.Context, pkgpath string) (string, error)
- func (v *Vsphere) CreateImage(ctx *lepton.Context, imagePath string) error
- func (v *Vsphere) CreateInstance(ctx *lepton.Context) error
- func (v *Vsphere) CreateVolume(ctx *lepton.Context, cv otypes.CloudVolume, data string, provider string) (lepton.NanosVolume, error)
- func (v *Vsphere) CustomizeImage(ctx *lepton.Context) (string, error)
- func (v *Vsphere) DeleteImage(ctx *lepton.Context, imagename string) error
- func (v *Vsphere) DeleteInstance(ctx *lepton.Context, instancename string) error
- func (v *Vsphere) DeleteVolume(ctx *lepton.Context, name string) (err error)
- func (v *Vsphere) DetachVolume(ctx *lepton.Context, image, name string) error
- func (v *Vsphere) GetAllVolumes(ctx *lepton.Context) (*[]lepton.NanosVolume, error)
- func (v *Vsphere) GetImages(ctx *lepton.Context, filter string) ([]lepton.CloudImage, error)
- func (v *Vsphere) GetInstanceByName(ctx *lepton.Context, name string) (*lepton.CloudInstance, error)
- func (v *Vsphere) GetInstanceLogs(ctx *lepton.Context, instancename string) (string, error)
- func (v *Vsphere) GetInstances(ctx *lepton.Context) ([]lepton.CloudInstance, error)
- func (v *Vsphere) GetStorage() lepton.Storage
- func (v *Vsphere) Initialize(config *types.ProviderConfig) error
- func (v *Vsphere) InstanceStats(ctx *lepton.Context, instancename string, watch bool) error
- func (v *Vsphere) ListImages(ctx *lepton.Context, filter string) error
- func (v *Vsphere) ListInstances(ctx *lepton.Context) error
- func (v *Vsphere) PrintInstanceLogs(ctx *lepton.Context, instancename string, watch bool) error
- func (v *Vsphere) RebootInstance(ctx *lepton.Context, instanceName string) error
- func (v *Vsphere) ResizeImage(ctx *lepton.Context, imagename string, hbytes string) error
- func (v *Vsphere) StartInstance(ctx *lepton.Context, instancename string) error
- func (v *Vsphere) StopInstance(ctx *lepton.Context, instancename string) error
- func (v *Vsphere) SyncImage(config *types.Config, target lepton.Provider, image string) error
Constants ¶
const ProviderName = "vsphere"
ProviderName of the cloud platform provider
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastores ¶
type Datastores struct{}
Datastores provides access to VSphere's Datastores
func (*Datastores) CopyToBucket ¶
func (s *Datastores) CopyToBucket(config *types.Config, archPath string) error
CopyToBucket converts the raw disk image to a monolithicFlat vmdk.
func (*Datastores) DeleteFromBucket ¶
func (s *Datastores) DeleteFromBucket(config *types.Config, key string) error
DeleteFromBucket deletes key from config's bucket
type Vsphere ¶
type Vsphere struct { Storage *Datastores // contains filtered or unexported fields }
Vsphere Provider to interact with Vsphere infrastructure
func (*Vsphere) AttachVolume ¶
AttachVolume attaches a volume to an instance
func (*Vsphere) BuildImage ¶
BuildImage to be upload on VSphere
func (*Vsphere) BuildImageWithPackage ¶
BuildImageWithPackage to upload on Vsphere.
func (*Vsphere) CreateImage ¶
CreateImage - Creates image on vsphere using nanos images This merely uploads the flat and base image to the datastore and then creates a copy of the image to perform the vmfs translation (import does not do this by default). This sidesteps the vmfkstools transformation.
func (*Vsphere) CreateInstance ¶
CreateInstance - Creates instance on VSphere. Currently we support pvsci adapter && vmnetx3 network driver.
func (*Vsphere) CreateVolume ¶
func (v *Vsphere) CreateVolume(ctx *lepton.Context, cv otypes.CloudVolume, data string, provider string) (lepton.NanosVolume, error)
CreateVolume converts local volume raw file to mkfs and uploads required files to datastore
func (*Vsphere) CustomizeImage ¶
CustomizeImage returns image path with adaptations needed by cloud provider
func (*Vsphere) DeleteImage ¶
DeleteImage deletes image from VSphere
func (*Vsphere) DeleteInstance ¶
DeleteInstance deletes instance from VSphere
func (*Vsphere) DeleteVolume ¶
DeleteVolume deletes a volume on vsphere
func (*Vsphere) DetachVolume ¶
DetachVolume detaches a volume from an instance
func (*Vsphere) GetAllVolumes ¶
GetAllVolumes returns volumes. Work in progress
func (*Vsphere) GetInstanceByName ¶
func (v *Vsphere) GetInstanceByName(ctx *lepton.Context, name string) (*lepton.CloudInstance, error)
GetInstanceByName returns instance with given name
func (*Vsphere) GetInstanceLogs ¶
GetInstanceLogs gets instance related logs. govc datastore.tail -n 100 gtest/serial.out logs don't appear until you spin up the instance.
func (*Vsphere) GetInstances ¶
GetInstances return all instances on vSphere
func (*Vsphere) GetStorage ¶
GetStorage returns storage interface for cloud provider
func (*Vsphere) Initialize ¶
func (v *Vsphere) Initialize(config *types.ProviderConfig) error
Initialize Vsphere related things
func (*Vsphere) InstanceStats ¶
InstanceStats show metrics for instances on vsphere.
func (*Vsphere) ListImages ¶
ListImages lists images on a datastore. This is incredibly naive at the moment and probably worth putting under a root folder. essentially does the equivalent of 'govc datastore.ls'
func (*Vsphere) ListInstances ¶
ListInstances lists instances on VSphere. It essentially does: govc ls /ha-datacenter/vm
func (*Vsphere) PrintInstanceLogs ¶
PrintInstanceLogs writes instance logs to console
func (*Vsphere) RebootInstance ¶
RebootInstance reboots the instance.
func (*Vsphere) ResizeImage ¶
ResizeImage is not supported on VSphere.
func (*Vsphere) StartInstance ¶
StartInstance starts an instance in VSphere. It is the equivalent of: govc vm.power -on=true <instance_name>
func (*Vsphere) StopInstance ¶
StopInstance stops an instance from VSphere It is the equivalent of: govc vm.power -on=false <instance_name>