bootstrap-vz/base/fs/partitionmaps/none.py
2014-02-27 23:02:58 +01:00

16 lines
468 B
Python

from ..partitions.single import SinglePartition
class NoPartitions(object):
def __init__(self, data, bootloader):
from common.bytes import Bytes
self.root = SinglePartition(Bytes(data['root']['size']),
data['root']['filesystem'], data['root'].get('format_command', None))
self.partitions = [self.root]
def is_blocking(self):
return self.root.fsm.current == 'mounted'
def get_total_size(self):
return self.root.get_end()