openstack

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2018 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateNode(*kubernikus_v1.Kluster, *models.NodePool, []byte) (string, error)
	DeleteNode(*kubernikus_v1.Kluster, string) error
	GetNodes(*kubernikus_v1.Kluster, *models.NodePool) ([]Node, error)

	GetProject(id string) (*Project, error)
	GetRegion() (string, error)
	GetRouters(project_id string) ([]Router, error)
	DeleteUser(username, domainID string) error
	CreateKlusterServiceUser(username, password, domain, defaultProjectID string) error
	GetKubernikusCatalogEntry() (string, error)
	GetSecurityGroupID(project_id, name string) (string, error)
}

func NewClient

func NewClient(secrets typedv1.SecretInterface, klusterEvents cache.SharedIndexInformer, authURL, username, password, domain, project, projectDomain string, logger log.Logger) Client

type NameGenerator added in v1.5.0

type NameGenerator interface {
	// GenerateName generates a valid name from the base name, adding a random suffix to the
	// the base. If base is valid, the returned name must also be valid. The generator is
	// responsible for knowing the maximum valid name length.
	GenerateName(base string) string
}
var SimpleNameGenerator NameGenerator = simpleNameGenerator{}

SimpleNameGenerator is a generator that returns the name plus a random suffix of five alphanumerics when a name is requested. The string is guaranteed to not exceed the length of a standard Kubernetes name (63 characters)

type Network

type Network struct {
	ID      string
	Subnets []Subnet
}

type Node

type Node struct {
	servers.Server
	StateExt
}

func ExtractServers

func ExtractServers(r pagination.Page) ([]Node, error)

func (*Node) Running

func (n *Node) Running() bool

func (*Node) Starting

func (n *Node) Starting() bool

func (*Node) Stopping

func (n *Node) Stopping() bool

type Project

type Project struct {
	ID       string
	Name     string
	Domain   string
	DomainID string
}

type Router

type Router struct {
	ID                string
	ExternalNetworkID string
	Networks          []Network
}

type StateExt

type StateExt struct {
	TaskState  string `json:"OS-EXT-STS:task_state"`
	VMState    string `json:"OS-EXT-STS:vm_state"`
	PowerState int    `json:"OS-EXT-STS:power_state"`
}

func (*StateExt) UnmarshalJSON

func (r *StateExt) UnmarshalJSON(b []byte) error

type Subnet

type Subnet struct {
	ID   string
	CIDR string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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