core

package
v1.6.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunGetTask

func RunGetTask(limesV1 *gophercloud.ServiceClient, t GetTask, outputFmt string)

RunGetTask is the function that operates on a GetTask and shows the output in the respective format that is specified at the command line.

func RunListTask

func RunListTask(limesV1 *gophercloud.ServiceClient, t ListTask, outputFmt string)

RunListTask is the function that operates on a ListTask and shows the output in the respective format that is specified at the command line.

func RunSetTask

func RunSetTask(limesV1 *gophercloud.ServiceClient, t SetTask, q Quotas)

RunSetTask is the function that operates on a SetTask and shows the output in the respective format that is specified at the command line.

func RunSyncTask

func RunSyncTask(limesV1 *gophercloud.ServiceClient, p *Project)

RunSyncTask schedules a sync job that pulls quota and usage data for a project from the backing services into Limes' local database.

Types

type Cluster

type Cluster struct {
	ID     string
	Result clusters.CommonResult
	IsList bool
	Filter Filter
	Output Output
}

Cluster contains information regarding a cluster(s). As different methods are called on it, the fields within the structure are updated accordingly. Call its appropriate method to get/list/update a Cluster.

type Domain

type Domain struct {
	ID     string
	Name   string
	Result domains.CommonResult
	IsList bool
	Filter Filter
	Output Output
}

Domain contains information regarding a domain(s). As different methods are called on it, the fields within the structure are updated accordingly. Call its appropriate method to get/list/update a Domain.

func FindDomain

func FindDomain(identityV3, limesV1 *gophercloud.ServiceClient, userInput, clusterID string) (*Domain, error)

FindDomain uses the user's input (name/UUID/"current") to find a specific domain within the token scope. Different strategies are tried in a chronological order to find the relevant domain in the most efficient way possible.

type Filter

type Filter struct {
	Cluster  string
	Area     string
	Service  string
	Resource string
}

Filter contains different parameters for filtering a get/list/update operation.

type GetTask

type GetTask interface {
	Renderer
	// contains filtered or unexported methods
}

GetTask is the interface type that abstracts a get operation.

type ListTask

type ListTask interface {
	Renderer
	// contains filtered or unexported methods
}

ListTask is the interface type that abstracts a list operation.

type Output

type Output struct {
	Names         bool
	Long          bool
	HumanReadable bool
}

Output contains different options that affect the output of a get/list operation.

type Project

type Project struct {
	ID         string
	Name       string
	DomainID   string
	DomainName string
	Result     projects.CommonResult
	IsList     bool
	Filter     Filter
	Output     Output
}

Project contains information regarding a project(s). As different methods are called on it, the fields within the structure are updated accordingly. Call its appropriate method to get/list/update a Project.

func FindProject

func FindProject(identityV3, limesV1 *gophercloud.ServiceClient, userInputProject, userInputDomain, clusterID string) (*Project, error)

FindProject uses the user's input (name/UUID/"current") to find a specific project within the token scope. Different strategies are tried in a chronological order to find the relevant project in the most efficient way possible.

type Quotas

type Quotas map[string][]Resource

Quotas is a map of service name to a list of resources. It contains the aggregate quota values used by the set methods to update a single cluster/domain/project.

func ParseRawQuotas

func ParseRawQuotas(limesV1 *gophercloud.ServiceClient, s baseUnitsSetter, rq RawQuotas, isTest bool) (Quotas, error)

ParseRawQuotas parses the raw quota values given at the command line to a Quotas map.

type RawQuotas

type RawQuotas []string

RawQuotas contains the quota values provided at the command line.

type Renderer

type Renderer interface {
	// contains filtered or unexported methods
}

Renderer interface type contains different methods for rendering data in different formats.

type Resource

type Resource struct {
	Name    string
	Value   int64
	Unit    limes.Unit
	Comment string
}

Resource contains quota information about a single resource.

type SetTask

type SetTask interface {
	// contains filtered or unexported methods
}

SetTask is the interface type that abstracts a put operation.

Jump to

Keyboard shortcuts

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