summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-03-28 22:19:45 +0300
committerLars Wirzenius <liw@liw.fi>2017-03-28 22:19:45 +0300
commit5fd629805e645ad63fa5f5185312a57db6e0dcb0 (patch)
tree07daaaa6aed72cdaabba6550cd259b726780e9b3
parent5f4aad6e401cde45863feef71e2d79bed501ca70 (diff)
downloadvmdb2-5fd629805e645ad63fa5f5185312a57db6e0dcb0.tar.gz
Use partition tags for mkfs instead of devices
Might want to put back device support for unpartitiones images, but since those currently can't have a bootloader, they're useless and thus currently no point in creating them.
-rw-r--r--vmdb/plugins/mkfs_plugin.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/vmdb/plugins/mkfs_plugin.py b/vmdb/plugins/mkfs_plugin.py
index 30d6028..1ea3090 100644
--- a/vmdb/plugins/mkfs_plugin.py
+++ b/vmdb/plugins/mkfs_plugin.py
@@ -34,11 +34,12 @@ class MkfsPlugin(cliapp.Plugin):
class MkfsStepRunner(vmdb.StepRunnerInterface):
def get_required_keys(self):
- return ['mkfs', 'device']
+ return ['mkfs', 'partition']
def run(self, step_spec, settings, state):
fstype = step_spec['mkfs']
- device = step_spec['device']
+ part_tag = step_spec['partition']
+ device = state.parts[part_tag]
sys.stdout.write(
'Creating {} filesystem on {}\n'.format(fstype, device))
cliapp.runcmd(['/sbin/mkfs', '-t', fstype, device])