2013-09-15 13:19:45 +02:00
|
|
|
from partitions.singlepartition import SinglePartition
|
|
|
|
|
|
|
|
|
|
|
|
class NoPartitions(object):
|
|
|
|
|
|
|
|
def __init__(self, data):
|
|
|
|
root = data['root']
|
|
|
|
self.root = SinglePartition(root['size'], root['filesystem'])
|
2013-09-15 18:26:22 +02:00
|
|
|
self.partitions = [self.root]
|
2013-09-15 13:19:45 +02:00
|
|
|
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()
|