cvm

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CVM

type CVM interface {
	DescribeZoneInstanceConfigInfos() ([]*cvm.InstanceTypeQuotaItem, error)
}

type CVMClient

type CVMClient struct {
	// contains filtered or unexported fields
}

func NewCVMClient

func NewCVMClient(qcc *qcloud.QCloudClientConfig) *CVMClient

func (*CVMClient) DebugModeNoLock

func (qcc *CVMClient) DebugModeNoLock() bool

func (*CVMClient) DescribeZoneInstanceConfigInfos

func (qcc *CVMClient) DescribeZoneInstanceConfigInfos() ([]*cvm.InstanceTypeQuotaItem, error)

DescribeZoneInstanceConfigInfos return zone instance config, which include instance type family, charge type; DescribeZoneInstanceConfigInfos only has cpu/ram machine price, it do not include machine disk and network price. zone + instanceType + chargeType can identify an instance price

func (*CVMClient) EnableDebug

func (qcc *CVMClient) EnableDebug() bool

func (*CVMClient) ExponentialRetryCall

func (qcc *CVMClient) ExponentialRetryCall(retryCnt int, f retryFunc, request interface{}) (interface{}, error)

func (*CVMClient) GetAllZoneInstanceConfigInfos

func (qcc *CVMClient) GetAllZoneInstanceConfigInfos() ([]*cvm.InstanceTypeQuotaItem, error)

GetAllZoneInstanceConfigInfos return all regions all zones instance config, which include instance type family, charge type; zone + instanceType + chargeType can identify an instance price, it is an standard price not the real costmodel in cloud billing todo: we support standard price only now, because billing data is hard to get for security policy, and it has T+1 delay. you can not upload billing data in current time.

func (*CVMClient) GetCVMInstances

func (qcc *CVMClient) GetCVMInstances(instanceIds []*string) ([]*cvm.Instance, error)

func (*CVMClient) GetCVMInstancesInquiryPrice

func (qcc *CVMClient) GetCVMInstancesInquiryPrice(cvmInstances []*cvm.Instance) ([]*QCloudInstancePrice, error)

func (*CVMClient) GetCVMInstancesPrice

func (qcc *CVMClient) GetCVMInstancesPrice(cvmInstances []*cvm.Instance) ([]*QCloudInstancePrice, error)

func (*CVMClient) InquiryDescribeInstancesWithRetry

func (qcc *CVMClient) InquiryDescribeInstancesWithRetry(cli *cvm.Client, req *cvm.DescribeInstancesRequest) (*cvm.DescribeInstancesResponse, error)

func (*CVMClient) InquiryPriceRunInstancesWithRetry

func (qcc *CVMClient) InquiryPriceRunInstancesWithRetry(cli *cvm.Client, req *cvm.InquiryPriceRunInstancesRequest) (*cvm.InquiryPriceRunInstancesResponse, error)

func (*CVMClient) UpdateCred

func (qcc *CVMClient) UpdateCred(cred credential.QCloudCredential)

func (*CVMClient) UpdateCredential

func (qcc *CVMClient) UpdateCredential(cred credential.QCloudCredential)

func (*CVMClient) UpdateCustomCredential

func (qcc *CVMClient) UpdateCustomCredential(id, secret string)

type QCloudInstancePrice

type QCloudInstancePrice struct {
	Instance *cvm.Instance
	Price    *cvm.Price
}

Jump to

Keyboard shortcuts

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