Keystone 命令
基础命令
- 创建用户
[root@controller ~]# openstack user create --password 000000 --domain demo alice
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | e00e789b5dbf4b39bcd252bc36114411 |
| enabled | True |
| id | 34e0eab1711e4be4ab2aaad9619413bc |
| name | alice |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
- 创建项目
[root@controller ~]# openstack project create --domain demo acme
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | |
| domain_id | e00e789b5dbf4b39bcd252bc36114411 |
| enabled | True |
| id | ecab29c196b14dedbacad70743ad21d6 |
| is_domain | False |
| name | acme |
| parent_id | e00e789b5dbf4b39bcd252bc36114411 |
| tags | [] |
+-------------+----------------------------------+
- 创建角色
[root@controller ~]# openstack role create general-user
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | 9350e839460643549645004d17b33636 |
| name | general-user |
+-----------+----------------------------------+
- 绑定用户和项目权限
[root@controller ~]# openstack role add --user alice --project acme general-user
- 修改用户信息(用户名及密码)
[root@controller ~]# openstack user set alice --name alice_user --password 111111
- 删除用户
[root@controller ~]# openstack user delete alice_user
- 删除项目
[root@controller ~]# openstack project delete acme
基础查询
- 用户列表查询
[root@controller ~]# openstack user list
+----------------------------------+-------------------+
| ID | Name |
+----------------------------------+-------------------+
| 414fa02e90694598844d578835e9cb05 | heat_domain_admin |
| 4feaae4baf484590b6986fcf9453ae75 | neutron |
| 6af86feb326b4abb842fcca2c61ded13 | admin |
| 72b0c6e1d071486089d01e55cc69358c | swift |
| 7d01723ed1b445ddb342c8edfc30a5e1 | heat |
| 7ddb53c44ea04f7397ab07c709c72571 | placement |
| cd4f40ac99b14ec18410fe1f59529b5c | glance |
| cd921b665e0348ce853f34538b87369c | nova |
| cf4bb065874b4a348ca5d6e3ea261d71 | cinder |
| d5388f9095634923907f8c48eaca40d0 | demo |
+----------------------------------+-------------------+
- 查看指定用户的详细信息
[root@controller ~]# openstack user show admin
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | e00e789b5dbf4b39bcd252bc36114411 |
| enabled | True |
| id | 6af86feb326b4abb842fcca2c61ded13 |
| name | admin |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
- 项目列表查询
[root@controller ~]# openstack project list
+----------------------------------+---------+
| ID | Name |
+----------------------------------+---------+
| 4f1f49c7caec45f9b6a61133818c8b62 | admin |
| 9a049203f8dd434e91b9bea4602e4cb2 | service |
| cae0b0f5574040f6ad62a7d2d1211897 | demo |
+----------------------------------+---------+
- 查询指定项目详细信息
[root@controller ~]# openstack project show admin
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | Admin Project |
| domain_id | e00e789b5dbf4b39bcd252bc36114411 |
| enabled | True |
| id | 4f1f49c7caec45f9b6a61133818c8b62 |
| is_domain | False |
| name | admin |
| parent_id | e00e789b5dbf4b39bcd252bc36114411 |
| tags | [] |
+-------------+----------------------------------+
- 角色列表查询
[root@controller ~]# openstack role list
+----------------------------------+------------------+
| ID | Name |
+----------------------------------+------------------+
| 25c3f112b4c5433196054cfb2634761c | user |
| 80fbbeddc1944979bf0ee466052204df | heat_stack_user |
| d827701c9f35483cb70705f990930b33 | admin |
| eb561c71364a435a9a43a27c7127880d | heat_stack_owner |
+----------------------------------+------------------+
- 查询指定角色详细信息
[root@controller ~]# openstack role show admin
+-----------+----------------------------------+
| Field | Value |
+-----------+----------------------------------+
| domain_id | None |
| id | d827701c9f35483cb70705f990930b33 |
| name | admin |
+-----------+----------------------------------+
- 端点地址查询
[root@controller ~]# openstack endpoint list
+----------------------------------+-----------+--------------+----------------+---------+-----------+----------------------------------------------+
| ID | Region | Service Name | Service Type | Enabled | Interface | URL |
+----------------------------------+-----------+--------------+----------------+---------+-----------+----------------------------------------------+
| 070879aaf9f74b6f974a64bf795df9e1 | RegionOne | cinder | volume | True | public | http://controller:8776/v1/%(tenant_id)s |
| 14ba6d4680de457da3ac1e354d217937 | RegionOne | cinderv3 | volumev3 | True | internal | http://controller:8776/v3/%(tenant_id)s |
| 176318af64ec4c4b9efff02927869fba | RegionOne | placement | placement | True | admin | http://controller:8778 |
| 1924dfab0ba3498498037d566ef5a26e | RegionOne | heat-cfn | cloudformation | True | admin | http://controller:8000/v1 |
| 1e53bda3fd6e477f9d7e07bbcfe81d97 | RegionOne | nova | compute | True | internal | http://controller:8774/v2.1 |
| 203a0970d4e04e2d8d73fabf37ded09a | RegionOne | glance | image | True | admin | http://controller:9292 |
| 20c40fdc2bcb43aebc98c2f6ebc38f4a | RegionOne | placement | placement | True | internal | http://controller:8778 |
| 24a185902c114d03a6562358cd2a27ff | RegionOne | heat | orchestration | True | internal | http://controller:8004/v1/%(tenant_id)s |
| 2f9c670fc831400ab1aa9b1b39943f78 | RegionOne | heat | orchestration | True | admin | http://controller:8004/v1/%(tenant_id)s |
| 3243fd67cf574329ba1ec9ddcadc9d5a | RegionOne | glance | image | True | internal | http://controller:9292 |
| 36c5f2a0828346a19c8e0ec9080ba5f6 | RegionOne | cinder | volume | True | internal | http://controller:8776/v1/%(tenant_id)s |
| 49d5cef336d84801b77118f126d8309a | RegionOne | neutron | network | True | admin | http://controller:9696 |
| 4cefebe8d0cf446abfccce9f0a1aa8a2 | RegionOne | nova | compute | True | public | http://controller:8774/v2.1 |
| 5a7c66c9ddea43b8bd68f7b8b09e575a | RegionOne | keystone | identity | True | admin | http://controller:35357/v3 |
| 60fb29c10ba342b197778834b917ed06 | RegionOne | placement | placement | True | public | http://controller:8778 |
| 6b3ae924e600453da71de582a0ab40f7 | RegionOne | cinderv2 | volumev2 | True | admin | http://controller:8776/v2/%(tenant_id)s |
| 75925e50e09045ad940375d686b2adaa | RegionOne | heat-cfn | cloudformation | True | internal | http://controller:8000/v1 |
| 7d4bd309cf1e4af8a5466a6e391078cd | RegionOne | cinderv2 | volumev2 | True | public | http://controller:8776/v2/%(tenant_id)s |
| 836294fe40ab40b085afdbf69eb1ced5 | RegionOne | heat-cfn | cloudformation | True | public | http://controller:8000/v1 |
| 837fcfb84feb4ce5bfe8d6e2df3bbfed | RegionOne | cinder | volume | True | admin | http://controller:8776/v1/%(tenant_id)s |
| 85dc508ab46d42f7b17a0292bced2967 | RegionOne | neutron | network | True | public | http://controller:9696 |
| 8aef982b5799495aae13d297324f539b | RegionOne | heat | orchestration | True | public | http://controller:8004/v1/%(tenant_id)s |
| 99ab8b3a00be42ab8e39bc7d9273eded | RegionOne | neutron | network | True | internal | http://controller:9696 |
| a5993ae639cf479c8281e31b549c346a | RegionOne | swift | object-store | True | public | http://controller:8080/v1/AUTH_%(tenant_id)s |
| b16f60dff5084f03a54bc865c088cce3 | RegionOne | keystone | identity | True | internal | http://controller:5000/v3 |
| bc01a1ab86fd45dea4fded00ce6450cf | RegionOne | keystone | identity | True | public | http://controller:5000/v3 |
| bec8122ccfbc4261ab660d25cfdb0bcb | RegionOne | nova | compute | True | admin | http://controller:8774/v2.1 |
| cc673e71e69345f19fd039281cd953bd | RegionOne | swift | object-store | True | admin | http://controller:8080/v1 |
| d6ee54c5bf7d4457a4bc5d329f57c52f | RegionOne | cinderv3 | volumev3 | True | admin | http://controller:8776/v3/%(tenant_id)s |
| d9f06ca35a7c48c69d1b052cfe7738c5 | RegionOne | cinderv3 | volumev3 | True | public | http://controller:8776/v3/%(tenant_id)s |
| e2cf9b61cad24124a8b9e6e8801d9171 | RegionOne | cinderv2 | volumev2 | True | internal | http://controller:8776/v2/%(tenant_id)s |
| e62f5d11d50041ed944e6d0eff871434 | RegionOne | glance | image | True | public | http://controller:9292 |
| f7d9677fef2344beb9b4ba1cff805e0b | RegionOne | swift | object-store | True | internal | http://controller:8080/v1/AUTH_%(tenant_id)s |
+----------------------------------+-----------+--------------+----------------+---------+-----------+----------------------------------------------+
Comments NOTHING