Documentation ¶
Index ¶
- type OpenStack
- func (os *OpenStack) FailoverLoadBalancer(id string, timeout int) error
- func (os *OpenStack) GetLoadBalancerAmphorae(id string) ([]amphorae.Amphora, error)
- func (os *OpenStack) GetLoadbalancers(project string) ([]loadbalancers.LoadBalancer, error)
- func (os *OpenStack) GetMembers(poolID string) ([]pools.Member, error)
- func (os *OpenStack) GetPools(lbID string, isOrphan bool, listenerID string) ([]pools.Pool, error)
- func (os *OpenStack) GetPortSecurityGroups(portID string) ([]string, error)
- func (os *OpenStack) GetProjects() ([]projects.Project, error)
- func (os *OpenStack) WaitForLoadBalancerState(lbID, status string, secs int) error
- type OpenStackConfig
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 ¶
FailoverLoadBalancer fails over the specified load balancer and wait for the load balancer to be ACTIVE
func (*OpenStack) GetLoadBalancerAmphorae ¶
GetLoadBalancerAmphorae return all the amphorae for a load balancer.
func (*OpenStack) GetLoadbalancers ¶
func (os *OpenStack) GetLoadbalancers(project string) ([]loadbalancers.LoadBalancer, error)
GetLoadbalancers get all the lbs.
func (*OpenStack) GetMembers ¶
GetMembers retrieve all the members of the specified pool
func (*OpenStack) GetPools ¶
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 ¶
GetPortSecurityGroups get port security group IDs.
func (*OpenStack) GetProjects ¶
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