Merge remote-tracking branch 'origin/pr/149'
* origin/pr/149: Add admin.vm.volume.Clear call (QubesOS/qubes-issues#5946)
This commit is contained in:
commit
4da218c332
@ -236,6 +236,10 @@ class Volume(object):
|
||||
'ImportWithSize', payload=size_line.encode(),
|
||||
payload_stream=stream)
|
||||
|
||||
def clear_data(self):
|
||||
''' Clear existing volume content. '''
|
||||
self._qubesd_call('Clear')
|
||||
|
||||
def clone(self, source):
|
||||
''' Clone data from sane volume of another VM.
|
||||
|
||||
|
@ -124,8 +124,7 @@ def import_root_img(vm, source_dir):
|
||||
|
||||
def reset_private_img(vm):
|
||||
'''Clear private volume'''
|
||||
with open('/dev/null', 'rb') as null:
|
||||
vm.volumes['private'].import_data(stream=null)
|
||||
vm.volumes['private'].clear_data()
|
||||
|
||||
|
||||
def import_appmenus(vm, source_dir):
|
||||
|
Loading…
Reference in New Issue
Block a user