1 ##############################################################################
2 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
11 from flask import Flask
12 from flask_restful import Api
14 from api.urls import urlpatterns
15 from yardstick import _init_logging
17 logger = logging.getLogger(__name__)
23 reduce(lambda a, b: a.add_resource(b.resource, b.url,
24 endpoint=b.endpoint) or a, urlpatterns, api)
26 if __name__ == '__main__':
28 logger.setLevel(logging.DEBUG)
29 logger.info('Starting server')
30 app.run(host='0.0.0.0')