models

package
v0.3.9-2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2022 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnsiblePlaybook

type AnsiblePlaybook struct {
	VirtualResource

	Playbook  *ansible.Playbook
	Output    string
	StartTime time.Time
	EndTime   time.Time
}

type EnabledStatusStandaloneResource

type EnabledStatusStandaloneResource struct {
	StatusStandaloneResource

	Enabled bool
}

type ExternalizedResource

type ExternalizedResource struct {
	ExternalId string
}

type Host

type Host struct {
	EnabledStatusStandaloneResource

	Rack  string
	Slots string

	AccessMac  string
	AccessIp   string
	ManagerUri string

	SysInfo jsonutils.JSONObject
	SN      string

	CpuCount    int
	NodeCount   int8
	CpuDesc     string
	CpuMhz      int
	CpuCache    int
	CpuReserved int
	CpuCmtbound float32

	MemSize     int
	MemReserved int
	MemCmtbound float32

	StorageSize   int
	StorageType   string
	StorageDriver string
	StorageInfo   jsonutils.JSONObject

	IpmiInfo jsonutils.JSONObject

	HostStatus string

	ZoneId string

	HostType string

	Version string

	IsBaremetal bool

	IsMaintenance bool

	LastPingAt time.Time

	ResourceType string

	RealExternalId string

	IsImport bool
}

type IResource

type IResource interface {
	GetUpdateVersion() int
	GetUpdatedAt() time.Time
}

type IStandaloneResource

type IStandaloneResource interface {
	IResource
	GetId() string
}

type IVirtualResource

type IVirtualResource interface {
	IStandaloneResource
	GetPendingDeleted() bool
}

type Loadbalancer

type Loadbalancer struct {
	VirtualResource
	ManagedResource
	ExternalizedResource

	EgressMbps  int
	Address     string
	AddressType string
	NetworkType string
	NetworkId   string
	VpcId       string
	ZoneId      string
	ClusterId   string

	BackendGroupId   string
	CloudregionId    string
	ChargeType       string
	LoadbalancerSpec string
}

type LoadbalancerAcl

type LoadbalancerAcl struct {
	SharableVirtualResource
	ManagedResource
	ExternalizedResource

	AclEntries    *LoadbalancerAclEntries
	CloudregionId string
}

type LoadbalancerAclEntries

type LoadbalancerAclEntries []*LoadbalancerAclEntry

type LoadbalancerAclEntry

type LoadbalancerAclEntry struct {
	Cidr    string
	Comment string
}

type LoadbalancerAgent

type LoadbalancerAgent struct {
	StandaloneResource

	Version    string
	IP         string
	HaState    string
	HbLastSeen time.Time
	HbTimeout  int

	Loadbalancers             time.Time
	LoadbalancerListeners     time.Time
	LoadbalancerListenerRules time.Time
	LoadbalancerBackendGroups time.Time
	LoadbalancerBackends      time.Time
	LoadbalancerAcls          time.Time
	LoadbalancerCertificates  time.Time
	Params                    LoadbalancerAgentParams

	ClusterId  string
	Deployment LoadbalancerDeployment
}

type LoadbalancerAgentParams

type LoadbalancerAgentParams struct {
	KeepalivedConfTmpl string
	HaproxyConfTmpl    string
	TelegrafConfTmpl   string
	Vrrp               LoadbalancerAgentParamsVrrp
	Haproxy            LoadbalancerAgentParamsHaproxy
	Telegraf           LoadbalancerAgentParamsTelegraf
}

type LoadbalancerAgentParamsHaproxy

type LoadbalancerAgentParamsHaproxy struct {
	GlobalLog      string
	GlobalNbthread int
	LogHttp        bool
	LogTcp         bool
	LogNormal      bool
	TuneHttpMaxhdr int
}

type LoadbalancerAgentParamsTelegraf

type LoadbalancerAgentParamsTelegraf struct {
	InfluxDbOutputUrl       string
	InfluxDbOutputName      string
	InfluxDbOutputUnsafeSsl bool
	HaproxyInputInterval    int
}

type LoadbalancerAgentParamsVrrp

type LoadbalancerAgentParamsVrrp struct {
	Priority          int
	VirtualRouterId   int
	GarpMasterRefresh int
	Preempt           bool
	Interface         string
	AdvertInt         int
	Pass              string
}

type LoadbalancerBackend

type LoadbalancerBackend struct {
	VirtualResource
	ManagedResource
	ExternalizedResource

	CloudregionId  string
	BackendGroupId string
	BackendId      string
	BackendType    string
	BackendRole    string
	Weight         int
	Address        string
	Port           int

	SendProxy string
	Ssl       string
}

type LoadbalancerBackendGroup

type LoadbalancerBackendGroup struct {
	VirtualResource
	ManagedResource
	ExternalizedResource

	Type           string
	LoadbalancerId string
	CloudregionId  string
}

type LoadbalancerCertificate

type LoadbalancerCertificate struct {
	VirtualResource
	ManagedResource
	ExternalizedResource

	Certificate string
	PrivateKey  string

	CloudregionId           string
	PublicKeyAlgorithm      string
	PublicKeyBitLen         int
	SignatureAlgorithm      string
	Fingerprint             string
	NotBefore               time.Time
	NotAfter                time.Time
	CommonName              string
	SubjectAlternativeNames string
}

type LoadbalancerCluster

