types

package
v0.0.0-...-53c686c Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchFrameStat

type BatchFrameStat struct {
	NumInstances             int     `json:"num_instances"`
	TotalElapsed             float64 `json:"total_elapsed"`
	AverageElapsed           float64 `json:"average_elapsed"`
	AverageControllerElapsed float64 `json:"average_controller_elapsed"`
	AverageLauncherElapsed   float64 `json:"average_launcher_elapsed"`
	AverageSchedulerElapsed  float64 `json:"average_scheduler_elapsed"`
	VarianceController       float64 `json:"controller_variance"`
	VarianceLauncher         float64 `json:"launcher_variance"`
	VarianceScheduler        float64 `json:"scheduler_variance"`
}

BatchFrameStat contains tracing information for a group of start requests by label.

type BatchFrameSummary

type BatchFrameSummary struct {
	BatchID      string `json:"batch_id"`
	NumInstances int    `json:"num_instances"`
}

BatchFrameSummary provides summary information on tracing per label.

type BlockData

type BlockData struct {
	storage.BlockDevice
	TenantID    string     // the tenant who owns this volume
	Size        int        // size in GB
	State       BlockState // status of
	CreateTime  time.Time  // when we created the volume
	Name        string     // a human readable name for this volume
	Description string     // some text to describe this volume.
}

BlockData respresents the attributes of this block device. TBD - do we really need to store this as actual data, or can we use a set of interfaces to get the info?

type BlockState

type BlockState string

BlockState represents the state of the block device in the controller datastore. This is a subset of the openstack status type.

const (
	// Available means that the volume is ok for attaching.
	Available BlockState = BlockState(block.Available)

	// Attaching means that the volume is in the process
	// of attaching to an instance.
	Attaching BlockState = BlockState(block.Attaching)

	// InUse means that the volume has been successfully
	// attached to an instance.
	InUse BlockState = BlockState(block.InUse)

	// Detaching means that the volume is in process
	// of detaching.
	Detaching BlockState = "detaching"
)

type FrameStat

type FrameStat struct {
	ID               string  `json:"node_id"`
	TotalElapsedTime float64 `json:"total_elapsed_time"`
	ControllerTime   float64 `json:"total_controller_time"`
	LauncherTime     float64 `json:"total_launcher_time"`
	SchedulerTime    float64 `json:"total_scheduler_time"`
}

FrameStat contains tracing information per node.

type Instance

type Instance struct {
	ID          string              `json:"instance_id"`
	TenantID    string              `json:"tenant_id"`
	State       string              `json:"instance_state"`
	WorkloadID  string              `json:"workload_id"`
	NodeID      string              `json:"node_id"`
	MACAddress  string              `json:"mac_address"`
	IPAddress   string              `json:"ip_address"`
	SSHIP       string              `json:"ssh_ip"`
	SSHPort     int                 `json:"ssh_port"`
	CNCI        bool                `json:"-"`
	Usage       map[string]int      `json:"-"`
	Attachments []StorageAttachment `json:"-"`
}

Instance contains information about an instance of a workload.

type LogEntry

type LogEntry struct {
	Timestamp time.Time `json:"time_stamp"`
	TenantID  string    `json:"tenant_id"`
	EventType string    `json:"type"`
	Message   string    `json:"message"`
}

LogEntry stores information about events.

type Node

type Node struct {
	ID       string `json:"node_id"`
	IPAddr   string `json:"ip_address"`
	Hostname string `json:"hostname"`
}

Node contains information about a physical node in the cluster.

type NodeStats

type NodeStats struct {
	NodeID          string    `json:"node_id"`
	Timestamp       time.Time `json:"time_stamp"`
	Load            int       `json:"load"`
	MemTotalMB      int       `json:"mem_total_mb"`
	MemAvailableMB  int       `json:"mem_available_mb"`
	DiskTotalMB     int       `json:"mem_total_mb"`
	DiskAvailableMB int       `json:"disk_available_mb"`
	CpusOnline      int       `json:"cpus_online"`
}

