Documentation ¶
Index ¶
- Variables
- type OpenStack
- func (os *OpenStack) CreatePolicyRules(lbID, listenerID, poolID, host, path string) error
- func (os *OpenStack) DeleteL7policy(policyID string, lbID string) error
- func (os *OpenStack) DeleteLoadbalancer(lbID string) error
- func (os *OpenStack) DeletePool(poolID string, lbID string) error
- func (os *OpenStack) EnsureFloatingIP(needDelete bool, portID string, floatingIPNetwork string, description string) (string, error)
- func (os *OpenStack) EnsureListener(name string, lbID string) (*listeners.Listener, error)
- func (os *OpenStack) EnsureLoadBalancer(name string, subnetID string, ingNamespace string, ingName string, ...) (*loadbalancers.LoadBalancer, error)
- func (os *OpenStack) EnsurePoolMembers(deleted bool, poolName string, lbID string, listenerID string, nodePort *int, ...) (*string, error)
- func (os *OpenStack) EnsurePortSecurityGroup(needDelete bool, sgID string, nodes []*v1.Node) error
- func (os *OpenStack) EnsureSecurityGroup(needDelete bool, name string, description string, tags []string) (string, error)
- func (os *OpenStack) EnsureSecurityGroupRules(sgID string, sourceIP string, dstPorts []int) error
- func (os *OpenStack) GetL7policies(listenerID string) ([]l7policies.L7Policy, error)
- func (os *OpenStack) GetLoadbalancerByName(name string) (*loadbalancers.LoadBalancer, error)
- func (os *OpenStack) GetMembers(poolID string) ([]pools.Member, error)
- func (os *OpenStack) GetPools(lbID string, shared bool) ([]pools.Pool, error)
- func (os *OpenStack) GetSecurityGroups(listOpts groups.ListOpts) ([]groups.SecGroup, error)
- func (os *OpenStack) GetSubnet(subnetID string) (*subnets.Subnet, error)
- func (os *OpenStack) UpdateLoadBalancerDescription(lbID string, newDescription string) error
- func (os *OpenStack) UpdateLoadbalancerMembers(lbID string, nodes []*apiv1.Node) error
Constants ¶
This section is empty.
Variables ¶
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 ¶
NewOpenStack gets openstack struct
func (*OpenStack) CreatePolicyRules ¶
CreatePolicyRules creates l7 policy and its rules for the listener
func (*OpenStack) DeleteL7policy ¶
DeleteL7policy deletes a l7 policy
func (*OpenStack) DeleteLoadbalancer ¶
DeleteLoadbalancer deletes a loadbalancer with all its child objects.
func (*OpenStack) DeletePool ¶
DeletePool deletes a pool
func (*OpenStack) EnsureFloatingIP ¶
func (os *OpenStack) EnsureFloatingIP(needDelete bool, portID string, floatingIPNetwork string, description string) (string, error)
EnsureFloatingIP makes sure a floating IP is allocated for the port
func (*OpenStack) EnsureListener ¶
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, ingNamespace string, ingName string, clusterName string) (*loadbalancers.LoadBalancer, error)
EnsureLoadBalancer creates a loadbalancer in octavia if it does not exist, wait for the loadbalancer to be ACTIVE.
func (*OpenStack) EnsurePoolMembers ¶
func (os *OpenStack) EnsurePoolMembers(deleted bool, poolName string, lbID string, listenerID string, nodePort *int, nodes []*apiv1.Node) (*string, error)
EnsurePoolMembers ensure the pool and its members exist if deleted flag is not set, delete the pool and all its members otherwise.
func (*OpenStack) EnsurePortSecurityGroup ¶
EnsurePortSecurityGroup ensures the security group is attached to all the node ports or detached from all the ports according to needDelete param.
func (*OpenStack) EnsureSecurityGroup ¶
func (os *OpenStack) EnsureSecurityGroup(needDelete bool, name string, description string, tags []string) (string, error)
EnsureSecurityGroup make sure the security group with given tags exists or not according to need_delete param. Make sure the EnsurePortSecurityGroup function is called before EnsureSecurityGroup if you want to delete the security group.
func (*OpenStack) EnsureSecurityGroupRules ¶
EnsureSecurityGroupRules ensures the only dstPorts are allowed in the given security group.
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 ¶
GetMembers retrieve all the members of the specified pool
func (*OpenStack) GetPools ¶
GetPools retrives the pools belong to the loadbalancer. If shared is true, only return the shared pools.
func (*OpenStack) GetSecurityGroups ¶
GetSecurityGroups gets all the filtered security groups.
func (*OpenStack) UpdateLoadBalancerDescription ¶
UpdateLoadBalancerDescription updates the load balancer description field.