Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 282247b

Browse files
committed
Add Rackspace Auto Scale client
1 parent 61270d4 commit 282247b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

rackspace/client.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,3 +222,13 @@ func NewDBV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*
222222
}
223223
return &gophercloud.ServiceClient{ProviderClient: client, Endpoint: url}, nil
224224
}
225+
226+
// NewAutoScaleV1 creates a ServiceClient that may be used to access the v1 Auto Scale service.
227+
func NewAutoScaleV1(client *gophercloud.ProviderClient, eo gophercloud.EndpointOpts) (*gophercloud.ServiceClient, error) {
228+
eo.ApplyDefaults("rax:autoscale")
229+
url, err := client.EndpointLocator(eo)
230+
if err != nil {
231+
return nil, err
232+
}
233+
return &gophercloud.ServiceClient{ProviderClient: client, Endpoint: url}, nil
234+
}

0 commit comments

Comments
 (0)