bootstrap-vz/base/fs/partitionmaps/none.py

17 lines
468 B
Python
Raw Normal View History

from ..partitions.single import SinglePartition
class NoPartitions(object):
2014-01-19 01:02:29 +01:00
def __init__(self, data, bootloader):
from common.bytes import Bytes
2014-02-23 17:52:05 +01:00
self.root = SinglePartition(Bytes(data['root']['size']),
data['root']['filesystem'], data['root'].get('format_command', None))
self.partitions = [self.root]
def is_blocking(self):
2013-11-26 21:07:39 +01:00
return self.root.fsm.current == 'mounted'
def get_total_size(self):
return self.root.get_end()