mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-06-21 00:25:59 +08:00
29 lines
500 B
Go
29 lines
500 B
Go
package modules
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"yunion.io/x/onecloud/pkg/mcclient"
|
|
)
|
|
|
|
type GroupManager struct {
|
|
ResourceManager
|
|
}
|
|
|
|
func (this *GroupManager) GetUsers(s *mcclient.ClientSession, gid string) (*ListResult, error) {
|
|
url := fmt.Sprintf("/groups/%s/users", gid)
|
|
return this._list(s, url, "users")
|
|
}
|
|
|
|
var (
|
|
Groups GroupManager
|
|
)
|
|
|
|
func init() {
|
|
Groups = GroupManager{NewIdentityV3Manager("group", "groups",
|
|
[]string{},
|
|
[]string{"ID", "Name", "Domain_Id", "Description"})}
|
|
|
|
register(&Groups)
|
|
}
|