makecoe

package
v2.1.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2017 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 Account

type Account struct {
	// Optional custom endpoint specified by the user
	EndpointOverride string
	UserName         string
	APIKey           string
	Region           string

	// Testing only, not used by the cli
	AuthEndpointOverride string
	// contains filtered or unexported fields
}

Account is a set of authentication credentials accepted by Rackspace Identity

func (*Account) ApplyCache

func (account *Account) ApplyCache(c map[string]string)

ApplyCache applies a set of cached data

func (*Account) Authenticate

func (account *Account) Authenticate() (*libcarina.CarinaClient, error)

Authenticate creates an authenticated client, ready to use to communicate with the Carina API

func (*Account) BuildCache

func (account *Account) BuildCache() map[string]string

BuildCache builds the set of data to cache

func (*Account) GetClusterPrefix

func (account *Account) GetClusterPrefix() (string, error)

GetClusterPrefix returns a unique string to identity the account's clusters, e.g. public-[region]-[username]

func (*Account) GetID

func (account *Account) GetID() string

GetID returns a unique id for the account, e.g. public-[username]

func (*Account) NewClusterService

func (account *Account) NewClusterService() common.ClusterService

NewClusterService create the appropriate ClusterService for the account

type Cluster

type Cluster struct {
	*libcarina.Cluster
}

Cluster represents a cluster on make-coe

func (*Cluster) GetFlavor

func (cluster *Cluster) GetFlavor() string

GetFlavor returns the flavor of the nodes in the cluster

func (*Cluster) GetID

func (cluster *Cluster) GetID() string

GetID returns the cluster identifier

func (*Cluster) GetName

func (cluster *Cluster) GetName() string

GetName returns the cluster name

func (*Cluster) GetNodes

func (cluster *Cluster) GetNodes() string

GetNodes returns the number of nodes in the cluster

func (*Cluster) GetStatus

func (cluster *Cluster) GetStatus() string

GetStatus returns the status of the cluster

func (*Cluster) GetStatusDetails

func (cluster *Cluster) GetStatusDetails() string

GetStatusDetails is not supported

func (*Cluster) GetTemplate

func (cluster *Cluster) GetTemplate() common.ClusterTemplate

GetTemplate returns the template used to create the cluster

type ClusterTemplate

type ClusterTemplate struct {
	*libcarina.ClusterType
}

ClusterTemplate represents a cluster template for make-coe

func (*ClusterTemplate) GetCOE

func (template *ClusterTemplate) GetCOE() string

GetCOE returns the container orchestration engine used by the cluster

func (*ClusterTemplate) GetHostType

func (template *ClusterTemplate) GetHostType() string

GetHostType returns the underlying type of the host nodes, such as lxc or vm

func (*ClusterTemplate) GetName

func (template *ClusterTemplate) GetName() string

GetName returns the unique template name

type MakeCOE

type MakeCOE struct {
	Account *Account
	// contains filtered or unexported fields
}

MakeCOE is an adapter between the cli and Carina (make-coe)

func (*MakeCOE) CreateCluster

func (carina *MakeCOE) CreateCluster(name string, template string, nodes int) (common.Cluster, error)

CreateCluster creates a new cluster and prints the cluster information

func (*MakeCOE) DeleteCluster

func (carina *MakeCOE) DeleteCluster(token string) (common.Cluster, error)

DeleteCluster permanently deletes a cluster by its id or name (if unique)

func (*MakeCOE) GetCluster

func (carina *MakeCOE) GetCluster(token string) (common.Cluster, error)

GetCluster prints out a cluster's information to the console by its id or name (if unique)

func (*MakeCOE) GetClusterCredentials

func (carina *MakeCOE) GetClusterCredentials(token string) (*libcarina.CredentialsBundle, error)

GetClusterCredentials retrieves the TLS certificates and configuration scripts for a cluster by its id or name (if unique)

func (*MakeCOE) GetQuotas

func (carina *MakeCOE) GetQuotas() (common.Quotas, error)

GetQuotas retrieves the quotas set for the account

func (*MakeCOE) GrowCluster

func (carina *MakeCOE) GrowCluster(token string, nodes int) (common.Cluster, error)

GrowCluster adds nodes to a cluster by its id or name (if unique)

func (*MakeCOE) ListClusterTemplates

func (carina *MakeCOE) ListClusterTemplates() ([]common.ClusterTemplate, error)

ListClusterTemplates retrieves available templates for creating a new cluster

func (*MakeCOE) ListClusters

func (carina *MakeCOE) ListClusters() ([]common.Cluster, error)

ListClusters prints out a list of the user's clusters to the console

func (*MakeCOE) RebuildCluster

func (carina *MakeCOE) RebuildCluster(token string) (common.Cluster, error)

RebuildCluster destroys and recreates the cluster by its id or name (if unique)

func (*MakeCOE) ResizeCluster

func (carina *MakeCOE) ResizeCluster(token string, nodes int) (common.Cluster, error)

ResizeCluster resizes the cluster to the specified number of nodes

func (*MakeCOE) SetAutoScale

func (carina *MakeCOE) SetAutoScale(token string, value bool) (common.Cluster, error)

SetAutoScale is not supported

func (*MakeCOE) WaitUntilClusterIsActive

func (carina *MakeCOE) WaitUntilClusterIsActive(cluster common.Cluster) (common.Cluster, error)

WaitUntilClusterIsActive waits until the prior cluster operation is completed

func (*MakeCOE) WaitUntilClusterIsDeleted

func (carina *MakeCOE) WaitUntilClusterIsDeleted(cluster common.Cluster) error

WaitUntilClusterIsDeleted polls the cluster status until either the cluster is gone or an error state is hit

type Quotas

type Quotas struct{}

Quotas contains the quota information for a CarinaAccount

func (*Quotas) GetMaxClusters

func (quotas *Quotas) GetMaxClusters() int

GetMaxClusters returns the maximum number of clusters allowed on the account

func (*Quotas) GetMaxNodesPerCluster

func (quotas *Quotas) GetMaxNodesPerCluster() int

GetMaxNodesPerCluster returns the maximum number of nodes allowed in a cluster on the account

Jump to

Keyboard shortcuts

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