bootstrap-vz/base/fs/partitionmaps/none.py
Anders Ingemann d6502089e2 Implemented both MBR and GPT partitioning.
VirtualBox seems to not like GPT
2013-10-27 18:11:14 +01:00

31 lines
575 B
Python

from ..partitions.single import SinglePartition
class NoPartitions(object):
def __init__(self, data):
root = data['root']
self.root = SinglePartition(root['size'], root['filesystem'])
self.partitions = [self.root]
self.mount_points = [('/', self.root)]
def get_total_size(self):
return self.root.size
def create(self, volume):
pass
def map(self, volume):
pass
def unmap(self, volume):
pass
def format(self):
self.root.format()
def mount_root(self, destination):
self.root.mount(destination)
def unmount_root(self):
self.root.unmount()