码迷,mamicode.com
首页 > Windows程序 > 详细

OpenStack IdentityService Keystone V3 API Curl实战

时间:2014-09-24 10:45:26      阅读:1358      评论:0      收藏:0      [点我收藏+]

标签:des   style   http   color   io   os   ar   for   div   

v3 API Examples Using Curl

<Tokens>

1,Default scope 获取token

Get an token with default scope (may be unscoped):

Tips CLI如下:

curl -i \
  -H "Content-Type: application/json" \
  -d ‘
{ "auth": {
    "identity": {
      "methods": ["password"],
      "password": {
        "user": {
          "name": "demo",
          "domain": { "id": "default" },
          "password": "321"
        }
      }
    }
  }
}‘ \
  http://5.10.124.181:5000/v3/auth/tokens ; echo

bubuko.com,布布扣

2,Project-scoped

Get a project-scoped token:

curl -i \
  -H "Content-Type: application/json" \
  -d ‘
{ "auth": {
    "identity": {
      "methods": ["password"],
      "password": {
        "user": {
          "name": "demo",
          "domain": { "id": "default" },
          "password": "321"
        }
      }
    },
    "scope": {
      "project": {
        "name": "demo_project",
        "domain": { "id": "default" }
      }
    }
  }
}‘ \
  http://5.10.124.181:5000/v3/auth/tokens ; echo

bubuko.com,布布扣

3,Domain-Scoped

Get a domain-scoped token (Note that you’re going to need a role-assignment on the domain first!):

curl -i \
  -H "Content-Type: application/json" \
  -d ‘
{ "auth": {
    "identity": {
      "methods": ["password"],
      "password": {
        "user": {
          "name": "admin",
          "domain": { "id": "default" },
          "password": "321"
        }
      }
    },
    "scope": {
      "domain": {
        "id": "default"
      }
    }
  }
}‘ \
  http://5.10.124.181:5000/v3/auth/tokens ; echo

bubuko.com,布布扣

4,Getting a token from a token

bubuko.com,布布扣

5,DELETE /v3/auth/tokens

Revoke a token:

bubuko.com,布布扣

<二,Domains>

Get /v3/domains

List domains:

 

OpenStack IdentityService Keystone V3 API Curl实战

标签:des   style   http   color   io   os   ar   for   div   

原文地址:http://www.cnblogs.com/ruiy/p/3989791.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!