立志把F、G、H版本的keystone工作原理及区别都整理一下,网上分析keystone核心对象及其意义的文章已经很多了,我就不赘述了。
先看下keystoneClient吧!
获得token的请求:curl -i http://localhost:5000/v2.0/tokens -X POST -H "Content-Type: application/json" -H "User-Agent: python-keystoneclient"
响应结果:
{ "access": { "token": { "expires": "2013-08-06T08:14:29Z", "id": "636bb1fd4f5b4ec1b9f1be668a9a7e75", "tenant": { "enabled": true, "description": null, "name": "admin", "id": "5dd12337fcaf45a99269053caa8549f2" } }, "serviceCatalog": [#Catalog实现template { "endpoints": [ { "adminURL": "http://10.120.34.51:9292", "region": "RegionOne", "internalURL": "http://10.120.34.51:9292", "id": "68e3b6105ae14829bbee65fd8d72e190", "publicURL": "http://10.120.34.51:9292" } ], "endpoints_links": [ ], "type": "image", "name": "glance" #可以访问的资源列表。 }, { "endpoints": [ { "adminURL": "http://10.120.34.51:8774/v2/5dd12337fcaf45a99269053caa8549f2", "region": "RegionOne", "internalURL": "http://10.120.34.51:8774/v2/5dd12337fcaf45a99269053caa8549f2", "id": "3770102afa3b42eeb0937efac7a8a49e", "publicURL": "http://10.120.34.51:8774/v2/5dd12337fcaf45a99269053caa8549f2" } ], "endpoints_links": [ ], "type": "compute", "name": "nova" }, { "endpoints": [ { "adminURL": "http://10.120.34.51:8773/services/Admin", "region": "RegionOne", "internalURL": "http://10.120.34.51:8773/services/Cloud", "id": "c1379aa288e04509bfaa94235a50b05d", "publicURL": "http://10.120.34.51:8773/services/Cloud" } ], "endpoints_links": [ ], "type": "ec2", "name": "ec2" }, { "endpoints": [ { "adminURL": "http://10.120.34.51:35357/v2.0", "region": "RegionOne", "internalURL": "http://10.120.34.51:5000/v2.0", "id": "6e66aea94bac486a8331758e00b48c63", "publicURL": "http://10.120.34.51:5000/v2.0" } ], "endpoints_links": [ ], "type": "identity", "name": "keystone" } ], "user": { "username": "admin", "roles_links": [ ], "id": "0e08fcb9b05f4d84beab287dcc2610e4", "roles": [ { "name": "KeystoneServiceAdmin" }, { "name": "admin" }, { "name": "KeystoneAdmin" } ], "name": "admin" }, "metadata": { "is_admin": 0, "roles": [ "2b8526ef51584c989ab16e235d5eb9db", "b35cfa3e75f24145808f3f3e5898d9b1", "0ea7efdc0b204fcbab3b4bff2f9c014b" ] } } }
catalog