首页  »   互联网

Openstack rest api - create token

网友分享于:2014-07-10  浏览:0次
Openstack rest api -- create token
1.使用RestClient获取openstack token

POST http://ip:5000/v2.0/tokens
Header:
Content-Type:applicatoin/json
Accept:application/json

Body:
String Body

{
"auth":{
"passwordCredentials":{
"username":"admin",
"password":"secrete"
},
"tenantName":"admin"
}
}

2.获取instance信息

GET  http://ip:8774/v2/8fd3da375dc2418caa668db87cc20822/servers
Header:
X-Auth-Token:a4a1da32ad3046a885caa4ca8fabf878
Auth:
username:admin
pass:secrete

相关解决方案

最新解决方案