blob: 08065a4b471a6eb31fff321a7ada9b53080d358c [file] [log] [blame]
Jon Perrittf050a4c2014-09-11 15:01:17 -05001// +build acceptance
2
3package v1
4
5import (
6 "github.com/rackspace/gophercloud"
7 "github.com/rackspace/gophercloud/openstack"
8 "github.com/rackspace/gophercloud/openstack/utils"
9 "os"
10)
11
12var metadata = map[string]string{"gopher": "cloud"}
13
14func newClient() (*gophercloud.ServiceClient, error) {
15 ao, err := utils.AuthOptions()
16 if err != nil {
17 return nil, err
18 }
19
20 client, err := openstack.AuthenticatedClient(ao)
21 if err != nil {
22 return nil, err
23 }
24
25 return openstack.NewStorageV1(client, gophercloud.EndpointOpts{
26 Region: os.Getenv("OS_REGION_NAME"),
27 })
28}