mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00

MAJOR refactor. The volume is now abstracted into a model along with a partitionmap and partitions. Volumes and partitions are now controlled via an FSM to ensure that commands are called in the proper sequence. GRUB can now be installed properly onto loop devices by using dmsetup to fake a proper harddisk.
20 lines
471 B
Python
20 lines
471 B
Python
from base import Task
|
|
from common import phases
|
|
from common.tasks import volume
|
|
|
|
|
|
class Create(Task):
|
|
description = 'Creating the EBS volume'
|
|
phase = phases.volume_creation
|
|
before = [volume.Attach]
|
|
|
|
def run(self, info):
|
|
info.volume.create(info.connection, info.host['availabilityZone'])
|
|
|
|
|
|
class Snapshot(Task):
|
|
description = 'Creating a snapshot of the EBS volume'
|
|
phase = phases.image_registration
|
|
|
|
def run(self, info):
|
|
info.snapshot = info.volume.snapshot()
|