Merge "Update gophercloud vendor"
This commit is contained in:
commit
a68cb327eb
10
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tenants/urls.go
generated
vendored
10
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/tenants/urls.go
generated
vendored
@ -3,21 +3,21 @@ package tenants
|
||||
import "github.com/gophercloud/gophercloud"
|
||||
|
||||
func listURL(client *gophercloud.ServiceClient) string {
|
||||
return client.ServiceURL("tenants")
|
||||
return client.ServiceURL("v2.0/tenants")
|
||||
}
|
||||
|
||||
func getURL(client *gophercloud.ServiceClient, tenantID string) string {
|
||||
return client.ServiceURL("tenants", tenantID)
|
||||
return client.ServiceURL("v2.0/tenants", tenantID)
|
||||
}
|
||||
|
||||
func createURL(client *gophercloud.ServiceClient) string {
|
||||
return client.ServiceURL("tenants")
|
||||
return client.ServiceURL("v2.0/tenants")
|
||||
}
|
||||
|
||||
func deleteURL(client *gophercloud.ServiceClient, tenantID string) string {
|
||||
return client.ServiceURL("tenants", tenantID)
|
||||
return client.ServiceURL("v2.0/tenants", tenantID)
|
||||
}
|
||||
|
||||
func updateURL(client *gophercloud.ServiceClient, tenantID string) string {
|
||||
return client.ServiceURL("tenants", tenantID)
|
||||
return client.ServiceURL("v2.0/tenants", tenantID)
|
||||
}
|
||||
|
9
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/users/requests.go
generated
vendored
9
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/users/requests.go
generated
vendored
@ -26,6 +26,8 @@ type CommonOpts struct {
|
||||
Enabled *bool `json:"enabled,omitempty"`
|
||||
// The email address of this user.
|
||||
Email string `json:"email,omitempty"`
|
||||
// Password is the password of the new user.
|
||||
Password string `json:"password,omitempty"`
|
||||
}
|
||||
|
||||
// CreateOpts represents the options needed when creating new users.
|
||||
@ -104,3 +106,10 @@ func ListRoles(client *gophercloud.ServiceClient, tenantID, userID string) pagin
|
||||
return RolePage{pagination.SinglePageBase(r)}
|
||||
})
|
||||
}
|
||||
|
||||
// ListUsers requests details on a single tenant's users by tenantID.
|
||||
func ListUsers(client *gophercloud.ServiceClient, tenantID string) pagination.Pager {
|
||||
return pagination.NewPager(client, listUsersURL(client, tenantID), func(r pagination.PageResult) pagination.Page {
|
||||
return UserPage{pagination.SinglePageBase(r)}
|
||||
})
|
||||
}
|
||||
|
6
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/users/urls.go
generated
vendored
6
vendor/github.com/gophercloud/gophercloud/openstack/identity/v2/users/urls.go
generated
vendored
@ -4,7 +4,7 @@ import "github.com/gophercloud/gophercloud"
|
||||
|
||||
const (
|
||||
tenantPath = "tenants"
|
||||
userPath = "users"
|
||||
userPath = "v2.0/users"
|
||||
rolePath = "roles"
|
||||
)
|
||||
|
||||
@ -19,3 +19,7 @@ func rootURL(c *gophercloud.ServiceClient) string {
|
||||
func listRolesURL(c *gophercloud.ServiceClient, tenantID, userID string) string {
|
||||
return c.ServiceURL(tenantPath, tenantID, userPath, userID, rolePath)
|
||||
}
|
||||
|
||||
func listUsersURL(c *gophercloud.ServiceClient, tenantID string) string {
|
||||
return c.ServiceURL(tenantPath, tenantID, "users")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user