nova

package
v0.0.0-...-2ab8be3 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var POWER_STATE = []string{
	"NOSTATE", "Running", "", "Paused", "ShutDown", "", "Crashed", "Suspend",
}

Functions

This section is empty.

Types

type AZHost

type AZHost map[string]ServiceState

type Address

type Address struct {
	MacAddr string `json:"OS-EXT-IPS-MAC:mac_addr"`
	Version int    `json:"version"`
	Addr    string `json:"addr"`
	Type    string `json:"OS-EXT-IPS:type"`
}

type AddressList

type AddressList []Address

func (AddressList) Addrs

func (a AddressList) Addrs() []string

type Aggregate

type Aggregate struct {
	Id               int               `json:"id"`
	Name             string            `json:"name"`
	AvailabilityZone string            `json:"availability_zone"`
	Deleted          bool              `json:"deleted"`
	Hosts            []string          `json:"hosts,omitempty"`
	Metadata         map[string]string `json:"metadata,omitempty"`
	CreatedAt        string            `json:"created_at,omitempty"`
	UpdatedAt        string            `json:"updated_at,omitempty"`
	DeletedAt        string            `json:"deleted_at,omitempty"`
}

func (Aggregate) GetMetadataList

func (agg Aggregate) GetMetadataList() []string

func (Aggregate) MarshalMetadata

func (agg Aggregate) MarshalMetadata() string

type AvailabilityZone

type AvailabilityZone struct {
	ZoneName  string            `json:"zoneName"`
	ZoneState ZoneState         `json:"zoneState"`
	Hosts     map[string]AZHost `json:"hosts,omitempty"`
}

type BlockDeviceMappingV2

type BlockDeviceMappingV2 struct {
	BootIndex          int    `json:"boot_index"`
	UUID               string `json:"uuid,omitempty"`
	VolumeSize         uint16 `json:"volume_size,omitempty"`
	SourceType         string `json:"source_type,omitempty"`
	DestinationType    string `json:"destination_type,omitempty"`
	VolumeType         string `json:"volume_type,omitempty"`
	DeleteOnTemination bool   `json:"delete_on_termination,omitempty"`
}

type Console

type Console struct {
	Type     string `json:"type"`
	Url      string `json:"url"`
	Protocol string `json:"protocol"`
}

type ConsoleLog

type ConsoleLog struct {
	Output string `json:"output"`
}

type CpuInfo

type CpuInfo struct {
	Arch     string                 `json:"arch"`
	Model    string                 `json:"model"`
	Vendor   string                 `json:"vendor"`
	Features []string               `json:"Features"`
	Topology map[string]interface{} `json:"topology"`
}

type ExtraSpecs

type ExtraSpecs map[string]string

func ParseExtraSpecsMap

func ParseExtraSpecsMap(extraSpecs []string) ExtraSpecs

func (ExtraSpecs) Get

func (extraSpecs ExtraSpecs) Get(key string) string

func (ExtraSpecs) GetList

func (extraSpecs ExtraSpecs) GetList() []string

type Fault

type Fault struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
	Details string `json:"details,omitempty"`
}

func (*Fault) Marshal

func (fault *Fault) Marshal() string

type FixedIp

type FixedIp struct {
	IpAddress string `json:"ip_address"`
	SubnetId  string `json:"subnet_id"`
}

type Flavor

type Flavor struct {
	Id           string      `json:"id,omitempty"`
	Name         string      `json:"name,omitempty"`
	OriginalName string      `json:"original_name,omitempty"`
	Ram          int         `json:"ram,omitempty"`
	Vcpus        int         `json:"vcpus,omitempty"`
	Disk         int         `json:"disk"`
	Swap         interface{} `json:"swap,omitempty"`
	RXTXFactor   float32     `json:"rxtx_factor,omitempty"`
	ExtraSpecs   ExtraSpecs  `json:"extra_specs,omitempty"`
	IsPublic     bool        `json:"os-flavor-access:is_public,omitempty"`
	Ephemeral    int         `json:"OS-FLV-DISABLED:ephemeral,omitempty"`
	Disabled     bool        `json:"OS-FLV-DISABLED:disabled,omitempty"`
}

func (Flavor) BaseInfo

func (flavor Flavor) BaseInfo() string

func (Flavor) Marshal

func (flavor Flavor) Marshal() string

type Flavors

type Flavors []Flavor

type Hypervisor

