diff options
author | RHE <rebirthmonkey@gmail.com> | 2017-12-28 15:19:05 +0100 |
---|---|---|
committer | RHE <rebirthmonkey@gmail.com> | 2017-12-28 15:19:05 +0100 |
commit | b7cf76d39eab9d292b8d58db4b0934557cad4509 (patch) | |
tree | 556b0e617b5921ad3779b7aed3b669bb475331c6 /moon_wrapper/moon_wrapper/http_server.py | |
parent | 9cf58823b4fa426816acfef81a562054d26afde8 (diff) |
moonv4.3 review
Change-Id: I0d137df21136292b58194def44ac5b32183368fc
Signed-off-by: RHE <rebirthmonkey@gmail.com>
Diffstat (limited to 'moon_wrapper/moon_wrapper/http_server.py')
-rw-r--r-- | moon_wrapper/moon_wrapper/http_server.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/moon_wrapper/moon_wrapper/http_server.py b/moon_wrapper/moon_wrapper/http_server.py index 1b429bc5..8027a0d3 100644 --- a/moon_wrapper/moon_wrapper/http_server.py +++ b/moon_wrapper/moon_wrapper/http_server.py @@ -8,15 +8,19 @@ from flask_restful import Resource, Api import logging from moon_wrapper import __version__ from moon_wrapper.api.generic import Status, Logs, API -from moon_wrapper.api.wrapper import Wrapper +from moon_wrapper.api.oslowrapper import OsloWrapper from python_moonutilities.cache import Cache from python_moonutilities import configuration, exceptions -logger = logging.getLogger("moon.wrapper.http") +logger = logging.getLogger("moon.wrapper.http_server") CACHE = Cache() +__API__ = ( + Status, Logs, API + ) + class Server: """Base class for HTTP server""" @@ -61,10 +65,6 @@ class Server: def run(self): raise NotImplementedError() -__API__ = ( - Status, Logs, API - ) - class Root(Resource): """ @@ -127,7 +127,7 @@ class HTTPServer(Server): for api in __API__: self.api.add_resource(api, *api.__urls__) - self.api.add_resource(Wrapper, *Wrapper.__urls__, + self.api.add_resource(OsloWrapper, *OsloWrapper.__urls__, resource_class_kwargs={ "orchestrator_url": self.orchestrator_url, "cache": CACHE, @@ -136,5 +136,4 @@ class HTTPServer(Server): def run(self): self.app.run(host=self._host, port=self._port) # nosec - # self.app.run(debug=True, host=self._host, port=self._port) # nosec |