qingcloud

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultInstanceClass = 1
	DefaultVolumeClass   = 3

	DefaultLoginMode     = "passwd"
	DefaultLoginPassword = "p12cHANgepwD"

	DefaultUserDataType = "exec"

	ResourceTypeInstance   = "hp_instance"
	ResourceTypeCpu        = "hp_cpu"
	ResourceTypeGpu        = "gpu_passthrough"
	ResourceTypeMemory     = "hp_memory"
	ResourceTypeVolume     = "hpp_volume"
	ResourceTypeVolumeSize = "hpp_volume_size"
)

Variables

Functions

This section is empty.

Types

type Credential

type Credential struct {
	AccessKeyId     string `json:"access_key_id"`
	SecretAccessKey string `json:"secret_access_key"`
}

type Provider

type Provider struct {
	Logger *logger.Logger
}

func NewProvider

func NewProvider(l *logger.Logger) *Provider

func (*Provider) CheckResource added in v0.1.7

func (p *Provider) CheckResource(ctx context.Context, clusterWrapper *models.ClusterWrapper) error

func (*Provider) DescribeRuntimeProviderZones

func (p *Provider) DescribeRuntimeProviderZones(url, credential string) ([]string, error)

func (*Provider) DescribeSubnets

func (*Provider) DescribeVpc

func (p *Provider) DescribeVpc(runtimeId, vpcId string) (*models.Vpc, error)

func (*Provider) HandleSubtask

func (p *Provider) HandleSubtask(task *models.Task) error

func (*Provider) ParseClusterConf

func (p *Provider) ParseClusterConf(versionId, runtimeId, conf string) (*models.ClusterWrapper, error)

func (*Provider) SplitJobIntoTasks

func (p *Provider) SplitJobIntoTasks(job *models.Job) (*models.TaskLayer, error)

func (*Provider) UpdateClusterStatus

func (p *Provider) UpdateClusterStatus(job *models.Job) error

func (*Provider) ValidateCredential

func (p *Provider) ValidateCredential(url, credential, zone string) error

func (*Provider) WaitSubtask

func (p *Provider) WaitSubtask(task *models.Task, timeout time.Duration, waitInterval time.Duration) error

type ProviderHandler

type ProviderHandler struct {
	vmbased.FrameHandler
}

func GetProviderHandler

func GetProviderHandler(Logger *logger.Logger) *ProviderHandler

func (*ProviderHandler) AttachVolumes

func (p *ProviderHandler) AttachVolumes(task *models.Task) error

func (*ProviderHandler) CheckResourceQuotas

func (p *ProviderHandler) CheckResourceQuotas(ctx context.Context, clusterWrapper *models.ClusterWrapper) error

func (*ProviderHandler) CreateVolumes

func (p *ProviderHandler) CreateVolumes(task *models.Task) error

func (*ProviderHandler) DeleteInstances

func (p *ProviderHandler) DeleteInstances(task *models.Task) error

func (*ProviderHandler) DeleteVolumes

func (p *ProviderHandler) DeleteVolumes(task *models.Task) error

func (*ProviderHandler) DescribeSubnets

func (*ProviderHandler) DescribeVpc

func (p *ProviderHandler) DescribeVpc(runtimeId, vpcId string) (*models.Vpc, error)

func (*ProviderHandler) DescribeZones

func (p *ProviderHandler) DescribeZones(url, credential string) ([]string, error)

func (*ProviderHandler) DetachVolumes

func (p *ProviderHandler) DetachVolumes(task *models.Task) error

func (*ProviderHandler) RunInstances

func (p *ProviderHandler) RunInstances(task *models.Task) error

func (*ProviderHandler) StartInstances

func (p *ProviderHandler) StartInstances(task *models.Task) error

func (*ProviderHandler) StopInstances

func (p *ProviderHandler) StopInstances(task *models.Task) error

func (*ProviderHandler) WaitAttachVolumes

func (p *ProviderHandler) WaitAttachVolumes(task *models.Task) error

func (*ProviderHandler) WaitCreateVolumes

func (p *ProviderHandler) WaitCreateVolumes(task *models.Task) error

func (*ProviderHandler) WaitDeleteInstances

func (p *ProviderHandler) WaitDeleteInstances(task *models.Task) error

func (*ProviderHandler) WaitDeleteVolumes

func (p *ProviderHandler) WaitDeleteVolumes(task *models.Task) error

func (*ProviderHandler) WaitDetachVolumes

func (p *ProviderHandler) WaitDetachVolumes(task *models.Task) error

func (*ProviderHandler) WaitInstanceTask

func (p *ProviderHandler) WaitInstanceTask(task *models.Task) error

func (*ProviderHandler) WaitRunInstances

func (p *ProviderHandler) WaitRunInstances(task *models.Task) error

func (*ProviderHandler) WaitStartInstances

func (p *ProviderHandler) WaitStartInstances(task *models.Task) error

func (*ProviderHandler) WaitStopInstances

func (p *ProviderHandler) WaitStopInstances(task *models.Task) error

func (*ProviderHandler) WaitVolumeTask

func (p *ProviderHandler) WaitVolumeTask(task *models.Task) error

Jump to

Keyboard shortcuts

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