hypervisors

package
v0.0.0-...-f8ec1b3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package hypervisors gives information and control of the os-hypervisors portion of the compute API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List makes a request against the API to list hypervisors.

Types

type CPUInfo

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

type Hypervisor

type Hypervisor struct {
	// A structure that contains cpu information like arch, model, vendor, features and topology
	CPUInfo CPUInfo `json:"-"`
	// The current_workload is the number of tasks the hypervisor is responsible for.
	// This will be equal or greater than the number of active VMs on the system
	// (it can be greater when VMs are being deleted and the hypervisor is still cleaning up).
	CurrentWorkload int `json:"current_workload"`
	// Status of the hypervisor, either "enabled" or "disabled"
	Status string `json:"status"`
	// State of the hypervisor, either "up" or "down"
	State string `json:"state"`
	// Actual free disk on this hypervisor in GB
	DiskAvailableLeast int `json:"disk_available_least"`
	// The hypervisor's IP address
	HostIP string `json:"host_ip"`
	// The free disk remaining on this hypervisor in GB
	FreeDiskGB int `json:"-"`
	// The free RAM in this hypervisor in MB
	FreeRamMB int `json:"free_ram_mb"`
	// The hypervisor host name
	HypervisorHostname string `json:"hypervisor_hostname"`
	// The hypervisor type
	HypervisorType string `json:"hypervisor_type"`
	// The hypervisor version
	HypervisorVersion int `json:"-"`
	// Unique ID of the hypervisor
	ID int `json:"id"`
	// The disk in this hypervisor in GB
	LocalGB int `json:"-"`
	// The disk used in this hypervisor in GB
	LocalGBUsed int `json:"local_gb_used"`
	// The memory of this hypervisor in MB
	MemoryMB int `json:"memory_mb"`
	// The memory used in this hypervisor in MB
	MemoryMBUsed int `json:"memory_mb_used"`
	// The number of running vms on this hypervisor
	RunningVMs int `json:"running_vms"`
	// The hypervisor service object
	Service Service `json:"service"`
	// The number of vcpu in this hypervisor
	VCPUs int `json:"vcpus"`
	// The number of vcpu used in this hypervisor
	VCPUsUsed int `json:"vcpus_used"`
}

func ExtractHypervisors

func ExtractHypervisors(p pagination.Page) ([]Hypervisor, error)

func (*Hypervisor) UnmarshalJSON

func (r *Hypervisor) UnmarshalJSON(b []byte) error

type HypervisorPage

type HypervisorPage struct {
	pagination.SinglePageBase
}

func (HypervisorPage) IsEmpty

func (page HypervisorPage) IsEmpty() (bool, error)

type Service

type Service struct {
	Host           string `json:"host"`
	ID             int    `json:"id"`
	DisabledReason string `json:"disabled_reason"`
}

type Topology

type Topology struct {
	Sockets int `json:"sockets"`
	Cores   int `json:"cores"`
	Threads int `json:"threads"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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