bootstrap-vz/base/fs/nopartitions.py
Anders Ingemann efecc15382 VDI images working now
*Helpful error messages included
2013-10-27 18:11:13 +01:00

31 lines
582 B
Python

from partitions.singlepartition 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()