OpenStack Client

发布时间: 更新时间: 总字数:75 阅读时间:1m 作者: 分享 复制网址

记录一些常用的 OpenStack client 命令,以备后查。

rest api 调用实例

Keystone

  • 获取 token
curl -X POST http://192.168.1.100:5000/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username": "ceilometer", "password":"<ceilometer-pwd>"}, "tenantName":"service"}}' -H "Content-type: application/json"

Neutron

  • 获取 port
curl -g -i -X GET http://192.168.1.100:9696/v2.0/ports.json -H "User-Agent: python-neutronclient" -H "Accept: application/json" -H "X-Auth-Token: <token-key>"

Ceilometer

  • 获取 ceilometer sample
curl -g -i -X 'GET' 'http://192.168.1.100:8777/v2/samples?limit=1' -H 'User-Agent: ceilometerclient.openstack.common.apiclient' -H 'X-Auth-Token: <token-key>'
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数