mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
25 lines
529 B
Python
25 lines
529 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):
|
|
self.root.create(volume)
|
|
|
|
def format(self):
|
|
self.root.format()
|
|
|
|
def mount_root(self, destination):
|
|
self.root.mount(destination)
|
|
|
|
def unmount_root(self):
|
|
self.root.unmount()
|