openstack

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound is used to inform that the object is missing
	ErrNotFound = errors.New("failed to find object")

	// ErrMultipleResults is used when we unexpectedly get back multiple results
	ErrMultipleResults = errors.New("multiple results where only one expected")
)

Functions

This section is empty.

Types

type OpenStack

type OpenStack struct {
	// contains filtered or unexported fields
}

OpenStack is an implementation of cloud provider Interface for OpenStack.

func NewOpenStack

func NewOpenStack(cfg config.Config) (*OpenStack, error)

NewOpenStack gets openstack struct

func (*OpenStack) DeleteFloatingIP

func (os *OpenStack) DeleteFloatingIP(portID string) error

DeleteFloatingIP deletes floating ip for the port

func (*OpenStack) DeleteL7policy

func (os *OpenStack) DeleteL7policy(policyID string, lbID string) error

DeleteL7policy deletes a l7 policy

func (*OpenStack) DeleteLoadbalancer

func (os *OpenStack) DeleteLoadbalancer(lbID string) error

DeleteLoadbalancer deletes a loadbalancer with all its child objects.

func (*OpenStack) DeletePool

func (os *OpenStack) DeletePool(poolID string, lbID string) error

DeletePool deletes a pool

func (*OpenStack) EnsureFloatingIP

func (os *OpenStack) EnsureFloatingIP(portID string, floatingIPNetwork string) (string, error)

EnsureFloatingIP makes sure a floating IP is allocated for the port

func (*OpenStack) EnsureListener

func (os *OpenStack) EnsureListener(name string, lbID string) (*listeners.Listener, error)

EnsureListener creates a loadbalancer listener in octavia if it does not exist, wait for the loadbalancer to be ACTIVE.

func (*OpenStack) EnsureLoadBalancer

func (os *OpenStack) EnsureLoadBalancer(name string, subnetID string) (*loadbalancers.LoadBalancer, error)

EnsureLoadBalancer creates a loadbalancer in octavia if it does not exist, wait for the loadbalancer to be ACTIVE.

func (*OpenStack) EnsurePolicyRules

func (os *OpenStack) EnsurePolicyRules(deleted bool, policyName, lbID, listenerID, poolID, host, path string) error

EnsurePolicyRules creates l7 policy with rules for listener or delete policy if deleted flag is set. For policy creation, the old policy will be deleted anyway.

func (*OpenStack) EnsurePoolMembers

func (os *OpenStack) EnsurePoolMembers(deleted bool, poolName, lbID, listenerID string, servicePort *int, nodes []*apiv1.Node) (*string, error)

EnsurePoolMembers deletes the old pool with its members, then creates a new pool with members if deleted flag is not set.

func (*OpenStack) GetL7policies

func (os *OpenStack) GetL7policies(listenerID string) ([]l7policies.L7Policy, error)

GetL7policies retrieves all l7 policies for the given listener.

func (*OpenStack) GetLoadbalancerByName

func (os *OpenStack) GetLoadbalancerByName(name string) (*loadbalancers.LoadBalancer, error)

GetLoadbalancerByName retrieves loadbalancer object

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, shared bool) ([]pools.Pool, error)

GetPools retrives the pools belong to the loadbalancer.

func (*OpenStack) UpdateLoadbalancerMembers

func (os *OpenStack) UpdateLoadbalancerMembers(lbID string, nodes []*apiv1.Node) error

UpdateLoadbalancerMembers update members for all the pools in the specified loadbalancer.

Jump to

Keyboard shortcuts

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