Beginning work on add user role
diff --git a/openstack/identity/v2/extensions/admin/roles/requests.go b/openstack/identity/v2/extensions/admin/roles/requests.go
index a748fff..df58eec 100644
--- a/openstack/identity/v2/extensions/admin/roles/requests.go
+++ b/openstack/identity/v2/extensions/admin/roles/requests.go
@@ -11,3 +11,14 @@
}
return pagination.NewPager(client, rootURL(client), createPage)
}
+
+func AddRoleToUser(client *gophercloud.ServiceClient, tenantID, userID, roleID string) AddRoleResult {
+ var result AddRoleResult
+
+ _, result.Err = perigee.Request("PUT", userRoleURL(client, tenantID, userID, roleID), perigee.Options{
+ MoreHeaders: client.AuthenticatedHeaders(),
+ OkCodes: []int{201},
+ })
+
+ return result
+}