From 59718736801ea1b97094649cb94d529dfaa809fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sat, 1 Jul 2017 21:20:35 +0200 Subject: [PATCH] storage: drop functions not being part of the API commit/recover/reset should really be handled in start/stop. Nothing stops specific pool implementation to define such functions privately. QubesOS/qubes-issues#2256 --- qubes/storage/__init__.py | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/qubes/storage/__init__.py b/qubes/storage/__init__.py index 26598f85..2e7942a8 100644 --- a/qubes/storage/__init__.py +++ b/qubes/storage/__init__.py @@ -152,12 +152,6 @@ class Volume(object): This can be implemented as a coroutine.''' raise self._not_implemented("remove") - def commit(self): - ''' Write the snapshot to disk - - This can be implemented as a coroutine.''' - raise self._not_implemented("commit") - def export(self): ''' Returns an object that can be `open()`. ''' raise self._not_implemented("export") @@ -195,15 +189,6 @@ class Volume(object): ''' raise self._not_implemented("is_outdated") - def recover(self): - ''' Try to recover a :py:class:`Volume` or :py:class:`SnapVolume` ''' - raise self._not_implemented("recover") - - def reset(self): - ''' Drop and recreate volume without copying it's content from source. - ''' - raise self._not_implemented("reset") - def resize(self, size): ''' Expands volume, throws :py:class:`qubes.storage.StoragePoolException` if @@ -544,19 +529,6 @@ class Storage(object): if futures: yield from asyncio.wait(futures) - @asyncio.coroutine - def commit(self): - ''' Makes changes to an 'origin' volume persistent ''' - futures = [] - for volume in self.vm.volumes.values(): - if volume.save_on_stop: - ret = volume.commit() - if asyncio.iscoroutine(ret): - futures.append(ret) - - if futures: - yield asyncio.wait(futures) - def unused_frontend(self): ''' Find an unused device name ''' unused_frontends = self.AVAILABLE_FRONTENDS.difference(