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

openstack

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 9 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
	Nova    *gophercloud.ServiceClient
	Neutron *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) FailoverLoadBalancer added in v1.4.0

func (os *OpenStack) FailoverLoadBalancer(id string) error

FailoverLoadBalancer fails over the specified load balancer and wait for the load balancer to be ACTIVE

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) GetPortSecurityGroups added in v1.3.0

func (os *OpenStack) GetPortSecurityGroups(portID string) ([]string, error)

GetPortSecurityGroups get port security group IDs.

func (*OpenStack) GetProjects

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

GetProjects return all the projects information.

func (*OpenStack) WaitForLoadBalancerState added in v1.4.0

func (os *OpenStack) WaitForLoadBalancerState(lbID, status string, secs int) error

WaitForLoadBalancerState will wait until a loadbalancer reaches a given state.

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