summaryrefslogtreecommitdiff
path: root/kvmd/plugins/msd/otg/__init__.py
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2022-07-23 04:41:54 +0300
committerMaxim Devaev <[email protected]>2022-07-24 05:38:26 +0300
commit2eef9bd26394f5f98f1324012a3c77570e80a7e2 (patch)
tree5aef8e1650bc02b0bb65552a5d5f6d45cfb6eec8 /kvmd/plugins/msd/otg/__init__.py
parent06bf0fcd17e58d0a719baed57fca9aa786340237 (diff)
basic msd rw api
Diffstat (limited to 'kvmd/plugins/msd/otg/__init__.py')
-rw-r--r--kvmd/plugins/msd/otg/__init__.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/kvmd/plugins/msd/otg/__init__.py b/kvmd/plugins/msd/otg/__init__.py
index 409b899a..8aea3d34 100644
--- a/kvmd/plugins/msd/otg/__init__.py
+++ b/kvmd/plugins/msd/otg/__init__.py
@@ -56,6 +56,7 @@ from .. import MsdDisconnectedError
from .. import MsdImageNotSelected
from .. import MsdUnknownImageError
from .. import MsdImageExistsError
+from .. import MsdRwNotSupported
from .. import BaseMsd
from .. import MsdImageWriter
@@ -222,6 +223,7 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
"features": {
"multi": True,
"cdrom": True,
+ "rw": False,
},
}
@@ -254,8 +256,17 @@ class Plugin(BaseMsd): # pylint: disable=too-many-instance-attributes
# =====
@aiotools.atomic
- async def set_params(self, name: Optional[str]=None, cdrom: Optional[bool]=None) -> None:
+ async def set_params(
+ self,
+ name: Optional[str]=None,
+ cdrom: Optional[bool]=None,
+ rw: Optional[bool]=None,
+ ) -> None:
+
async with self.__state.busy():
+ if rw is not None:
+ raise MsdRwNotSupported()
+
assert self.__state.storage
assert self.__state.vd