Skip to content

Commit 754e57e

Browse files
jrperrittjtopjian
authored andcommitted
add NewLoadBalancerV2 service client (#591)
* add NewLoadBalancerV2 service client * add go file to internal/testing pkg to appease go1.9 build * fixes to appease upstream changes to 'go vet'
1 parent e7fa81e commit 754e57e

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

internal/testing/pkg.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package testing

openstack/client.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,3 +346,11 @@ func NewImageServiceV2(client *gophercloud.ProviderClient, eo gophercloud.Endpoi
346346
sc.ResourceBase = sc.Endpoint + "v2/"
347347
return sc, err
348348
}
349+
350+
// NewLoadBalancerV2 creates a ServiceClient that may be used to access the v2
351+
// load balancer service.
352+
func NewLoadBalancerV2(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
353+
sc, err := initClientOpts(client, eo, "load-balancer")
354+
sc.ResourceBase = sc.Endpoint + "v2.0/"
355+
return sc, err
356+
}

openstack/compute/v2/flavors/requests.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ const (
4343
the Marker for the current call.
4444
*/
4545
type ListOpts struct {
46-
4746
// ChangesSince, if provided, instructs List to return only those things which
4847
// have changed since the timestamp provided.
4948
ChangesSince string `q:"changes-since"`

pagination/pager.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ var (
2222
// Depending on the pagination strategy of a particular resource, there may be an additional subinterface that the result type
2323
// will need to implement.
2424
type Page interface {
25-
2625
// NextPageURL generates the URL for the page of data that follows this collection.
2726
// Return "" if no such page exists.
2827
NextPageURL() (string, error)

0 commit comments

Comments
 (0)