cvm

package
v0.0.0-...-7aae7b9 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CVM_STATUS_MAP = map[string]host.STATUS{
		"PENDING":               host.STATUS_PENDING,
		"LAUNCH_FAILED":         host.STATUS_CREATE_FAILED,
		"RUNNING":               host.STATUS_RUNNING,
		"STOPPED":               host.STATUS_STOPPED,
		"STARTING":              host.STATUS_STARTING,
		"SHUTDOWN":              host.STATUS_SHUTDOWN,
		"STOPPING":              host.STATUS_STOPPING,
		"REBOOTING":             host.STATUS_REBOOTING,
		"DELETING":              host.STATUS_DELETING,
		"EXPIRED":               host.STATUS_SHUTDOWN,
		"PROTECTIVELY_ISOLATED": host.STATUS_ERROR,
	}
)
View Source
var (
	// UNATTACHED:未挂载
	// ATTACHING:挂载中
	// ATTACHED:已挂载
	// DETACHING:解挂中
	// EXPANDING:扩容中
	// ROLLBACKING:回滚中
	// TORECYCLE:待回收
	// DUMPING:拷贝硬盘中
	DISK_STATUS_MAP = map[string]disk.STATUS{
		"UNATTACHED":  disk.STATUS_UNATTACHED,
		"ATTACHING":   disk.STATUS_ATTACHING,
		"ATTACHED":    disk.STATUS_ATTACHED,
		"DETACHING":   disk.STATUS_DETACHING,
		"EXPANDING":   disk.STATUS_EXPANDING,
		"ROLLBACKING": disk.STATUS_ROLLBACKING,
		"TORECYCLE":   disk.STATUS_RECYCLE,
		"DUMPING":     disk.STATUS_DUMPING,
	}
)
View Source
var (
	// `EIP`状态,包含:
	// CREATING (创建中)
	// BINDING (绑定中)
	// BIND (已绑定)
	// UNBINDING (解绑中)
	// UNBIND (已解绑)
	// OFFLINING (释放中)
	// BIND_ENI (绑定悬空弹性网卡)
	EIP_STATUS_MAP = map[string]eip.STATUS{
		"CREATING":  eip.STATUS_PENDING,
		"BINDING":   eip.STATUS_BINDING,
		"BIND":      eip.STATUS_BIND,
		"UNBINDING": eip.STATUS_UNBINDING,
		"UNBIND":    eip.STATUS_UNBIND,
		"OFFLINING": eip.STATUS_OFFLINING,
	}
)

Functions

This section is empty.

Types

type CVMOperator

type CVMOperator struct {
	*resource.AccountGetter
	// contains filtered or unexported fields
}

func NewCVMOperator

func NewCVMOperator(client *cvm.Client, cbs *cbs.Client, vpc *vpc.Client) *CVMOperator

func (*CVMOperator) DescribeDisk

func (o *CVMOperator) DescribeDisk(ctx context.Context, r *provider.DescribeRequest) (
	*disk.Disk, error)

func (*CVMOperator) DescribeHost

func (o *CVMOperator) DescribeHost(ctx context.Context, req *provider.DescribeRequest) (*host.Host, error)

func (*CVMOperator) DescribeInstanceType

func (o *CVMOperator) DescribeInstanceType() error

查询实例机型列表: https://cloud.tencent.com/document/api/213/15749 实例规格说明文档: https://cloud.tencent.com/document/product/213/11518

func (*CVMOperator) DescribeZones

func (o *CVMOperator) DescribeZones() error

查询可用区列表: https://cloud.tencent.com/document/product/213/15707

func (*CVMOperator) PageQueryDisk

func (o *CVMOperator) PageQueryDisk(req *provider.QueryRequest) pager.Pager

func (*CVMOperator) PageQueryEip

func (o *CVMOperator) PageQueryEip(req *provider.QueryRequest) pager.Pager

func (*CVMOperator) PageQueryHost

func (o *CVMOperator) PageQueryHost(req *provider.QueryRequest) pager.Pager

Jump to

Keyboard shortcuts

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