命令语法 openstack role add --project 项目名 --user 用户名 角色名 样例 openstack role add --project hzab --user hq woker
查看项目
[root@controller ~]# openstack project list | |
---|---|
ID | Name |
ad8d7966165b4619aab21300e50f7020 | service |
b03aac1f6ae94f7bada2afa8f2064312 | admin |
bdc7f07c4d2c42439d3f4ecb4a3d7b59 | myproject |
查看用户
[root@controller ~]# openstack user list | |
---|---|
ID | Name |
06a72bdd76d247fca8328ee17360449e | admin |
0e1f815fde9b48d6b90727b5c7730478 | glance |
6836dfd555ee4df788f268948c1105b7 | neutron |
75557b1b240e4fe5bba190edb90dd8cc | placement |
99c1e22bd4944c6a8e92b1b290b77dfc | cinder |
cffad667559c4d438310fdddfafd181b | nova |
fad5b40bac5649b4a55cdaa72b2dc086 | myuser |
查看角色
[root@controller ~]# openstack role list | |
---|---|
ID | Name |
2e227c837d0741c0b5c854f82a0a1cae | admin |
32c153c3ecfd4bc0ad425f796b5acf11 | myrole |
576f58a9b30b43ca9fb69ddfc48484a7 | member |
84268da464474db6acf643e6ee724e1d | reader |
91c2185197184fac84cb27185e014240 | wocao |
将项目和用户加入到角色中 [root@controller ~]# openstack role add --project myproject --user myuser wocao
[root@controller ~]# openstack role list | |
---|---|
ID | Name |
2e227c837d0741c0b5c854f82a0a1cae | admin |
32c153c3ecfd4bc0ad425f796b5acf11 | myrole |
576f58a9b30b43ca9fb69ddfc48484a7 | member |
84268da464474db6acf643e6ee724e1d | reader |
91c2185197184fac84cb27185e014240 | wocao |
[root@controller ~]# openstack role show wocao | |
---|---|
Field | Value |
domain_id | None |
id | 91c2185197184fac84cb27185e014240 |
name | wocao |