datacenter

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ListTimeout = 200
)

Functions

func ApplyDefault

func ApplyDefault(model interface{}, conf *config.Config)

Types

type DcAvailableOVF

type DcAvailableOVF struct {
	Id            string
	Name          string
	StorageSizeGB int
	CpuCount      int
	MemorySizeMB  int
}

type DcComputeLimits

type DcComputeLimits struct {
	Cpu       DcResourceLimit
	MemoryGB  DcResourceLimit
	StorageGB DcResourceLimit
}

type DcLoadBalancer

type DcLoadBalancer struct {
	Name        string
	Description string
	IpAddress   string
	Status      string
}

type DcNetworkLimits

type DcNetworkLimits struct {
	Networks DcResourceLimit
}

type DcResourceLimit

type DcResourceLimit struct {
	Value     int
	Inherited bool
}

type DeployableNetwork

type DeployableNetwork struct {
	Name      string
	NetworkId string
	Type      string
	AccountId string
}

type GetBMCapReq

type GetBMCapReq struct {
	DataCenter string `valid:"required" URIParam:"yes"`
}

type GetBMCapRes

type GetBMCapRes struct {
	SKUs             []SKU             `json:"skus"`
	OperatingSystems []OperatingSystem `json:"operatingSystems"`
}

type GetDCReq

type GetDCReq struct {
	DataCenter string `valid:"required" URIParam:"yes"`
}

type GetDCRes

type GetDCRes struct {
	SupportsSharedLoadBalancer bool
	SupportsBareMetalServers   bool
	DeployableNetworks         []DeployableNetwork
	Templates                  []Template
	ImportableOsTypes          []ImportableOSType
}

type GetReq

type GetReq struct {
	DataCenter        string `valid:"required"`
	WithComputeLimits base.NilField
	WithNetworkLimits base.NilField
	WithAvailableOvfs base.NilField
	WithLoadBalancers base.NilField
}

type GetRes

type GetRes struct {
	Id            string
	Name          string
	ComputeLimits *DcComputeLimits  `json:",omitempty"`
	NetworkLimits *DcNetworkLimits  `json:",omitempty"`
	AvailableOVFs *[]DcAvailableOVF `json:",omitempty"`
	LoadBalancers *[]DcLoadBalancer `json:",omitempty"`
	Links         models.Links
}

func All

func All(cn base.Connection, withComputeLimits, withNetworkLimits, withAvailableOvfs, withLoadBalancers bool) ([]GetRes, error)

func Get

func Get(cn base.Connection, dcId string, withComputeLimits, withNetworkLimits, withAvailableOvfs, withLoadBalancers bool) (GetRes, error)

type ImportableOSType

type ImportableOSType struct {
	Id                 int64
	Description        string
	LabProductCode     string
	PremiumProductCode string
	Type               string
}

type ListReq

type ListReq struct {
	WithComputeLimits base.NilField
	WithNetworkLimits base.NilField
	WithAvailableOvfs base.NilField
	WithLoadBalancers base.NilField
}

type ListRes

type ListRes GetRes

type Memory

type Memory struct {
	CapacityInGB int `json:"capacityGB"`
}

type OperatingSystem

type OperatingSystem struct {
	Type                string  `json:"type"`
	Description         string  `json:"description"`
	HourlyRatePerSocket float32 `json:"hourlyRatePerSocket"`
}

type Processor

type Processor struct {
	Sockets        int    `json:"sockets"`
	CoresPerSocket int    `json:"coresPerSocket"`
	Description    string `json:"description"`
}

type SKU

type SKU struct {
	ID           string    `json:"id"`
	HourlyRate   float32   `json:"hourlyRate"`
	Availability string    `json:"availability"`
	Memory       []Memory  `json:"memory"`
	Processor    Processor `json:"processor"`
	Storage      []Storage `json:"storage"`
}

type SetDefault

type SetDefault struct {
	DataCenter string `valid:"required"`
}

type Storage

type Storage struct {
	Type         string `json:"type"`
	CapacityInGB int    `json:"capacityGB"`
	SpeedInRPM   int    `json:"speedRpm"`
}

type Template

type Template struct {
	Name               string
	Description        string
	StorageSizeGB      int64
	Capabilities       []string
	ReservedDrivePaths []string
	DrivePathLength    int64
}

Jump to

Keyboard shortcuts

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