blob: 10ed022e364c92f218fe4c99bdb686b00aa70989 [file] [log] [blame]
Rafael Garciae4a550e2013-12-06 17:00:32 -03001package main
2
3import (
4 "github.com/rackspace/gophercloud"
5 "strings"
6 "fmt"
7 "os"
8)
9
10func main() {
11 provider, username, _, apiKey := getCredentials()
12
13 if !strings.Contains(provider, "rackspace") {
14 fmt.Fprintf(os.Stdout, "Skipping test because provider doesn't support API_KEYs\n")
15 return
16 }
17
18 _, err := gophercloud.Authenticate(
19 provider,
20 gophercloud.AuthOptions{
21 Username: username,
22 ApiKey: apiKey,
23 },
24 )
25 if err != nil {
26 panic(err)
27 }
28}