Documentation
¶
Index ¶
- Constants
- type IBM
- func (v *IBM) AttachVolume(ctx *lepton.Context, image, name string, attachID int) error
- func (v *IBM) BuildImage(ctx *lepton.Context) (string, error)
- func (v *IBM) BuildImageWithPackage(ctx *lepton.Context, pkgpath string) (string, error)
- func (v *IBM) CreateImage(ctx *lepton.Context, imagePath string) error
- func (v *IBM) CreateInstance(ctx *lepton.Context) error
- func (v *IBM) CreateVolume(ctx *lepton.Context, cv types.CloudVolume, data string, provider string) (lepton.NanosVolume, error)
- func (v *IBM) CustomizeImage(ctx *lepton.Context) (string, error)
- func (v *IBM) DeleteImage(ctx *lepton.Context, snapshotID string) error
- func (v *IBM) DeleteInstance(ctx *lepton.Context, instanceID string) error
- func (v *IBM) DeleteVolume(ctx *lepton.Context, name string) error
- func (v *IBM) DetachVolume(ctx *lepton.Context, image, name string) error
- func (v *IBM) GetAllVolumes(ctx *lepton.Context) (*[]lepton.NanosVolume, error)
- func (v *IBM) GetImages(ctx *lepton.Context, filter string) ([]lepton.CloudImage, error)
- func (v *IBM) GetInstanceByName(ctx *lepton.Context, name string) (*lepton.CloudInstance, error)
- func (v *IBM) GetInstanceLogs(ctx *lepton.Context, instancename string) (string, error)
- func (v *IBM) GetInstances(ctx *lepton.Context) ([]lepton.CloudInstance, error)
- func (v *IBM) GetStorage() lepton.Storage
- func (v *IBM) Initialize(config *types.ProviderConfig) error
- func (v *IBM) InstanceStats(ctx *lepton.Context, instancename string, watch bool) error
- func (v *IBM) ListImages(ctx *lepton.Context, filter string) error
- func (v *IBM) ListInstances(ctx *lepton.Context) error
- func (v *IBM) PrintInstanceLogs(ctx *lepton.Context, instancename string, watch bool) error
- func (v *IBM) RebootInstance(ctx *lepton.Context, instanceName string) error
- func (v *IBM) ResizeImage(ctx *lepton.Context, imagename string, hbytes string) error
- func (v *IBM) StartInstance(ctx *lepton.Context, instanceID string) error
- func (v *IBM) StopInstance(ctx *lepton.Context, instanceID string) error
- func (v *IBM) SyncImage(config *types.Config, target lepton.Provider, image string) error
- type Image
- type ImageListResponse
- type Instance
- type InstancesListResponse
- type Objects
- type ResourceGroup
- type ResourceGroupResponse
- type Subnet
- type SubnetListResponse
- type SubnetResponse
- type Token
- type VPC
- type VPCListResponse
Constants ¶
const ProviderName = "ibm"
ProviderName of the cloud platform provider
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IBM ¶
type IBM struct { Storage *Objects // contains filtered or unexported fields }
IBM Provider to interact with IBM infrastructure
func (*IBM) AttachVolume ¶
AttachVolume is a stub to satisfy VolumeService interface
func (*IBM) BuildImage ¶
BuildImage to be upload on IBM
func (*IBM) BuildImageWithPackage ¶
BuildImageWithPackage to upload on IBM.
func (*IBM) CreateImage ¶
CreateImage - Creates image on IBM using nanos images
func (*IBM) CreateInstance ¶
CreateInstance - Creates instance on IBM Cloud Platform
func (*IBM) CreateVolume ¶
func (v *IBM) CreateVolume(ctx *lepton.Context, cv types.CloudVolume, data string, provider string) (lepton.NanosVolume, error)
CreateVolume is a stub to satisfy VolumeService interface
func (*IBM) CustomizeImage ¶
CustomizeImage returns image path with adaptations needed by cloud provider
func (*IBM) DeleteImage ¶
DeleteImage deletes image from v
func (*IBM) DeleteInstance ¶
DeleteInstance deletes instance from IBM
func (*IBM) DeleteVolume ¶
DeleteVolume is a stub to satisfy VolumeService interface
func (*IBM) DetachVolume ¶
DetachVolume is a stub to satisfy VolumeService interface
func (*IBM) GetAllVolumes ¶
GetAllVolumes is a stub to satisfy VolumeService interface
func (*IBM) GetInstanceByName ¶
GetInstanceByName returns instance with given name
func (*IBM) GetInstanceLogs ¶
GetInstanceLogs gets instance related logs https://cloud.ibm.com/docs/vpc?topic=vpc-vsi_is_connecting_console&interface=api
func (*IBM) GetInstances ¶
GetInstances return all instances on IBM
func (*IBM) GetStorage ¶
GetStorage returns storage interface for cloud provider
func (*IBM) Initialize ¶
func (v *IBM) Initialize(config *types.ProviderConfig) error
Initialize provider
func (*IBM) InstanceStats ¶
InstanceStats show metrics for instances on ibm.
func (*IBM) ListImages ¶
ListImages lists images on IBM
func (*IBM) ListInstances ¶
ListInstances lists instances on v
func (*IBM) PrintInstanceLogs ¶
PrintInstanceLogs writes instance logs to console
func (*IBM) RebootInstance ¶
RebootInstance reboots the instance.
func (*IBM) ResizeImage ¶
ResizeImage is not supported on IBM.
func (*IBM) StartInstance ¶
StartInstance starts an instance in IBM
func (*IBM) StopInstance ¶
StopInstance halts instance from v
type Image ¶
type Image struct { ID string `json:"id"` Name string `json:"name"` Status string `json:"status"` CreatedAt string `json:"created_at"` }
Image represents a given IBM image configuration.
type ImageListResponse ¶
type ImageListResponse struct {
Images []Image `json:"images"`
}
ImageListResponse is the set of instances available from IBM in an images list call.
type Instance ¶
type Instance struct { ID string `json:"id"` Name string `json:"name"` Status string `json:"status"` CreatedAt string `json:"created_at"` }
Instance represents a virtual server instance.
type InstancesListResponse ¶
type InstancesListResponse struct {
Instances []Instance `json:"instance"`
}
InstancesListResponse is the set of instances available from IBM in an images list call.
type Objects ¶
type Objects struct {
// contains filtered or unexported fields
}
Objects represent storage specific information for cloud object storage.
func (*Objects) CopyToBucket ¶
CopyToBucket copies archive to bucket
type ResourceGroup ¶
ResourceGroup represents a single resource group.
type ResourceGroupResponse ¶
type ResourceGroupResponse struct {
ResourceGroups []ResourceGroup `json:"resources"`
}
ResourceGroupResponse is the response type for the resource group list endpoint.
type SubnetListResponse ¶
type SubnetListResponse struct {
Subnets []Subnet `json:"subnets"`
}
SubnetListResponse is the response type for the subnet list endpoint.
type SubnetResponse ¶
type SubnetResponse struct {
Subnets []Subnet `json:"subnets"`
}
SubnetResponse is the response type for the subnet list endpoint.
type Token ¶
type Token struct {
AccessToken string `json:"access_token"`
}
Token is the return type for a new IAM token.
type VPCListResponse ¶
type VPCListResponse struct {
VPCs []VPC `json:"vpcs"`
}
VPCListResponse is the response type for the vpc list endpoint.