• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
CL.TANG
非官方言论,知识谨慎吸收
博客园    首页    新随笔    联系   管理    订阅  订阅

Openstack的keystone的user-role-list命令的使用

直接在shell模式下执行

[root@node-5 ~]# keystone user-role-list
WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).
'Client' object has no attribute 'auth_tenant_id'

执行

[root@node-5 ~]# keystone help user-role-list
usage: keystone user-role-list [--user <user>] [--tenant <tenant>]

List roles granted to a user

Arguments:
  --user <user>, --user-id <user>
                        List roles granted to a user
  --tenant <tenant>, --tenant-id <tenant>
                        List roles granted on a tenant

表示需要提供用户ID,租户ID,最终得到的是一个用户在一个项目中的角色列表。

[root@node-5 ~]# keystone user-role-list --user-id 0be5b5d8a7334b0797ba38d017b4779c --tenant-id 6afef8e2e5db4074b1a445f7563345ba 
WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored).
+----------------------------------+--------+----------------------------------+----------------------------------+
|                id                |  name  |             user_id              |            tenant_id             |
+----------------------------------+--------+----------------------------------+----------------------------------+
| 2262da376eb549a6a8ffcde6920c1a67 | Member | 0be5b5d8a7334b0797ba38d017b4779c | 6afef8e2e5db4074b1a445f7563345ba |
| 975b2c24fa53461f97ef1186e55b6ecf | admin  | 0be5b5d8a7334b0797ba38d017b4779c | 6afef8e2e5db4074b1a445f7563345ba |
+----------------------------------+--------+----------------------------------+----------------------------------+
posted @ 2016-10-18 14:08  CL.TANG  阅读(1109)  评论(1)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3