当前位置:编程学习 > 网站相关 >>

openstack keystone role API详解

 
以下为keystone 角色相关的API详解:
 
###########################################
# version: v1.0.0
# author : Qinglong Meng
# date   : 2013-3-4
###########################################
 
 
1. role-list
Cmd:     $keystone role-list
process: $keystone role-list
longeek@longeek:~$ keystone role-list
+----------------------------------+----------------------+
|                id                |         name         |
+----------------------------------+----------------------+
| 3a252c5cef544e519ba5ffb3db75f07b |    KeystoneAdmin     |
| 3886df8f3357406ab2db07ec63fad55e | KeystoneServiceAdmin |
| 631e31b639c04f0bb5764624f33a4856 |        Member        |
| bae6009fd1d54c29be263e28a80e4be9 |        admin         |
| 9bf76ff4511b4ed3a69e9c21d04b165b |     anotherrole      |
+----------------------------------+----------------------+
API:
[1] : GET /OS-KSADM/roles
 
 
*********************************************华丽的分割线****************************************************
2. role-create
Cmd:    keystone role-create --name {newRoleName}
process: $keystone role-create --name test
+----------------------------------+----------------------+
|                id                |         name         |
+----------------------------------+----------------------+
| 3a252c5cef544e519ba5ffb3db75f07b |    KeystoneAdmin     |
| 3886df8f3357406ab2db07ec63fad55e | KeystoneServiceAdmin |
| 631e31b639c04f0bb5764624f33a4856 |        Member        |
| bae6009fd1d54c29be263e28a80e4be9 |        admin         |
| 9bf76ff4511b4ed3a69e9c21d04b165b |     anotherrole      |
| a509ae5aa6dc423e9a744f189182394e |         test         |
+----------------------------------+----------------------+
API:
[1] : POST /OS-KSADM/roles
      body: {"role": {"name": name}}
 
 
*********************************************华丽的分割线****************************************************
2. role-delete
Cmd:    keystone role-delete {role_id}
process:$keystone role-delete a509ae5aa6dc423e9a744f189182394e
+----------------------------------+----------------------+
|                id                |         name         |
+----------------------------------+----------------------+
| 3a252c5cef544e519ba5ffb3db75f07b |    KeystoneAdmin     |
| 3886df8f3357406ab2db07ec63fad55e | KeystoneServiceAdmin |
| 631e31b639c04f0bb5764624f33a4856 |        Member        |
| bae6009fd1d54c29be263e28a80e4be9 |        admin         |
| 9bf76ff4511b4ed3a69e9c21d04b165b |     anotherrole      |
+----------------------------------+----------------------+
API:
[1] : DELETE /OS-KSADM/roles/{role_id}
 
 
*********************************************华丽的分割线****************************************************
2. role-get
Cmd:    keystone role-get {role_id}
process:$keystone role-get a509ae5aa6dc423e9a744f189182394e
+----------+----------------------------------+
| Property |              Value               |
+----------+----------------------------------+
|    id    | a509ae5aa6dc423e9a744f189182394e |
|   name   |               test               |
+----------+----------------------------------+
 
 
API:
[1] : GET /OS-KSADM/roles/{role_id}
 
 
补充:综合编程 , 其他综合 ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,