Adding ability to list LB algorithms
diff --git a/rackspace/lb/v1/lbs/requests.go b/rackspace/lb/v1/lbs/requests.go
index 7c5be06..63b8513 100644
--- a/rackspace/lb/v1/lbs/requests.go
+++ b/rackspace/lb/v1/lbs/requests.go
@@ -104,7 +104,7 @@
// Optional - algorithm that defines how traffic should be directed between
// back-end nodes.
- Algorithm Algorithm
+ Algorithm string
// Optional - current connection logging configuration.
ConnectionLogging *ConnectionLogging
@@ -320,7 +320,7 @@
HalfClosed enabledState
// Optional - see the Algorithm field in CreateOpts for more information.
- Algorithm Algorithm
+ Algorithm string
// Optional - see the Port field in CreateOpts for more information.
Port int
@@ -393,3 +393,12 @@
return ProtocolPage{pagination.SinglePageBase(r)}
})
}
+
+// ListAlgorithms is the operation responsible for returning a paginated
+// collection of load balancer algorithms.
+func ListAlgorithms(client *gophercloud.ServiceClient) pagination.Pager {
+ url := algorithmsURL(client)
+ return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page {
+ return AlgorithmPage{pagination.SinglePageBase(r)}
+ })
+}