oracle

package
v0.0.0-...-2215086 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Tenancy              string
	User                 string
	Region               string
	Fingerprint          string
	PrivateKey           string
	PrivateKeyPassphrase *string

	ConfigFilePath string
	Profile        string
}

type ITRACloudInfo

type ITRACloudInfo struct {
	PartNumber string          `json:"partNumber"`
	Prices     []ITRAPriceInfo `json:"prices"`
}

ITRACloudInfo holds information of a product

func (*ITRACloudInfo) GetPrice

func (ipi *ITRACloudInfo) GetPrice(model string) float64

GetPrice gets the value of the given price model from gathered prices

type ITRAPriceInfo

type ITRAPriceInfo struct {
	Model string  `json:"model"`
	Value float64 `json:"value"`
}

ITRAPriceInfo holds price information

type ITRAResponse

type ITRAResponse struct {
	Items   []ITRACloudInfo `json:"items"`
	Link    string          `json:"canonicalLink"`
	HasMode bool            `json:"hasMore"`
	Limit   uint            `json:"limit"`
	Offset  uint            `json:"offset"`
}

ITRAResponse represents a response of ITRA product info request

type Infoer

type Infoer struct {
	// contains filtered or unexported fields
}

Infoer encapsulates the data and operations needed to access external resources

func NewOracleInfoer

func NewOracleInfoer(config Config, logger cloudinfo.Logger) (*Infoer, error)

NewOracleInfoer creates a new instance of the Oracle infoer.

func (*Infoer) GetCloudInfoFromITRA

func (i *Infoer) GetCloudInfoFromITRA(partNumber string) (info ITRACloudInfo, err error)

GetCloudInfoFromITRA gets product information from ITRA api by part number

func (*Infoer) GetCurrentPrices

func (i *Infoer) GetCurrentPrices(region string) (map[string]types.Price, error)

GetCurrentPrices retrieves all the spot prices in a region

func (*Infoer) GetProductPrice

func (i *Infoer) GetProductPrice(specs ShapeSpecs) (float64, error)

GetProductPrices gets prices for available shapes from ITRA

func (*Infoer) GetProducts

func (i *Infoer) GetProducts(vms []types.VMInfo, service, regionId string) ([]types.VMInfo, error)

GetProducts retrieves the available virtual machines types in a region

func (*Infoer) GetRegions

func (i *Infoer) GetRegions(service string) (map[string]string, error)

GetRegions returns a map with available regions

func (*Infoer) GetServiceImages

func (i *Infoer) GetServiceImages(service, region string) ([]types.Image, error)

GetServiceImages retrieves the images supported by the given service in the given region

func (*Infoer) GetServiceProducts

func (i *Infoer) GetServiceProducts(region, service string) ([]types.ProductDetails, error)

GetServiceProducts retrieves the products supported by the given service in the given region

func (*Infoer) GetVersions

func (i *Infoer) GetVersions(service, region string) ([]types.LocationVersion, error)

GetVersions retrieves the kubernetes versions supported by the given service in the given region

func (*Infoer) GetVirtualMachines

func (i *Infoer) GetVirtualMachines(region string) ([]types.VMInfo, error)

func (*Infoer) GetZones

func (i *Infoer) GetZones(region string) ([]string, error)

GetZones returns the availability zones in a region

func (*Infoer) HasImages

func (i *Infoer) HasImages() bool

HasImages - Oracle support images

func (*Infoer) HasShortLivedPriceInfo

func (i *Infoer) HasShortLivedPriceInfo() bool

HasShortLivedPriceInfo - Oracle doesn't have preemptible instances

func (*Infoer) Initialize

func (i *Infoer) Initialize() (map[string]map[string]types.Price, error)

Initialize downloads and parses the SKU list of the Compute Engine service

type OCINetworkMapper

type OCINetworkMapper struct {
}

OCINetworkMapper module object for handling Oracle specific VM to Networking capabilities mapping

func (*OCINetworkMapper) MapNetworkPerf

func (nm *OCINetworkMapper) MapNetworkPerf(ntwPerf string) (string, error)

MapNetworkPerf maps the network performance of the instance to the category supported by telescopes

type ShapeSpecs

type ShapeSpecs struct {
	PartNumber string
	Cpus       float64 `json:"cpusPerVm"`
	Mem        float64 `json:"memPerVm"`
	NtwPerf    string  `json:"NtwPerf"`
}

ShapeSpecs representation the specs of a certain type of virtual machine

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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