diff options
author | Alice Ferrazzi <alicef@gentoo.org> | 2017-08-28 17:08:51 +0900 |
---|---|---|
committer | Alice Ferrazzi <alicef@gentoo.org> | 2017-08-28 17:08:51 +0900 |
commit | d40e25d8c2732f61f36ca02af9f0c52938d3838a (patch) | |
tree | c86314bb3c9ba8a3e0c6dc6d26f35e1373d77e0e /elivepatch_server/elivepatch | |
parent | fixed livepatch object path (diff) | |
download | elivepatch-d40e25d8c2732f61f36ca02af9f0c52938d3838a.tar.gz elivepatch-d40e25d8c2732f61f36ca02af9f0c52938d3838a.tar.bz2 elivepatch-d40e25d8c2732f61f36ca02af9f0c52938d3838a.zip |
moved elivepatch-client and elivepatch-server to a different
repository
Diffstat (limited to 'elivepatch_server/elivepatch')
-rw-r--r-- | elivepatch_server/elivepatch | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/elivepatch_server/elivepatch b/elivepatch_server/elivepatch deleted file mode 100644 index cd14f75..0000000 --- a/elivepatch_server/elivepatch +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# (c) 2017, Alice Ferrazzi <alice.ferrazzi@gmail.com> -# Distributed under the terms of the GNU General Public License v2 or later - - -from flask import Flask -from flask_restful import Api -from elivepatch_server.resources import AgentInfo, dispatcher - - -def create_app(): - """ - Create server application - RESTful api version 1.0 - """ - - app = Flask(__name__, static_url_path="") - api = Api(app) - - api.add_resource(AgentInfo.AgentAPI, '/elivepatch/api/', - endpoint='root') - - # get agento information - api.add_resource(AgentInfo.AgentAPI, '/elivepatch/api/v1.0/agent', - endpoint='agent') - - # where to retrieve the live patch when ready - api.add_resource(dispatcher.SendLivePatch, - '/elivepatch/api/v1.0/send_livepatch', - endpoint='send_livepatch') - - # where to receive the config file - api.add_resource(dispatcher.GetFiles, '/elivepatch/api/v1.0/get_files', - endpoint='config') - return app - -if __name__ == '__main__': - app = create_app() - app.run(debug=True, host='0.0.0.0', threaded=True) |