Openstack通过API获取token查询服务

查看数: 18700 | 评论数: 6 | 收藏 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2017-3-6 23:56

正文摘要:

本帖最后由 Kevin517 于 2017-3-6 23:58 编辑 环境:Openstack-Mitaka 由于对 Web 不是太熟悉。对 API 使用有很多疑惑。 在通过 Keystone 获取 Token 查询其他服务的过程中,遇到了点问题,不太明白,希望大 ...

回复

einhep 发表于 2017-3-7 17:53:21
Kevin517 发表于 2017-3-7 16:04
您好,我刚刚试了一次,还是 401 。

通过shell看下,是否确实都有。然后通过rest api请求
nextuser 发表于 2017-3-7 13:22:55
Response Codes&#182;Success&#182;
Code
Reason
201 - CreatedResource was created and is ready to use.

Error&#182;[td]
Code
Reason
400 - Bad RequestSome content in the request was invalid.
401 - UnauthorizedUser must authenticate before making a request.
403 - ForbiddenPolicy does not allow current user to do this operation.
409 - ConflictThis operation conflicted with another operation on this resource.

401说明是未验证身份,也就是可能token出问题了
nextuser 发表于 2017-3-7 13:13:57
Kevin517 发表于 2017-3-7 11:05
openstack 官网的 API 页面

https://developer.openstack.org/api-ref/identity/v3/?expanded=check-t ...

用这个请求试试
[mw_shl_code=bash,true]http://192.168.10.11:5000/v3/auth/projects
[/mw_shl_code]


Kevin517 发表于 2017-3-7 11:05:37
nextuser 发表于 2017-3-7 08:43
请求下镜像试试

images

openstack 官网的 API 页面

https://developer.openstack.org/ ... =check-token-detail,token-authentication-with-unscoped-authorization-detail,password-authentication-with-unscoped-authorization-detail,password-authentication-with-scoped-authorization-detail
nextuser 发表于 2017-3-7 08:43:20
请求下镜像试试

images

楼主参考的网址是哪个?


关闭

推荐上一条 /2 下一条