Finish the identity.AuthOptions removal. :fire:
diff --git a/openstack/compute/flavors/client.go b/openstack/compute/flavors/client.go
index 5676d36..edeec66 100644
--- a/openstack/compute/flavors/client.go
+++ b/openstack/compute/flavors/client.go
@@ -2,18 +2,20 @@
import (
"fmt"
- identity "github.com/rackspace/gophercloud/openstack/identity/v2"
"net/url"
"strconv"
+
+ "github.com/rackspace/gophercloud"
+ identity "github.com/rackspace/gophercloud/openstack/identity/v2"
)
type Client struct {
endpoint string
authority identity.AuthResults
- options identity.AuthOptions
+ options gophercloud.AuthOptions
}
-func NewClient(e string, a identity.AuthResults, ao identity.AuthOptions) *Client {
+func NewClient(e string, a identity.AuthResults, ao gophercloud.AuthOptions) *Client {
return &Client{
endpoint: e,
authority: a,
@@ -56,6 +58,6 @@
}
return map[string]string{
- "X-Auth-Token": t.Id,
+ "X-Auth-Token": t.ID,
}, nil
}
diff --git a/openstack/compute/images/client.go b/openstack/compute/images/client.go
index 3390b99..6322b9c 100644
--- a/openstack/compute/images/client.go
+++ b/openstack/compute/images/client.go
@@ -1,16 +1,17 @@
package images
import (
+ "github.com/rackspace/gophercloud"
identity "github.com/rackspace/gophercloud/openstack/identity/v2"
)
type Client struct {
endpoint string
authority identity.AuthResults
- options identity.AuthOptions
+ options gophercloud.AuthOptions
}
-func NewClient(e string, a identity.AuthResults, ao identity.AuthOptions) *Client {
+func NewClient(e string, a identity.AuthResults, ao gophercloud.AuthOptions) *Client {
return &Client{
endpoint: e,
authority: a,
@@ -29,6 +30,6 @@
}
return map[string]string{
- "X-Auth-Token": t.Id,
+ "X-Auth-Token": t.ID,
}, nil
}
diff --git a/openstack/compute/servers/client.go b/openstack/compute/servers/client.go
index 611ff22..8c79f94 100644
--- a/openstack/compute/servers/client.go
+++ b/openstack/compute/servers/client.go
@@ -2,6 +2,8 @@
import (
"fmt"
+
+ "github.com/rackspace/gophercloud"
identity "github.com/rackspace/gophercloud/openstack/identity/v2"
)
@@ -9,12 +11,12 @@
type Client struct {
endpoint string
authority identity.AuthResults
- options identity.AuthOptions
+ options gophercloud.AuthOptions
token *identity.Token
}
// NewClient creates a new Client structure to use when issuing requests to the server.
-func NewClient(e string, a identity.AuthResults, o identity.AuthOptions) *Client {
+func NewClient(e string, a identity.AuthResults, o gophercloud.AuthOptions) *Client {
return &Client{
endpoint: e,
authority: a,
@@ -87,5 +89,5 @@
}
}
- return c.token.Id, err
+ return c.token.ID, err
}
diff --git a/openstack/identity/v2/requests.go b/openstack/identity/v2/requests.go
index d027962..afb92d5 100644
--- a/openstack/identity/v2/requests.go
+++ b/openstack/identity/v2/requests.go
@@ -15,7 +15,7 @@
// Authenticate passes the supplied credentials to the OpenStack provider for authentication.
// If successful, the caller may use Token() to retrieve the authentication token,
// and ServiceCatalog() to retrieve the set of services available to the API user.
-func Authenticate(service gophercloud.ServiceClient, options gophercloud.AuthOptions) (AuthResults, error) {
+func Authenticate(options gophercloud.AuthOptions) (AuthResults, error) {
type AuthContainer struct {
Auth auth `json:"auth"`
}
diff --git a/openstack/storage/v1/client.go b/openstack/storage/v1/client.go
index a457a74..51312eb 100644
--- a/openstack/storage/v1/client.go
+++ b/openstack/storage/v1/client.go
@@ -2,6 +2,8 @@
import (
"fmt"
+
+ "github.com/rackspace/gophercloud"
identity "github.com/rackspace/gophercloud/openstack/identity/v2"
)
@@ -9,12 +11,12 @@
type Client struct {
endpoint string
authority identity.AuthResults
- options identity.AuthOptions
+ options gophercloud.AuthOptions
token *identity.Token
}
// NewClient creates and returns a *Client.
-func NewClient(e string, a identity.AuthResults, o identity.AuthOptions) *Client {
+func NewClient(e string, a identity.AuthResults, o gophercloud.AuthOptions) *Client {
return &Client{
endpoint: e,
authority: a,
@@ -64,5 +66,5 @@
}
}
- return c.token.Id, err
+ return c.token.ID, err
}