Adding the ability to list LB protocols
diff --git a/rackspace/lb/v1/lbs/requests.go b/rackspace/lb/v1/lbs/requests.go
index 3a9fc25..7c5be06 100644
--- a/rackspace/lb/v1/lbs/requests.go
+++ b/rackspace/lb/v1/lbs/requests.go
@@ -84,7 +84,9 @@
Nodes []nodes.Node
// Required - protocol of the service that is being load balanced.
- Protocol Protocol
+ // See http://docs.rackspace.com/loadbalancers/api/v1.0/clb-devguide/content/protocols.html
+ // for a full list of supported protocols.
+ Protocol string
// Optional - enables or disables Half-Closed support for the load balancer.
// Half-Closed support provides the ability for one end of the connection to
@@ -310,7 +312,9 @@
Name string
// Optional - the new protocol you want your load balancer to have.
- Protocol Protocol
+ // See http://docs.rackspace.com/loadbalancers/api/v1.0/clb-devguide/content/protocols.html
+ // for a full list of supported protocols.
+ Protocol string
// Optional - see the HalfClosed field in CreateOpts for more information.
HalfClosed enabledState
@@ -380,3 +384,12 @@
return res
}
+
+// ListProtocols is the operation responsible for returning a paginated
+// collection of load balancer protocols.
+func ListProtocols(client *gophercloud.ServiceClient) pagination.Pager {
+ url := protocolsURL(client)
+ return pagination.NewPager(client, url, func(r pagination.PageResult) pagination.Page {
+ return ProtocolPage{pagination.SinglePageBase(r)}
+ })
+}