From a4577c0dce02741b725772ad836841a693d02dd5 Mon Sep 17 00:00:00 2001 From: Bahtiar `kalkin-` Gadimov Date: Thu, 16 Jun 2016 12:39:18 +0200 Subject: [PATCH] Rename Storage.create_on_disk to Storage.create --- qubes/storage/__init__.py | 5 ++--- qubes/vm/qubesvm.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/qubes/storage/__init__.py b/qubes/storage/__init__.py index 28db653c..64d97329 100644 --- a/qubes/storage/__init__.py +++ b/qubes/storage/__init__.py @@ -133,9 +133,8 @@ class Storage(object): ''' Resize volume ''' self.get_pool(volume).resize(volume, size) - # TODO rename it to create() - def create_on_disk(self, source_template=None): - # :pylint: disable=missing-docstring + def create(self, source_template=None): + if source_template is None and hasattr(self.vm, 'template'): source_template = self.vm.template diff --git a/qubes/vm/qubesvm.py b/qubes/vm/qubesvm.py index 48fe3158..58c38599 100644 --- a/qubes/vm/qubesvm.py +++ b/qubes/vm/qubesvm.py @@ -1144,7 +1144,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM): self.log.info('Creating directory: {0}'.format(self.dir_path)) os.makedirs(self.dir_path, mode=0o775) - self.storage.create_on_disk(source_template) + self.storage.create(source_template) self.log.info('Creating icon symlink: {} -> {}'.format( self.icon_path, self.label.icon_path))