azure

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: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AzureInfoer

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

AzureInfoer encapsulates the data and operations needed to access external Azure resources

func NewAzureInfoer

func NewAzureInfoer(config Config, logger cloudinfo.Logger) (*AzureInfoer, error)

NewAzureInfoer creates a new instance of the Azure infoer.

func (*AzureInfoer) GetCurrentPrices

func (a *AzureInfoer) GetCurrentPrices(region string) (map[string]types.Price, error)

GetCurrentPrices retrieves all the price info in a region

func (*AzureInfoer) GetProducts

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

GetProducts retrieves the available virtual machines based on the arguments provided

func (*AzureInfoer) GetRegions

func (a *AzureInfoer) GetRegions(service string) (map[string]string, error)

GetRegions returns a map with available regions transforms the api representation into a "plain" map

func (*AzureInfoer) GetServiceImages

func (a *AzureInfoer) GetServiceImages(service, region string) ([]types.Image, error)

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

func (*AzureInfoer) GetServiceProducts

func (a *AzureInfoer) GetServiceProducts(region, service string) ([]types.ProductDetails, error)

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

func (*AzureInfoer) GetVersions

func (a *AzureInfoer) GetVersions(service, region string) ([]types.LocationVersion, error)

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

func (*AzureInfoer) GetVirtualMachines

func (a *AzureInfoer) GetVirtualMachines(region string) ([]types.VMInfo, error)

func (*AzureInfoer) GetZones

func (a *AzureInfoer) GetZones(region string) ([]string, error)

GetZones returns the availability zones in a region Zones are currently only returned by the SKU (https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list#resourceskulocationinfo)

func (*AzureInfoer) HasImages

func (a *AzureInfoer) HasImages() bool

HasImages - Azure doesn't support images

func (*AzureInfoer) HasShortLivedPriceInfo

func (a *AzureInfoer) HasShortLivedPriceInfo() bool

HasShortLivedPriceInfo - Azure doesn't have frequently changing prices

func (*AzureInfoer) Initialize

func (a *AzureInfoer) Initialize() (map[string]map[string]types.Price, error)

Initialize downloads and parses the Rate Card API's meter list on Azure

type Config

type Config struct {
	SubscriptionID string

	ClientID     string
	ClientSecret string
	TenantID     string
}

type LocationRetriever

type LocationRetriever interface {
	ListLocations(ctx context.Context, subscriptionID string) (result subscriptions.LocationListResult, err error)
}

LocationRetriever collects regions

type PriceRetriever

type PriceRetriever interface {
	Get(ctx context.Context, filter string) (result commerce.ResourceRateCardInfo, err error)
}

PriceRetriever collects prices

type ProviderSource

type ProviderSource interface {
	Get(ctx context.Context, resourceProviderNamespace string, expand string) (result resources.Provider, err error)
}

ProviderSource returns the available location per provider

type ResourceSkuRetriever

type ResourceSkuRetriever interface {
	List(ctx context.Context) (result skus.ResourceSkusResultPage, err error)
}

ResourceSkuRetriever list of operations for retrieving virtual machines information

type VersionRetriever

type VersionRetriever interface {
	ListOrchestrators(ctx context.Context, location string, resourceType string) (result containerservice.OrchestratorVersionProfileListResult, err error)
}

VersionRetriever collects k8s versions

Jump to

Keyboard shortcuts

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