Documentation ¶
Index ¶
- Constants
- Variables
- type Credential
- type Parser
- func (p *Parser) Parse(clusterConf app.ClusterConf) (*models.ClusterWrapper, error)
- func (p *Parser) ParseCluster(clusterConf app.ClusterConf) (*models.Cluster, error)
- func (p *Parser) ParseClusterCommon(clusterConf app.ClusterConf, node app.Node) (*models.ClusterCommon, error)
- func (p *Parser) ParseClusterLinks(clusterConf app.ClusterConf) map[string]*models.ClusterLink
- func (p *Parser) ParseClusterLoadbalancer(node app.Node) []*models.ClusterLoadbalancer
- func (p *Parser) ParseClusterNode(node app.Node, subnetId string) (map[string]*models.ClusterNode, error)
- func (p *Parser) ParseClusterRole(clusterConf app.ClusterConf, node app.Node) (*models.ClusterRole, error)
- type Provider
- func (p *Provider) CheckResourceQuotas(ctx context.Context, clusterWrapper *models.ClusterWrapper) (string, error)
- func (p *Provider) DescribeRuntimeProviderZones(url, credential string) ([]string, error)
- func (p *Provider) DescribeSubnets(ctx context.Context, req *pb.DescribeSubnetsRequest) (*pb.DescribeSubnetsResponse, error)
- func (p *Provider) DescribeVpc(runtimeId, vpcId string) (*models.Vpc, error)
- func (p *Provider) HandleSubtask(task *models.Task) error
- func (p *Provider) ParseClusterConf(versionId, conf string) (*models.ClusterWrapper, error)
- func (p *Provider) SetLogger(logger *logger.Logger)
- func (p *Provider) SplitJobIntoTasks(job *models.Job) (*models.TaskLayer, error)
- func (p *Provider) UpdateClusterStatus(job *models.Job) error
- func (p *Provider) ValidateCredential(url, credential, zone string) error
- func (p *Provider) WaitSubtask(task *models.Task, timeout time.Duration, waitInterval time.Duration) error
- type ProviderHandler
- func (p *ProviderHandler) AttachVolumes(task *models.Task) error
- func (p *ProviderHandler) CheckResourceQuotas(ctx context.Context, clusterWrapper *models.ClusterWrapper) (string, error)
- func (p *ProviderHandler) CreateVolumes(task *models.Task) error
- func (p *ProviderHandler) DeleteInstances(task *models.Task) error
- func (p *ProviderHandler) DeleteVolumes(task *models.Task) error
- func (p *ProviderHandler) DescribeSubnets(ctx context.Context, req *pb.DescribeSubnetsRequest) (*pb.DescribeSubnetsResponse, error)
- func (p *ProviderHandler) DescribeVpc(runtimeId, vpcId string) (*models.Vpc, error)
- func (p *ProviderHandler) DescribeZones(url, credential string) ([]string, error)
- func (p *ProviderHandler) DetachVolumes(task *models.Task) error
- func (p *ProviderHandler) RunInstances(task *models.Task) error
- func (p *ProviderHandler) StartInstances(task *models.Task) error
- func (p *ProviderHandler) StopInstances(task *models.Task) error
- func (p *ProviderHandler) WaitAttachVolumes(task *models.Task) error
- func (p *ProviderHandler) WaitCreateVolumes(task *models.Task) error
- func (p *ProviderHandler) WaitDeleteInstances(task *models.Task) error
- func (p *ProviderHandler) WaitDeleteVolumes(task *models.Task) error
- func (p *ProviderHandler) WaitDetachVolumes(task *models.Task) error
- func (p *ProviderHandler) WaitInstanceTask(task *models.Task) error
- func (p *ProviderHandler) WaitRunInstances(task *models.Task) error
- func (p *ProviderHandler) WaitStartInstances(task *models.Task) error
- func (p *ProviderHandler) WaitStopInstances(task *models.Task) error
- func (p *ProviderHandler) WaitVolumeTask(task *models.Task) error
Constants ¶
View Source
const ( DefaultInstanceClass = 1 DefaultVolumeClass = 3 DefaultLoginMode = "passwd" DefaultLoginPassword = "p12cHANgepwD" DefaultUserDataType = "exec" )
Variables ¶
View Source
var MyProvider = constants.ProviderQingCloud
Functions ¶
This section is empty.
Types ¶
type Credential ¶
type Parser ¶
func (*Parser) Parse ¶
func (p *Parser) Parse(clusterConf app.ClusterConf) (*models.ClusterWrapper, error)
func (*Parser) ParseCluster ¶
func (*Parser) ParseClusterCommon ¶
func (p *Parser) ParseClusterCommon(clusterConf app.ClusterConf, node app.Node) (*models.ClusterCommon, error)
func (*Parser) ParseClusterLinks ¶
func (p *Parser) ParseClusterLinks(clusterConf app.ClusterConf) map[string]*models.ClusterLink
func (*Parser) ParseClusterLoadbalancer ¶
func (p *Parser) ParseClusterLoadbalancer(node app.Node) []*models.ClusterLoadbalancer
func (*Parser) ParseClusterNode ¶
func (*Parser) ParseClusterRole ¶
func (p *Parser) ParseClusterRole(clusterConf app.ClusterConf, node app.Node) (*models.ClusterRole, error)
type Provider ¶
func NewProvider ¶
func NewProvider() *Provider
func (*Provider) CheckResourceQuotas ¶
func (*Provider) DescribeRuntimeProviderZones ¶
func (*Provider) DescribeSubnets ¶
func (p *Provider) DescribeSubnets(ctx context.Context, req *pb.DescribeSubnetsRequest) (*pb.DescribeSubnetsResponse, error)
func (*Provider) DescribeVpc ¶
func (*Provider) ParseClusterConf ¶
func (p *Provider) ParseClusterConf(versionId, conf string) (*models.ClusterWrapper, error)
func (*Provider) SplitJobIntoTasks ¶
func (*Provider) UpdateClusterStatus ¶
func (*Provider) ValidateCredential ¶
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) (string, 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 (p *ProviderHandler) DescribeSubnets(ctx context.Context, req *pb.DescribeSubnetsRequest) (*pb.DescribeSubnetsResponse, error)
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
Click to show internal directories.
Click to hide internal directories.