summaryrefslogtreecommitdiff
path: root/kvmd/plugins/msd/__init__.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2019-09-25 03:15:20 +0300
committerDevaev Maxim <[email protected]>2019-09-25 03:15:20 +0300
commit5c4e8f7962fe89ee0dcdea9ba859f7045fa2d6d8 (patch)
tree785b2454f56480464d18c71c2221b262bb92eabb /kvmd/plugins/msd/__init__.py
parent5d437c58e342bcb9847e419e46c751b3ed70e747 (diff)
extended msd api for future otg
Diffstat (limited to 'kvmd/plugins/msd/__init__.py')
-rw-r--r--kvmd/plugins/msd/__init__.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/kvmd/plugins/msd/__init__.py b/kvmd/plugins/msd/__init__.py
index d5aa3064..bff60232 100644
--- a/kvmd/plugins/msd/__init__.py
+++ b/kvmd/plugins/msd/__init__.py
@@ -64,6 +64,11 @@ class MsdIsBusyError(MsdOperationError):
super().__init__("Performing another MSD operation, please try again later")
+class MsdMultiNotSupported(MsdOperationError):
+ def __init__(self) -> None:
+ super().__init__("This MSD does not support storing multiple images")
+
+
# =====
class BaseMsd(BasePlugin):
def get_state(self) -> Dict:
@@ -73,22 +78,27 @@ class BaseMsd(BasePlugin):
yield {}
raise NotImplementedError
+ async def reset(self) -> None:
+ raise NotImplementedError
+
async def cleanup(self) -> None:
pass
+ # =====
+
async def connect(self) -> Dict:
raise NotImplementedError
async def disconnect(self) -> Dict:
raise NotImplementedError
- async def reset(self) -> None:
+ async def select(self, name: str) -> Dict:
raise NotImplementedError
- async def __aenter__(self) -> "BaseMsd":
+ async def remove(self, name: str) -> Dict:
raise NotImplementedError
- def get_chunk_size(self) -> int:
+ async def __aenter__(self) -> "BaseMsd":
raise NotImplementedError
async def write_image_info(self, name: str, complete: bool) -> None: