models

package
v0.3.10-0-alpha2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 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 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