type Hypervisor struct {
	model.Resource
	Hostname       string                 `json:"hypervisor_hostname"`
	HostIp         string                 `json:"host_ip"`
	Status         string                 `json:"status"`
	State          string                 `json:"state"`
	Type           string                 `json:"hypervisor_type"`
	Version        int                    `json:"hypervisor_version"`
	Uptime         string                 `json:"uptime"`
	Vcpus          int                    `json:"vcpus"`
	VcpusUsed      int                    `json:"vcpus_used"`
	MemoryMB       int                    `json:"memory_mb"`
	MemoryMBUsed   int                    `json:"memory_mb_used"`
	ExtraResources map[string]interface{} `json:"extra_resources"`
	CpuInfo        CpuInfo                `json:"cpu_info"`

	NumaNode0Hugepages map[string]interface{} `json:"numa_node_0_hugepages"`
	NumaNode1Hugepages map[string]interface{} `json:"numa_node_1_hugepages"`
	NumaNode2Hugepages map[string]interface{} `json:"numa_node_2_hugepages"`
	NumaNode3Hugepages map[string]interface{} `json:"numa_node_3_hugepages"`

	NumaNode0Cpuset map[string]interface{} `json:"numa_node_0_cpuset"`
	NumaNode1Cpuset map[string]interface{} `json:"numa_node_1_cpuset"`
	NumaNode2Cpuset map[string]interface{} `json:"numa_node_2_cpuset"`
	NumaNode3Cpuset map[string]interface{} `json:"numa_node_3_cpuset"`

	Servers []HypervisorServer
}

func (Hypervisor) ExtraResourcesMarshal

func (hypervisor Hypervisor) ExtraResourcesMarshal(indent bool) string

type HypervisorServer

type HypervisorServer struct {
	Name string `json:"name"`
	UUID string `json:"uuid"`
}

type Hypervisors

type Hypervisors []Hypervisor

type Image

type Image struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type InstanceAction

type InstanceAction struct {
	model.Resource
	Action       string                `json:"action"`
	InstanceUUID string                `json:"instance_uuid"`
	Message      string                `json:"message"`
	RequestId    string                `json:"request_id"`
	StartTime    string                `json:"start_time"`
	Events       []InstanceActionEvent `json:"events"`
}

type InstanceActionAndEvents

type InstanceActionAndEvents struct {
	InstanceAction InstanceAction        `json:"action"`
	RequestId      string                `json:"request_id"`
	Events         []InstanceActionEvent `json:"events"`
}

func (InstanceActionAndEvents) GetSpendTime

func (actionWithEvents InstanceActionAndEvents) GetSpendTime() (float64, error)

type InstanceActionEvent

type InstanceActionEvent struct {
	Event      string `json:"event"`
	StartTime  string `json:"start_time"`
	FinishTime string `json:"finish_time"`
	Host       string `json:"host"`
	HostId     string `json:"hostId"`
	Result     string `json:"result"`
	Traceback  string `json:"traceback"`
}

func (InstanceActionEvent) GetSpendTime

func (event InstanceActionEvent) GetSpendTime() (float64, error)

type InstanceActionEvents

type InstanceActionEvents []InstanceActionEvent

type InstanceActions

type InstanceActions []InstanceAction

type InterfaceAttachment

type InterfaceAttachment struct {
	MacAddr   string    `json:"mac_addr"`
	NetId     string    `json:"net_id"`
	PortId    string    `json:"port_id"`
	PortState string    `json:"port_state"`
	FixedIps  []FixedIp `json:"fixed_ips"`
}

func (InterfaceAttachment) GetIPAddresses

func (attachment InterfaceAttachment) GetIPAddresses() []string

func (InterfaceAttachment) GetIpAddresses

func (attachment InterfaceAttachment) GetIpAddresses() []string

type Keypair

type Keypair struct {
	Keypair keypair `json:"keypair"`
}

type Keypairs

type Keypairs []Keypair

type Migration

type Migration struct {
	Id                int    `json:"id"`
	OldInstanceTypeId int    `json:"old_instance_type_id"`
	NewInstanceTypeId int    `json:"new_instance_type_id"`
	InstanceUUID      string `json:"instance_uuid"`
	MigrationType     string `json:"migration_type"`
	Status            string `json:"status"`
	DestCompute       string `json:"dest_compute"`
	DestNode          string `json:"dest_node"`
	DestHost          string `json:"dest_host"`
	SourceCompute     string `json:"source_compute"`
	SourceNode        string `json:"source_node"`
	SourceRegion      string `json:"source_region,omitempty"`
	DestRegion        string `json:"dest_regoin,omitempty"`
	CreatedAt         string `json:"created_at,omitempty"`
	UpdatedAt         string `json:"updated_at,omitempty"`
}

type RegionMigrateResp

type RegionMigrateResp struct {
	AllowLiveMigrate bool   `json:"allow_live_migrate"`
	Reason           string `json:"reason"`
}

type Server

