Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ install:
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/goimports
go:
- "1.11"
- "1.13"
- "1.14"
- tip
Expand Down
14 changes: 14 additions & 0 deletions openstack/identity/v3/roles/requests.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,24 @@ type ListOptsBuilder interface {
// ListOpts provides options to filter the List results.
type ListOpts struct {
// DomainID filters the response by a domain ID.
// If this parameter is specified, only custom policies of the account will be returned.
// If not specified, all system permissions (including system-defined policies and roles) will be returned.
DomainID string `q:"domain_id"`

// Name filters the response by role name.
Name string `q:"name"`

DisplayName string `q:"display_name"`

// This parameter is valid only when domain_id is left blank.
// policy: system-defined policy; role: system-defined role
PermissionType string `q:"permission_type"`

// Display mode of the permission. The options include domain, project, and all.
Type string `q:"type"`

// Service catalog, which corresponds to the catalog field in policies.
Catalog string `q:"catalog"`
}

// ToRoleListQuery formats a ListOpts into a query string.
Expand Down
9 changes: 7 additions & 2 deletions openstack/identity/v3/roles/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,13 @@ type Role struct {
// Links contains referencing links to the role.
Links map[string]interface{} `json:"links"`

// Name is the role name
Name string `json:"name"`
Name string `json:"name"`
Description string `json:"description"`
DisplayName string `json:"display_name"`
Flag string `json:"flag"`
Catalog string `json:"catalog"`
Type string `json:"type"`
Policy Policy `json:"policy"`

// Extra is a collection of miscellaneous key/values.
Extra map[string]interface{} `json:"-"`
Expand Down