NodeStats stores statistics for individual nodes in the cluster.

type NodeSummary

type NodeSummary struct {
	NodeID                string `json:"node_id"`
	TotalInstances        int    `json:"total_instances"`
	TotalRunningInstances int    `json:"total_running_instances"`
	TotalPendingInstances int    `json:"total_pending_instances"`
	TotalPausedInstances  int    `json:"total_paused_instances"`
}

NodeSummary contains summary information for all nodes in the cluster.

type Resource

type Resource struct {
	Rname string
	Rtype int
	Limit int
	Usage int
}

Resource contains quota or limit information on a resource type.

func (*Resource) OverLimit

func (r *Resource) OverLimit(request int) bool

OverLimit calculates whether a request will put a tenant over it's limit.

type SortedComputeNodesByID

type SortedComputeNodesByID []payloads.CiaoComputeNode

SortedComputeNodesByID implements sort.Interface for Node by ID string

func (SortedComputeNodesByID) Len

func (s SortedComputeNodesByID) Len() int

func (SortedComputeNodesByID) Less

func (s SortedComputeNodesByID) Less(i, j int) bool

func (SortedComputeNodesByID) Swap

func (s SortedComputeNodesByID) Swap(i, j int)

type SortedInstancesByID

type SortedInstancesByID []*Instance

SortedInstancesByID implements sort.Interface for Instance by ID string

func (SortedInstancesByID) Len

func (s SortedInstancesByID) Len() int

func (SortedInstancesByID) Less

func (s SortedInstancesByID) Less(i, j int) bool

func (SortedInstancesByID) Swap

func (s SortedInstancesByID) Swap(i, j int)

type SourceType

type SourceType string

SourceType contains the valid values of the storage source.

const (
	// ImageService indicates the source comes from the image service.
	ImageService SourceType = "image"

	// VolumeService indicates the source comes from the volume service.
	VolumeService SourceType = "volume"
)

type StorageAttachment

type StorageAttachment struct {
	ID         string // a uuid
	InstanceID string // the instance this volume is attached to
	BlockID    string // the ID of the block device
}

StorageAttachment represents a link between a block device and an instance.

type StorageResource

type StorageResource struct {
	// ID indicates a volumeID. If ID is blank, then it needs to be created.
	ID string

	// Bootable indicates whether should the resource be used for booting
	Bootable bool

	// Persistent indicates whether the storage is temporary
	// TBD: do we bother to save info about temp storage?
	//      does it count against quota?
	Persistent bool

	// Size is the size of the storage to be created if new.
	Size int

	// ImageType indicates whether we are making a new resource
	// based on an image or existing volume.
	// Needed only for new storage.
	SourceType SourceType
}

StorageResource defines a storage resource for a workload. TBD: should the workload support multiple of these?

type Tenant

type Tenant struct {
	ID        string
	Name      string
	CNCIID    string
	CNCIMAC   string
	CNCIIP    string
	Resources []*Resource
}

Tenant contains information about a tenant or project.

type TenantCNCI

type TenantCNCI struct {
	TenantID   string   `json:"tenant_id"`
	IPAddress  string   `json:"ip_address"`
	MACAddress string   `json:"mac_address"`
	InstanceID string   `json:"instance_id"`
	Subnets    []string `json:"subnets"`
}

TenantCNCI contains information about the CNCI instance for a tenant.

type Workload

type Workload struct {
	ID          string                       `json:"id"`
	Description string                       `json:"description"`
	FWType      string                       `json:"-"`
	VMType      payloads.Hypervisor          `json:"-"`
	ImageID     string                       `json:"-"`
	ImageName   string                       `json:"-"`
	Config      string                       `json:"-"`
	Defaults    []payloads.RequestedResource `json:"-"`
	Storage     *StorageResource             `json:"-"`
}

Workload contains resource and configuration information for a user workload.

Jump to

Keyboard shortcuts

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