qcclient

package
v0.0.0-...-58e557b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupQingCloudClient

func SetupQingCloudClient(opts Options)

NewQingCloudClient create a qingcloud client to manipulate cloud resources

Types

type Options

type Options struct {
	Tag string
}

type QingCloudAPI

type QingCloudAPI interface {
	//node info
	GetInstanceID() string

	//bootstrap
	GetCreatedNics(num, offsite int, vxNet, instanceID string) ([]*rpc.HostNic, error)

	//vxnet info
	GetVxNets([]string) (map[string]*rpc.VxNet, error)

	//job info
	DescribeNicJobs(ids []string) ([]string, map[string]bool, error)

	//nic operations
	CreateNicsAndAttach(vxnet *rpc.VxNet, num int, ips []string) ([]*rpc.HostNic, string, error)
	GetNics(nics []string) (map[string]*rpc.HostNic, error)
	DeleteNics(nicIDs []string) error
	DeattachNics(nicIDs []string, sync bool) (string, error)
	AttachNics(nicIDs []string) (string, error)
	GetAttachedNics() ([]*rpc.HostNic, error)

	// VIP
	CreateVIPs(vxNetID, IPStart, IPEnd string) (string, []string, error)
	DeleteVIPs(vips []string) (string, error)
	DescribeVIPJobs(ids []string) (error, []string, []string)

	DescribeVIPs(vxNetID string, VIPs []string, Addrs []string) (*service.DescribeVxNetsVIPsOutput, error)
}

QingCloudAPI is a wrapper interface of qingcloud api

var (
	QClient QingCloudAPI
)

Jump to

Keyboard shortcuts

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