type Server struct {
	model.Resource
	TaskState      string                  `json:"OS-EXT-STS:task_state,omitempty"`
	PowerState     int                     `json:"OS-EXT-STS:power_state,omitempty"`
	VmState        string                  `json:"OS-EXT-STS:vm_state,omitempty"`
	Host           string                  `json:"OS-EXT-SRV-ATTR:host,omitempty"`
	AZ             string                  `json:"OS-EXT-AZ:availability_zone,omitempty"`
	Flavor         Flavor                  `json:"flavor,omitempty"`
	Image          Image                   `json:"image,omitempty"`
	Fault          Fault                   `json:"fault,omitempty"`
	Addresses      map[string]AddressList  `json:"addresses,omitempty"`
	InstanceName   string                  `json:"OS-EXT-SRV-ATTR:instance_name,omitempty"`
	ConfigDriver   string                  `json:"config_drive,omitempty"`
	Created        string                  `json:"created,omitempty"`
	Updated        string                  `json:"updated,omitempty"`
	TerminatedAt   string                  `json:"OS-SRV-USG:terminated_at,omitempty"`
	LaunchedAt     string                  `json:"OS-SRV-USG:launched_at,omitempty"`
	UserId         string                  `json:"user_id,omitempty"`
	Description    string                  `json:"description,omitempty"`
	RootBdmType    string                  `json:"root_bdm_type,omitempty"`
	RootDeviceName string                  `json:"OS-EXT-SRV-ATTR:root_device_name,omitempty"`
	KeyName        string                  `json:"key_name,omitempty"`
	SecurityGroups []neutron.SecurityGroup `json:"security_groups,omitempty"`
	Progress       float32                 `json:"progress"`
}

func (Server) AllStatus

func (server Server) AllStatus() string

func (Server) GetFaultString

func (server Server) GetFaultString() string

func (Server) GetFlavorExtraSpecsString

func (server Server) GetFlavorExtraSpecsString() string

func (*Server) GetNetworks

func (server *Server) GetNetworks() []string

func (*Server) GetPowerState

func (server *Server) GetPowerState() string

func (*Server) GetTaskState

func (server *Server) GetTaskState() string

func (Server) InResize

func (server Server) InResize() bool

func (Server) IsActive

func (server Server) IsActive() bool

func (Server) IsError

func (server Server) IsError() bool

type ServerGroup

type ServerGroup struct {
	Id        string                 `json:"id"`
	Name      string                 `json:"name"`
	Policies  []string               `json:"policies"`
	Custom    bool                   `json:"custom"`
	Members   []string               `json:"members"`
	Metadata  map[string]interface{} `json:"metadata"`
	ProjectId string                 `json:"project_id"`
	UserId    string                 `json:"user_id"`
}

{"policies": ["soft-anti-affinity"], "name": "soft-anti-affinity", "custom": false, "members": [], "id": "7357b2f7-d004-4c72-b38a-d3a156827c11", "metadata": {}}]

func (ServerGroup) GetMetadataList

func (serverGroup ServerGroup) GetMetadataList() []string

type ServerOpt

type ServerOpt struct {
	Flavor               string                  `json:"flavorRef,omitempty"`
	Image                string                  `json:"imageRef,omitempty"`
	Name                 string                  `json:"name,omitempty"`
	Networks             interface{}             `json:"networks,omitempty"`
	AvailabilityZone     string                  `json:"availability_zone,omitempty"`
	BlockDeviceMappingV2 []BlockDeviceMappingV2  `json:"block_device_mapping_v2,omitempty"`
	MinCount             uint16                  `json:"min_count"`
	MaxCount             uint16                  `json:"max_count"`
	UserData             string                  `json:"user_data,omitempty"`
	KeyName              string                  `json:"key_name,omitempty"`
	AdminPass            string                  `json:"adminPass,omitempty"`
	SecurityGroups       []neutron.SecurityGroup `json:"security_groups,omitempty"`
}

type ServerOptNetwork

type ServerOptNetwork struct {
	UUID string `json:"uuid,omitempty"`
	Port string `json:"port,omitempty"`
}

func ParseServerOptNetworks

func ParseServerOptNetworks(nics []string) []ServerOptNetwork

type Servers

type Servers []Server

type Service

type Service struct {
	model.Resource
	Zone           string `json:"zone,omitempty"`
	Host           string `json:"host,omitempty"`
	Binary         string `json:"binary,omitempty"`
	Status         string `json:"status,omitempty"`
	State          string `json:"state,omitempty"`
	DisabledReason string `json:"disabled_reason,omitempty"`
	ForcedDown     bool   `json:"forced_down,omitempty"`
}

type ServiceState

type ServiceState struct {
	Available bool   `json:"available"`
	Active    bool   `json:"active"`
	UpdatedAt string `json:"updated_at"`
}

type Services

type Services []Service

type VolumeAttachment

type VolumeAttachment struct {
	Id                  string `json:"id"`
	Device              string `json:"device"`
	ServerId            string `json:"serverId"`
	VolumeId            string `json:"volumeId"`
	DeleteOnTermination bool   `json:"delete_on_termination,omitempty"`
}

type ZoneState

type ZoneState struct {
	Available bool `json:"available"`
}

Jump to

Keyboard shortcuts

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