瀏覽代碼

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
Marek Marczykowski-Górecki 7 年之前
父節點
當前提交
5971873680
共有 1 個文件被更改,包括 0 次插入28 次删除
  1. 0 28
      qubes/storage/__init__.py

+ 0 - 28
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(