Documentation

Overview

Package lbpools provides access to load balancer pools associated with a RackConnect configuration. Load Balancer Pools must be configured in advance by your Network Security team to be eligible for use with RackConnect. If you do not see a pool that you expect to see, contact your Support team for further assistance. The Load Balancer Pool id returned by these calls is automatically generated by the RackConnect automation and will remain constant unless the Load Balancer Pool is renamed on your hardware load balancer. All Load Balancer Pools will currently return a status of ACTIVE. Future features may introduce additional statuses. Node status values are ADDING, ACTIVE, REMOVING, ADD_FAILED, and REMOVE_FAILED. The cloud_servers node count will only include Cloud Servers from the specified cloud account. Any dedicated servers or cloud servers from another cloud account on the same RackConnect Configuration will be counted as external nodes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List returns all load balancer pools that are associated with RackConnect.

func ListNodes

ListNodes returns all load balancer pool nodes that are associated with RackConnect for the given LB pool ID.

func ListNodesDetails

func ListNodesDetails(c *gophercloud.ServiceClient, id string) pagination.Pager

ListNodesDetails returns all load balancer pool nodes that are associated with RackConnect for the given LB pool ID with all their details.

func ListNodesDetailsForServer

func ListNodesDetailsForServer(c *gophercloud.ServiceClient, serverID string) pagination.Pager

ListNodesDetailsForServer is similar to ListNodesDetails but only returns nodes for the given serverID.

Types

type CreateNodeResult

type CreateNodeResult struct {
	NodeResult
}

CreateNodeResult represents the result of an CreateNode operation.

func CreateNode

func CreateNode(c *gophercloud.ServiceClient, poolID, serverID string) CreateNodeResult

CreateNode adds the cloud server with the given serverID to the load balancer pool with the given poolID.

type CreateNodesResult

type CreateNodesResult struct {
	gophercloud.Result
}

CreateNodesResult represents the result of a CreateNodes operation.

func CreateNodes

CreateNodes adds the cloud servers with the given serverIDs to the corresponding load balancer pools with the given poolIDs.

func (CreateNodesResult) Extract

func (r CreateNodesResult) Extract() ([]Node, error)

Extract is a function that extracts a slice of Nodes from a CreateNodesResult.

type DeleteNodeResult

type DeleteNodeResult struct {
	gophercloud.ErrResult
}

DeleteNodeResult represents the result of a DeleteNode operation.

func DeleteNode

func DeleteNode(c *gophercloud.ServiceClient, poolID, nodeID string) DeleteNodeResult

DeleteNode removes the node with the given nodeID from the LB pool with the given poolID.

type DeleteNodesResult

type DeleteNodesResult struct {
	gophercloud.ErrResult
}

DeleteNodesResult represents the result of a DeleteNodes operation.

func DeleteNodes

DeleteNodes removes the cloud servers with the given serverIDs to the corresponding load balancer pools with the given poolIDs.

type GetNodeDetailsResult

type GetNodeDetailsResult struct {
	gophercloud.Result
}

GetNodeDetailsResult represents the result of an NodeDetails operation.

func GetNodeDetails

func GetNodeDetails(c *gophercloud.ServiceClient, poolID, nodeID string) GetNodeDetailsResult

GetNodeDetails retrieves a specific LB pool node's details based on its unique ID and the LB pool's unique ID.

func (GetNodeDetailsResult) Extract

func (r GetNodeDetailsResult) Extract() (*NodeDetails, error)

Extract is a function that extracts a NodeDetails from a NodeDetailsResult.

type GetNodeResult

type GetNodeResult struct {
	NodeResult
}

GetNodeResult represents the result of an GetNode operation.

func GetNode

func GetNode(c *gophercloud.ServiceClient, poolID, nodeID string) GetNodeResult

GetNode retrieves a specific LB pool node (that is associated with RackConnect) based on its unique ID and the LB pool's unique ID.

type GetResult

