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
#
bmx-sample-broker.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录