type LoadbalancerCluster struct {
	StandaloneResource
	ZoneId string
}

type LoadbalancerDeployment

type LoadbalancerDeployment struct {
	Host            string
	AnsiblePlaybook string
}

type LoadbalancerHTTPListener

type LoadbalancerHTTPListener struct {
	StickySession              string
	StickySessionType          string
	StickySessionCookie        string
	StickySessionCookieTimeout int

	XForwardedFor bool
	Gzip          bool
}

type LoadbalancerHTTPRateLimiter

type LoadbalancerHTTPRateLimiter struct {
	HTTPRequestRate       int
	HTTPRequestRatePerSrc int
}

type LoadbalancerHTTPRedirect

type LoadbalancerHTTPRedirect struct {
	Redirect       string
	RedirectCode   int
	RedirectScheme string
	RedirectHost   string
	RedirectPath   string
}

type LoadbalancerHTTPSListener

type LoadbalancerHTTPSListener struct {
	CertificateId   string
	TLSCipherPolicy string
	EnableHttp2     bool
}

CACertificate string

type LoadbalancerListener

type LoadbalancerListener struct {
	VirtualResource
	ManagedResource
	ExternalizedResource

	CloudregionId  string
	LoadbalancerId string
	ListenerType   string
	ListenerPort   int
	EgressMbps     int

	Scheduler string

	SendProxy string

	ClientRequestTimeout  int
	ClientIdleTimeout     int
	BackendConnectTimeout int
	BackendIdleTimeout    int

	BackendGroupId    string
	BackendServerPort int

	AclStatus string
	AclType   string
	AclId     string

	HealthCheck     string
	HealthCheckType string

	HealthCheckDomain   string
	HealthCheckURI      string
	HealthCheckHttpCode string

	HealthCheckRise     int
	HealthCheckFall     int
	HealthCheckInterval int
	HealthCheckTimeout  int

	HealthCheckReq string
	HealthCheckExp string

	LoadbalancerTCPListener
	LoadbalancerUDPListener
	LoadbalancerHTTPListener
	LoadbalancerHTTPSListener

	LoadbalancerHTTPRateLimiter
	LoadbalancerHTTPRedirect
}

type LoadbalancerListenerRule

type LoadbalancerListenerRule struct {
	VirtualResource
	ManagedResource
	ExternalizedResource

	CloudregionId  string
	ListenerId     string
	BackendGroupId string

	Domain string
	Path   string

	LoadbalancerHTTPRateLimiter
	LoadbalancerHTTPRedirect
}

type LoadbalancerTCPListener

type LoadbalancerTCPListener struct{}

type LoadbalancerUDPListener

type LoadbalancerUDPListener struct{}

type ManagedResource

type ManagedResource struct {
	ManagerId string
}

type Resource

type Resource struct {
	CreatedAt     time.Time
	UpdatedAt     time.Time
	UpdateVersion int
	DeletedAt     time.Time
	Deleted       bool
}

func (*Resource) GetUpdateVersion

func (r *Resource) GetUpdateVersion() int

func (*Resource) GetUpdatedAt

func (r *Resource) GetUpdatedAt() time.Time

type Server

type Server struct {
	VirtualResource

	VcpuCount int
	VmemSize  int

	BootOrder string

	DisableDelete    tristate.TriState
	ShutdownBehavior string

	KeypairId string

	HostId       string
	BackupHostId string

	Vga     string
	Vdi     string
	Machine string
	Bios    string
	OsType  string

	FlavorId string

	SecgrpId      string
	AdminSecgrpId string

	Hypervisor string

	InstanceType string

	// Derived attributes
	Networks string
	Eip      string
	Nics     ServerNics
}

type ServerNetwork

type ServerNetwork struct {
	Index   int
	Ip      net.IP
	IpMask  int
	MacAddr net.HardwareAddr
	VlanId  int

	Name   string
	Driver string
	Bw     int
}

type ServerNetworks

type ServerNetworks []ServerNetwork

func ParseServerNetworkDetailedString

func ParseServerNetworkDetailedString(s string) (ServerNetworks, error)

func (ServerNetworks) GetPrivateIPs

func (sns ServerNetworks) GetPrivateIPs() []net.IP

type ServerNic

type ServerNic struct {
	IpAddr    string `json:"ip_addr"`
	Mac       string `json:"mac"`
	NetworkId string `json:"network_id"`
	VpcId     string `json:"VpcId"`
}

type ServerNics

type ServerNics []ServerNic

type SharableVirtualResource

type SharableVirtualResource struct {
	VirtualResource

	IsPublic bool
}

type SshKeypair

type SshKeypair struct {
	PrivateKey string
	PublicKey  string
}

type StandaloneResource

type StandaloneResource struct {
	Resource

	Id          string
	Name        string
	Description string
	IsEmulated  bool
}

func (*StandaloneResource) GetId

func (r *StandaloneResource) GetId() string

type StatusStandaloneResource

type StatusStandaloneResource struct {
	StandaloneResource

	Status string
}

type VirtualResource

type VirtualResource struct {
	StatusStandaloneResource

	DomainId         string
	ProjectId        string
	IsSystem         bool
	PendingDeletedAt time.Time
	PendingDeleted   bool
}

func (*VirtualResource) GetPendingDeleted

func (r *VirtualResource) GetPendingDeleted() bool

Jump to

Keyboard shortcuts

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