type GetResult struct {
	gophercloud.Result
}

GetResult represents the result of a Get operation.

func Get

Get retrieves a specific load balancer pool (that is associated with RackConnect) based on its unique ID.

func (GetResult) Extract

func (r GetResult) Extract() (*Pool, error)

Extract is a function that extracts an LBPool from a GetResult.

type Node

type Node struct {
	// The unique ID of the LB node.
	ID string `mapstructure:"id"`
	// The cloud server (node) of the load balancer pool.
	CloudServer struct {
		// The cloud server ID.
		ID string `mapstructure:"id"`
	} `mapstructure:"cloud_server"`
	// The load balancer pool.
	LoadBalancerPool struct {
		// The LB pool ID.
		ID string `mapstructure:"id"`
	} `mapstructure:"load_balancer_pool"`
	// The status of the LB pool.
	Status string `mapstructure:"status"`
	// The details of the status of the LB pool.
	StatusDetail string `mapstructure:"status_detail"`
	// The time the LB node was created.
	CreatedAt time.Time `mapstructure:"-"`
	// The time the LB node was last updated.
	UpdatedAt time.Time `mapstructure:"-"`
}

Node represents a load balancer pool node associated with a RackConnect configuration.

func ExtractNodes

func ExtractNodes(page pagination.Page) ([]Node, error)

ExtractNodes extracts and returns a slice of Nodes. It is used while iterating over an lbpools.ListNodes call.

type NodeDetails

type NodeDetails struct {
	// The unique ID of the LB node.
	ID string `mapstructure:"id"`
	// The cloud server (node) of the load balancer pool.
	CloudServer struct {
		// The cloud server ID.
		ID string `mapstructure:"id"`
		// The name of the server.
		Name string `mapstructure:"name"`
		// The cloud network for the cloud server.
		CloudNetwork struct {
			// The network ID.
			ID string `mapstructure:"id"`
			// The network name.
			Name string `mapstructure:"name"`
			// The network's private IPv4 address.
			PrivateIPv4 string `mapstructure:"private_ip_v4"`
			// The IP range for the network.
			CIDR string `mapstructure:"cidr"`
			// The datetime the network was created.
			CreatedAt time.Time `mapstructure:"-"`
			// The last datetime the network was updated.
			UpdatedAt time.Time `mapstructure:"-"`
		} `mapstructure:"cloud_network"`
		// The datetime the server was created.
		CreatedAt time.Time `mapstructure:"-"`
		// The datetime the server was last updated.
		UpdatedAt time.Time `mapstructure:"-"`
	} `mapstructure:"cloud_server"`
	// The load balancer pool.
	LoadBalancerPool Pool `mapstructure:"load_balancer_pool"`
	// The status of the LB pool.
	Status string `mapstructure:"status"`
	// The details of the status of the LB pool.
	StatusDetail string `mapstructure:"status_detail"`
	// The time the LB node was created.
	CreatedAt time.Time `mapstructure:"-"`
	// The time the LB node was last updated.
	UpdatedAt time.Time `mapstructure:"-"`
}

NodeDetails represents a load balancer pool node associated with a RackConnect configuration with all its details.

func ExtractNodesDetails

func ExtractNodesDetails(page pagination.Page) ([]NodeDetails, error)

ExtractNodesDetails extracts and returns a slice of NodeDetails. It is used while iterating over an lbpools.ListNodesDetails call.

type NodeDetailsForServer

type NodeDetailsForServer struct {
	// The unique ID of the LB node.
	ID string `mapstructure:"id"`
	// The load balancer pool.
	LoadBalancerPool Pool `mapstructure:"load_balancer_pool"`
	// The status of the LB pool.
	Status string `mapstructure:"status"`
	// The details of the status of the LB pool.
	StatusDetail string `mapstructure:"status_detail"`
	// The time the LB node was created.
	CreatedAt time.Time `mapstructure:"-"`
	// The time the LB node was last updated.
	UpdatedAt time.Time `mapstructure:"-"`
}

