1. 程式人生 > >devstack:如何使用openstack命令列訪問服務

devstack:如何使用openstack命令列訪問服務

下載admin-openrc.sh檔案(裡面包含了各種授權資訊,包括使用者名稱,專案名,專案ID等)

 

在shell中執行:

source admin-openrc.sh

之後就可以使用openstack命令列訪問服務

查詢token

openstack token issue
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field      | Value                                                                                                                                                                                   |
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| expires    | 2018-10-26T10:42:37+0000                                                                                                                                                                |
| id         | gAAAAABb0uGNQKnXIsmeOLFWHAPuodJhZLt_EfthUoz-oKVoNKTI6k-gY6EcLoGB_eJ--fq-DfSJkQ8LziqZtBvbOdR4JLVG5iK-_rsL9IiBddGB5sSSczq0JSEGzXECq4yJMWxQJ0HNxrI-kEZRPb3xWiVYPhDzS3hUKK3XDSVHxyidk2t0J2Y |
| project_id | 75e91b0ef4ac48e7b12ec6e1920adc69                                                                                                                                                        |
| user_id    | f257d8cce0ca43d79cf3e14892f0cab8                                                                                                                                                        |
+------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+

查詢服務

openstack service list
+----------------------------------+-------------+----------------+
| ID                               | Name        | Type           |
+----------------------------------+-------------+----------------+
| 1bf2d3c5b18b400e8a16b3c2da3fc5e2 | glance      | image          |
| 5108729c6f8048cf8643bd0c5bd6e83a | keystone    | identity       |
| 51bf682d18c2495aa90ae15b71a73bd0 | cinder      | block-storage  |
| 604fc048b4914a9fb0d95c953007fb6b | neutron     | network        |
| 696f3a3bf88a4b439213256ec3352e34 | nova_legacy | compute_legacy |
| 6f756b71ce5940bd936da54c33cca652 | nova        | compute        |
| 9bbc1ec5ba754277a97201adce183512 | cinder      | volume         |
| cca86f0360724219a8924db971c849b6 | cinderv3    | volumev3       |
| f63758cad01947579c91a1062fc46532 | placement   | placement      |
| f75fdff1fc904443a60251e8183a7130 | cinderv2    | volumev2       |
+----------------------------------+-------------+----------------+