diff options
author | Lars Wirzenius <liw@liw.fi> | 2017-03-28 22:19:45 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2017-03-28 22:19:45 +0300 |
commit | 5fd629805e645ad63fa5f5185312a57db6e0dcb0 (patch) | |
tree | 07daaaa6aed72cdaabba6550cd259b726780e9b3 | |
parent | 5f4aad6e401cde45863feef71e2d79bed501ca70 (diff) | |
download | vmdb2-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.py | 5 |
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]) |