Help us shape the future of Go! Take the 2026 Go Developer Survey

openstack

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2018 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OpenStack

type OpenStack struct {
	Octavia *gophercloud.ServiceClient
	// contains filtered or unexported fields
}

OpenStack is an implementation of cloud provider Interface for OpenStack.

func NewOpenStack

func NewOpenStack(cfg OpenStackConfig) (*OpenStack, error)

NewOpenStack gets openstack struct

func (*OpenStack) GetLoadbalancers

func (os *OpenStack) GetLoadbalancers(project string) ([]loadbalancers.LoadBalancer, error)

GetLoadbalancers get all the lbs.

func (*OpenStack) GetMembers

func (os *OpenStack) GetMembers(poolID string) ([]pools.Member, error)

GetMembers retrieve all the members of the specified pool

func (*OpenStack) GetPools

func (os *OpenStack) GetPools(lbID string, isOrphan bool, listenerID string) ([]pools.Pool, error)

GetPools retrives the pools belong to the loadbalancer. If isOrphan is true, only return shared pools in the loadbalancer. If listenerID is specified, return pools belong to that listener.

func (*OpenStack) GetProjects

func (os *OpenStack) GetProjects() ([]projects.Project, error)

GetProjects return all the projects information.

type OpenStackConfig

type OpenStackConfig struct {
	Username    string
	Password    string
	ProjectName string `mapstructure:"project_name"`
	AuthURL     string `mapstructure:"auth_url"`
	Region      string
}

OpenStackConfig defines OpenStack credentials configuration.

func (OpenStackConfig) ToAuthOptions

func (cfg OpenStackConfig) ToAuthOptions() gophercloud.AuthOptions

ToAuthOptions gets openstack auth options

Jump to

Keyboard shortcuts

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