versions.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:glare 作者: openstack 项目源码 文件源码
def index(req):
        """Respond to a request for all OpenStack Glare API versions.

        :param req: user request object
        :return: list of supported API versions
        """
        version_objs = [
            {
                'version': '1.0',
                'status': 'STABLE',
                'links': _LINKS,
                'media-type': 'application/vnd.openstack.artifacts-1.0',
            },
            {
                'version': '1.1',
                'status': 'EXPERIMENTAL',
                'links': _LINKS,
                'media-type': 'application/vnd.openstack.artifacts-1.1',
            }]
        response = webob.Response(request=req,
                                  status=http_client.MULTIPLE_CHOICES,
                                  content_type='application/json')
        response.body = jsonutils.dump_as_bytes(dict(versions=version_objs))
        return response
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号