bmx-sample-broker.py 文件源码

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

项目:Bluemix-ServiceBroker 作者: IBM-Cloud 项目源码 文件源码
def catalog():
    # Return the catalog of services handled by this broker
    #
    # GET /v2/catalog:
    #
    # HEADER:
    #     X-Broker-Api-Version: <version>
    #
    # return:
    #     JSON document with details about the
    #     services offered through this broker

    api_version = request.headers.get('X-Broker-Api-Version')
    # Check broker API version
    if not api_version or float(api_version) < X_BROKER_API_VERSION:
        abort(412, "Precondition failed. Missing or incompatible %s. Expecting version %0.1f or later" % (X_BROKER_API_VERSION_NAME, X_BROKER_API_VERSION))
    services={"services": [pseudo_service]}
    return jsonify(services)


#
# Provision
#
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号