magnum

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: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	AuthEndpoint     string
	EndpointOverride string
	UserName         string
	Password         string
	Project          string
	Domain           string
	Region           string
	// contains filtered or unexported fields
}

Account is a set of authentication credentials accepted by OpenStack Identity (keystone) v2 and v3

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() (*gophercloud.ServiceClient, error)

Authenticate creates an authenticated client, ready to use to communicate with the OpenStack Magnum 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. private-[endpoint hash]-[username]

func (*Account) GetID

func (account *Account) GetID() string

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

func (*Account) NewClusterService

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

NewClusterService create the appropriate ClusterService for the account

type Cluster

type Cluster struct {
	*bays.Bay
	Template *baymodels.BayModel
}

Cluster is a Magnum cluster

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 returns additional information about the cluster's status. For example, why the cluster is in a failed state.

func (*Cluster) GetTemplate

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

GetTemplate returns the template used to create the cluster

type ClusterTemplate

type ClusterTemplate struct {
	*baymodels.BayModel
}

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 Magnum

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

Magnum is an adapter between the cli and the OpenStack COE API (Magnum)

func (*Magnum) CreateCluster

func (magnum *Magnum) CreateCluster(name string, template string, nodes int) (common.Cluster, error)

CreateCluster creates a new cluster and prints the cluster information

func (*Magnum) DeleteCluster

func (magnum *Magnum) DeleteCluster(token string) (common.Cluster, error)

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

func (*Magnum) GetCluster

func (magnum *Magnum) GetCluster(token string) (common.Cluster, error)

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

func (*Magnum) GetClusterCredentials

func (magnum *Magnum) 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 (*Magnum) GetQuotas

func (magnum *Magnum) GetQuotas() (common.Quotas, error)

GetQuotas retrieves the quotas set for the account

func (*Magnum) GrowCluster

func (magnum *Magnum) GrowCluster(token string, nodes int) (common.Cluster, error)

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

func (*Magnum) ListClusterTemplates

func (magnum *Magnum) ListClusterTemplates() ([]common.ClusterTemplate, error)

ListClusterTemplates retrieves available templates for creating a new cluster

func (*Magnum) ListClusters

func (magnum *Magnum) ListClusters() ([]common.Cluster, error)

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

func (*Magnum) RebuildCluster

func (magnum *Magnum) RebuildCluster(token string) (common.Cluster, error)

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

func (*Magnum) ResizeCluster

func (magnum *Magnum) ResizeCluster(token string, nodes int) (common.Cluster, error)

ResizeCluster resizes a cluster to the specified number of nodes by its id or name (if unique)

func (*Magnum) SetAutoScale

func (magnum *Magnum) SetAutoScale(token string, value bool) (common.Cluster, error)

SetAutoScale is not supported

func (*Magnum) WaitUntilClusterIsActive

func (magnum *Magnum) WaitUntilClusterIsActive(cluster common.Cluster) (common.Cluster, error)

WaitUntilClusterIsActive waits until the prior cluster operation is completed

func (*Magnum) WaitUntilClusterIsDeleted

func (magnum *Magnum) 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 MagnumAccount

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