zoukankan      html  css  js  c++  java
  • 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: [200] Date: Mon, 13 Aug 2018 08:53:55 GMT Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Vary: X-Auth-Token x-openstack-request-id: req-72e91772-cfd5-48b3-af64-10fe73db0110 Content-Length: 251 Keep-Alive: timeout=5, max=100 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: [200] X-Compute-Request-Id: req-432334a3-ee1c-41ae-a737-c9f3374026db Content-Type: application/json Content-Length: 178 X-Openstack-Request-Id: req-432334a3-ee1c-41ae-a737-c9f3374026db Date: Mon, 13 Aug 2018 08:53:56 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

  • 相关阅读:
    火山喷发 计蒜客16862 NOIP模拟赛 概率DP
    洛谷 1429 平面最近点对(加强版) 快排 非点分治或kdtree
    鬼脚图 计蒜客17353 NOIP模拟 归并排序逆序对
    小X的佛光 NOIP模拟赛 倍增LCA 树结构
    小X的质数 NOIP模拟赛 魔改线性筛素数
    Win7Office2010Flash控件无法使用"此演示文稿中一些控件无法激活,可能这些控件未在此计算机中注册"
    【NOILinux】VmWare15使用技巧
    【超链接】导航网站
    C++统计博客园写过的代码行数
    合并多个txt文件到一个
  • 原文地址:https://www.cnblogs.com/boshen-hzb/p/9469762.html
Copyright © 2011-2022 走看看