huawei

package
v0.0.0-...-b8a1a0e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DEVICE_OWNER_VM_PRE       = "compute"
	DEVICE_OWNER_VM           = "compute:nova"
	DEVICE_OWNER_ROUTER_GW    = "network:router_gateway"
	DEVICE_OWNER_ROUTER_IFACE = "network:router_interface"
	DEVICE_OWNER_FLOATING_IP  = "network:floatingip"
	DEVICE_OWNER_DHCP         = "network:dhcp"
	DEVICE_OWNER_NAT_GATEWAY  = "network:nat_gateway"
)

Variables

View Source
var DEFAULT_DOMAIN = "myhuaweicloud.com"
View Source
var DEFAULT_IAM_HOST_PREFIX = "iam"
View Source
var STATE_CONVERTION = map[string]int{
	"ACTIVE":  common.VM_STATE_RUNNING,
	"SHUTOFF": common.VM_STATE_STOPPED,
}

Functions

func RequestGet

func RequestGet(url, token string, timeout time.Duration, header map[string]string) (jsonResp *simplejson.Json, err error)

func RequestPost

func RequestPost(url string, timeout time.Duration, body map[string]interface{}) (jsonResp *simplejson.Json, err error)

Types

type Config

type Config struct {
	RegionLcuuid   string
	AccountName    string
	IAMName        string
	Password       string
	IAMHost        string
	IAMHostPrefix  string
	ProjectID      string
	ProjectName    string
	Domain         string // 用于构造访问华为云的endpoint,需与ObservaTrace自身domain做区分
	ExcludeRegions []string
	IncludeRegions []string
}

func (*Config) LoadFromString

func (c *Config) LoadFromString(sConf string) (err error)

type HuaWei

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

func NewHuaWei

func NewHuaWei(domain mysql.Domain, globalCloudCfg config.CloudConfig) (*HuaWei, error)

func (*HuaWei) CheckAuth

func (h *HuaWei) CheckAuth() error

func (*HuaWei) ClearDebugLog

func (h *HuaWei) ClearDebugLog()

func (*HuaWei) GetCloudData

func (h *HuaWei) GetCloudData() (model.Resource, error)

func (*HuaWei) GetStatter

func (h *HuaWei) GetStatter() statsd.StatsdStatter

type Project

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

华为云中用于请求token的凭证

type ProjectSecurityGroupKey

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

type SubnetIPKey

type SubnetIPKey struct {
	SubnetLcuuid string
	IP           string
}

type Token

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

type ToolDataSet

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

func NewToolDataSet

func NewToolDataSet() *ToolDataSet

type VPCIPKey

type VPCIPKey struct {
	VPCLcuuid string
	IP        string
}

Jump to

Keyboard shortcuts

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