openstack查看命令的restful调用形式

时间:2023-03-09 09:59:16
openstack查看命令的restful调用形式
[root@cc10 fast-pulsar2]#
[root@cc10 fast-pulsar2]# cinder --debug type-create hzb
DEBUG:keystoneclient.session:REQ: curl -g -i -X GET http://172.16.0.10:35357/v3 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG:keystoneclient.session:RESP: [] Date: Mon, Aug :: GMT Server: Apache/2.4. (CentOS) mod_wsgi/3.4 Python/2.7. Vary: X-Auth-Token x-openstack-request-id: req-72e91772-cfd5-48b3-af64-10fe73db0110 Content-Length: Keep-Alive: timeout=, max= Connection: Keep-Alive Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2016-04-04T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.6", "links": [{"href": "http://172.16.0.10:35357/v3/", "rel": "self"}]}} DEBUG:keystoneclient.auth.identity.v3.base:Making authentication request to http://172.16.0.10:35357/v3/auth/tokens
DEBUG:keystoneclient.session:REQ: curl -g -i -X POST http://172.16.0.10:8776/v2/852869c53f2d4a4387d2c90a2167d762/types -H "User-Agent: python-cinderclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}89bfee5ba160199a800d6014a9911c9d4d265fea" -d '{"volume_type": {"os-volume-type-access:is_public": true, "name": "hzb", "description": null}}'
DEBUG:keystoneclient.session:RESP: [] X-Compute-Request-Id: req-432334a3-ee1c-41ae-a737-c9f3374026db Content-Type: application/json Content-Length: X-Openstack-Request-Id: req-432334a3-ee1c-41ae-a737-c9f3374026db Date: Mon, Aug :: GMT Connection: keep-alive
RESP BODY: {"volume_type": {"name": "hzb", "extra_specs": {}, "os-volume-type-access:is_public": true, "is_public": true, "id": "dada2d77-2ffb-424e-a5fb-d3f81469b141", "description": null}} +--------------------------------------+------+-------------+-----------+
| ID | Name | Description | Is_Public |
+--------------------------------------+------+-------------+-----------+
| dada2d77-2ffb-424e-a5fb-d3f81469b141 | hzb | - | True |
+--------------------------------------+------+-------------+-----------+

也就是执行命令的时候增加 --debug