diff options
author | Devaev Maxim <[email protected]> | 2018-10-05 20:03:40 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2018-10-05 20:06:39 +0300 |
commit | a87963e300b489831c3809c4321c8747752fc6c6 (patch) | |
tree | 57480d30fd822ac648df39cfb711e6a3aadaf5e1 /kvmd/server.py | |
parent | bbaf99c1b4a19ec6438f794bc045777443cbaaf2 (diff) |
msd pinout
Diffstat (limited to 'kvmd/server.py')
-rw-r--r-- | kvmd/server.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kvmd/server.py b/kvmd/server.py index a4444ecc..efdb48c0 100644 --- a/kvmd/server.py +++ b/kvmd/server.py @@ -147,6 +147,7 @@ class Server: # pylint: disable=too-many-instance-attributes app.router.add_get("/msd", self.__msd_state_handler) app.router.add_post("/msd/connect", self.__msd_connect_handler) app.router.add_post("/msd/write", self.__msd_write_handler) + app.router.add_post("/msd/reset", self.__msd_reset_handler) app.router.add_get("/streamer", self.__streamer_state_handler) app.router.add_post("/streamer/set_params", self.__streamer_set_params_handler) @@ -298,6 +299,11 @@ class Server: # pylint: disable=too-many-instance-attributes logger.info("Written %d bytes to mass-storage device", written) return _json({"written": written}) + @_wrap_exceptions_for_web("Mass-storage error") + async def __msd_reset_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response: + await self.__msd.reset() + return _json() + # ===== STREAMER async def __streamer_state_handler(self, _: aiohttp.web.Request) -> aiohttp.web.Response: |