mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
Delete image after use, apparently the vbox version of delete is to do nothing
This commit is contained in:
parent
bd4cf250a2
commit
87f2d889b7
2 changed files with 7 additions and 0 deletions
|
@ -23,6 +23,12 @@ class VirtualBoxImage(Image):
|
||||||
log.debug('Closing vbox medium `{path}\''.format(path=self.image_path))
|
log.debug('Closing vbox medium `{path}\''.format(path=self.image_path))
|
||||||
self.medium.close()
|
self.medium.close()
|
||||||
|
|
||||||
|
def destroy(self):
|
||||||
|
log.debug('Deleting vbox image `{path}\''.format(path=self.image_path))
|
||||||
|
import os
|
||||||
|
os.remove(self.image_path)
|
||||||
|
del self.image_path
|
||||||
|
|
||||||
def get_instance(self):
|
def get_instance(self):
|
||||||
import hashlib
|
import hashlib
|
||||||
from ..instances.virtualbox import VirtualBoxInstance
|
from ..instances.virtualbox import VirtualBoxInstance
|
||||||
|
|
|
@ -55,3 +55,4 @@ class BootableManifest(object):
|
||||||
self.instance.down()
|
self.instance.down()
|
||||||
if hasattr(self, 'image'):
|
if hasattr(self, 'image'):
|
||||||
self.image.close()
|
self.image.close()
|
||||||
|
self.image.destroy()
|
||||||
|
|
Loading…
Add table
Reference in a new issue