blob: 10ed022e364c92f218fe4c99bdb686b00aa70989 [file] [log] [blame]
package main
import (
"github.com/rackspace/gophercloud"
"strings"
"fmt"
"os"
)
func main() {
provider, username, _, apiKey := getCredentials()
if !strings.Contains(provider, "rackspace") {
fmt.Fprintf(os.Stdout, "Skipping test because provider doesn't support API_KEYs\n")
return
}
_, err := gophercloud.Authenticate(
provider,
gophercloud.AuthOptions{
Username: username,
ApiKey: apiKey,
},
)
if err != nil {
panic(err)
}
}