bootstrap-vz/common/tasks/partitioning.py
2013-10-27 18:11:53 +01:00

32 lines
704 B
Python

from base import Task
from common import phases
import filesystem
import volume
class PartitionVolume(Task):
description = 'Partitioning the volume'
phase = phases.volume_preparation
def run(self, info):
info.volume.partition_map.create()
class MapPartitions(Task):
description = 'Mapping volume partitions'
phase = phases.volume_preparation
before = [filesystem.Format]
after = [PartitionVolume]
def run(self, info):
info.volume.partition_map.map()
class UnmapPartitions(Task):
description = 'Removing volume partitions mapping'
phase = phases.volume_unmounting
before = [volume.Detach]
after = [filesystem.UnmountRoot]
def run(self, info):
info.volume.partition_map.unmap()