记录一些常用的 OpenStack client 命令,以备后查。
rest api 调用实例
Keystone
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
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
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>'