NodeDetailsForServer represents a load balancer pool node associated with a RackConnect configuration with all its details for a particular server.

func ExtractNodesDetailsForServer

func ExtractNodesDetailsForServer(page pagination.Page) ([]NodeDetailsForServer, error)

ExtractNodesDetailsForServer extracts and returns a slice of NodeDetailsForServer. It is used while iterating over an lbpools.ListNodesDetailsForServer call.

type NodeDetailsForServerPage

type NodeDetailsForServerPage struct {
	pagination.SinglePageBase
}

NodeDetailsForServerPage is the page returned by a pager when traversing over a collection of NodeDetailsForServer.

func (NodeDetailsForServerPage) IsEmpty

func (r NodeDetailsForServerPage) IsEmpty() (bool, error)

IsEmpty returns true if a NodeDetailsForServerPage contains no NodeDetailsForServer.

type NodeDetailsPage

type NodeDetailsPage struct {
	pagination.SinglePageBase
}

NodeDetailsPage is the page returned by a pager when traversing over a collection of NodeDetails.

func (NodeDetailsPage) IsEmpty

func (r NodeDetailsPage) IsEmpty() (bool, error)

IsEmpty returns true if a NodeDetailsPage contains no NodeDetails.

type NodeOpts

type NodeOpts struct {
	ServerID string
	PoolID   string
}

NodeOpts are options for bulk adding/deleting nodes to LB pools.

type NodePage

type NodePage struct {
	pagination.SinglePageBase
}

NodePage is the page returned by a pager when traversing over a collection of Nodes.

func (NodePage) IsEmpty

func (r NodePage) IsEmpty() (bool, error)

IsEmpty returns true if a NodePage contains no Nodes.

type NodeResult

type NodeResult struct {
	gophercloud.Result
}

NodeResult represents a result that can be extracted as a Node.

func (NodeResult) Extract

func (r NodeResult) Extract() (*Node, error)

Extract is a function that extracts a Node from a NodeResult.

type NodesOpts

type NodesOpts []NodeOpts

NodesOpts are a slice of NodeOpts, passed as options for bulk operations.

func (NodesOpts) ToLBPoolCreateNodesMap

func (o NodesOpts) ToLBPoolCreateNodesMap() ([]map[string]interface{}, error)

ToLBPoolCreateNodesMap serializes a NodesOpts into a map to send in the request.

type Pool

type Pool struct {
	// The unique ID of the load balancer pool.
	ID string `mapstructure:"id"`
	// The name of the load balancer pool.
	Name string `mapstructure:"name"`
	// The node counts associated witht the load balancer pool.
	NodeCounts struct {
		// The number of nodes associated with this LB pool for this account.
		CloudServers int `mapstructure:"cloud_servers"`
		// The number of nodes associated with this LB pool from other accounts.
		External int `mapstructure:"external"`
		// The total number of nodes associated with this LB pool.
		Total int `mapstructure:"total"`
	} `mapstructure:"node_counts"`
	// The port of the LB pool
	Port int `mapstructure:"port"`
	// The status of the LB pool
	Status string `mapstructure:"status"`
	// The details of the status of the LB pool
	StatusDetail string `mapstructure:"status_detail"`
	// The virtual IP of the LB pool
	VirtualIP string `mapstructure:"virtual_ip"`
}

Pool represents a load balancer pool associated with a RackConnect configuration.

func ExtractPools

func ExtractPools(page pagination.Page) ([]Pool, error)

ExtractPools extracts and returns Pools. It is used while iterating over an lbpools.List call.

type PoolPage

type PoolPage struct {
	pagination.SinglePageBase
}

PoolPage is the page returned by a pager when traversing over a collection of Pools.

func (PoolPage) IsEmpty

func (r PoolPage) IsEmpty() (bool, error)

IsEmpty returns true if a PoolPage contains no Pools.